Permalink
Browse files

Travis CI support

* add NPM package definition
* add Travis CI config file
* add coffeeling config file to warn on max line length
  • Loading branch information...
1 parent 623c125 commit c508e23cd3e9e03bfb8a30c5b8478525caa1beb6 @jmesnil committed Oct 30, 2012
Showing with 36 additions and 4 deletions.
  1. +10 −0 .travis.yml
  2. +6 −0 coffeelint.json
  3. +16 −0 package.json
  4. +4 −4 src/stomp.coffee
View
@@ -0,0 +1,10 @@
+language: node_js
+node_js:
+ - 0.6.19
+
+before_script:
+ - ./node_modules/.bin/cake build
+
+script:
+ - ./node_modules/.bin/coffeelint -f coffeelint.json -r src
+ - npm test
View
@@ -0,0 +1,6 @@
+{
+ "max_line_length": {
+ "value": 80,
+ "level": "warn"
+ }
+}
View
@@ -0,0 +1,16 @@
+{
+ "name": "stomp-websocket",
+ "preferGlobal": "true",
+ "version": "0.1.0",
+ "author": "Jeff Mesnil <jmesnil@gmail.com",
+ "description": "STOMP over Web Sockets",
+ "scripts": {
+ "build": "cake build",
+ "test": "cake test"
+ },
+ "devDependencies": {
+ "coffee-script": "latest",
+ "coffeelint": "latest",
+ "jasmine-node": "latest"
+ }
+}
View
@@ -40,11 +40,11 @@ Stomp =
# Parse body, stopping at the first \0 found.
# TODO: Add support for content-length header.
- chr = null;
+ chr = null
for i in [(divider + 2)...data.length]
chr = data.charAt(i)
if chr is '\x00'
- break
+ break
body += chr
return Stomp.frame(command, headers, body)
@@ -70,10 +70,10 @@ class Client
constructor: (@ws) ->
@ws.binaryType = "arraybuffer"
# used to index subscribers
- @counter = 0
+ @counter = 0
@connected = false
# subscription callbacks indexed by subscriber's ID
- @subscriptions = {};
+ @subscriptions = {}
_transmit: (command, headers, body) ->
out = Stomp.marshal(command, headers, body)

0 comments on commit c508e23

Please sign in to comment.