Make even shorter syntax by removing redundant Adaptors and Drivers

This commit is contained in:
deadprogram 2013-12-15 23:08:34 -08:00
parent ed50c385c4
commit 6c1e591f84
12 changed files with 12 additions and 12 deletions

2
dist/adaptor.js vendored
View File

@ -17,7 +17,7 @@
require('./basestar'); require('./basestar');
namespace('Cylon.Adaptors', function() { namespace('Cylon', function() {
return this.Adaptor = (function(_super) { return this.Adaptor = (function(_super) {
__extends(Adaptor, _super); __extends(Adaptor, _super);

2
dist/driver.js vendored
View File

@ -17,7 +17,7 @@
require('./basestar'); require('./basestar');
namespace('Cylon.Drivers', function() { namespace('Cylon', function() {
return this.Driver = (function(_super) { return this.Driver = (function(_super) {
__extends(Driver, _super); __extends(Driver, _super);

View File

@ -44,7 +44,7 @@
return Loopback; return Loopback;
})(Cylon.Adaptors.Adaptor); })(Cylon.Adaptor);
}); });
}).call(this); }).call(this);

2
dist/test/ping.js vendored
View File

@ -48,7 +48,7 @@
return Ping; return Ping;
})(Cylon.Drivers.Driver); })(Cylon.Driver);
}); });
}).call(this); }).call(this);

View File

@ -12,7 +12,7 @@ namespace = require 'node-namespace'
require './basestar' require './basestar'
namespace 'Cylon.Adaptors', -> namespace 'Cylon', ->
class @Adaptor extends Cylon.Basestar class @Adaptor extends Cylon.Basestar
constructor: (opts={}) -> constructor: (opts={}) ->
@self = this @self = this

View File

@ -12,7 +12,7 @@ namespace = require 'node-namespace'
require './basestar' require './basestar'
namespace 'Cylon.Drivers', -> namespace 'Cylon', ->
class @Driver extends Cylon.Basestar class @Driver extends Cylon.Basestar
constructor: (opts={}) -> constructor: (opts={}) ->
@self = this @self = this

View File

@ -15,6 +15,6 @@ module.exports =
new Cylon.Adaptors.Loopback(args...) new Cylon.Adaptors.Loopback(args...)
namespace 'Cylon.Adaptors', -> namespace 'Cylon.Adaptors', ->
class @Loopback extends Cylon.Adaptors.Adaptor class @Loopback extends Cylon.Adaptor
commands: -> commands: ->
['ping'] ['ping']

View File

@ -15,7 +15,7 @@ module.exports =
new Cylon.Drivers.Ping(args...) new Cylon.Drivers.Ping(args...)
namespace 'Cylon.Drivers', -> namespace 'Cylon.Drivers', ->
class @Ping extends Cylon.Drivers.Driver class @Ping extends Cylon.Driver
commands: -> commands: ->
['ping'] ['ping']

View File

@ -4,7 +4,7 @@
describe("Adaptor", function() { describe("Adaptor", function() {
var adaptor; var adaptor;
adaptor = new Cylon.Adaptors.Adaptor({ adaptor = new Cylon.Adaptor({
name: 'adapt' name: 'adapt'
}); });
return it('needs tests'); return it('needs tests');

View File

@ -4,7 +4,7 @@
describe("Driver", function() { describe("Driver", function() {
var driver; var driver;
driver = new Cylon.Drivers.Driver({ driver = new Cylon.Driver({
name: 'max', name: 'max',
device: { device: {
connection: 'connect', connection: 'connect',

View File

@ -3,6 +3,6 @@
source "adaptor" source "adaptor"
describe "Adaptor", -> describe "Adaptor", ->
adaptor = new Cylon.Adaptors.Adaptor(name: 'adapt') adaptor = new Cylon.Adaptor(name: 'adapt')
it 'needs tests' it 'needs tests'

View File

@ -3,6 +3,6 @@
source "driver" source "driver"
describe "Driver", -> describe "Driver", ->
driver = new Cylon.Drivers.Driver(name: 'max', device: {connection: 'connect', pin: 13}) driver = new Cylon.Driver(name: 'max', device: {connection: 'connect', pin: 13})
it 'needs tests' it 'needs tests'