Skip to content
Browse files

Merge pull request #8 from warabe/master

Node v0.8 compatibility
  • Loading branch information...
2 parents cd68abc + 4a88372 commit d46170fcdcf34799d20f997607523da7ef541b1f @wezm committed Mar 3, 2013
Showing with 3 additions and 5 deletions.
  1. +1 −2 package.json
  2. +2 −3 src/rpc_client.coffee
View
3 package.json
@@ -1,6 +1,6 @@
{
"name": "kyoto-client",
- "version": "0.4.0",
+ "version": "0.4.1",
"description": "Client for Kyoto Tycoon",
"homepage": "http://kyoto-client.org/",
"author": "Wesley Moore <wes@wezm.net> (http://www.wezm.net/)",
@@ -32,7 +32,6 @@
},
"engines": "node >= 0.4.1",
"dependencies": {
- "base64": "~2.0.0",
"csv": "~0.0.3"
},
"devDependencies": {
View
5 src/rpc_client.coffee
@@ -2,7 +2,6 @@
csv = require 'csv'
assert = require 'assert'
http = require 'http'
-base64 = require 'base64'
class RpcClient
constructor: (@port, @host) ->
@@ -23,7 +22,7 @@ class RpcClient
http.request options, (response) ->
data = {}
- tsv = csv().fromStream response,
+ tsv = csv().from.stream response,
delimiter: "\t"
escape: ""
encoding: 'ascii' # All content is ASCII safe (I.e. base64 or url-encoded)
@@ -44,7 +43,7 @@ class RpcClient
decodeURIComponent(col) for col in row
when 'B'
tsv.transform (row, index) ->
- base64.decode(col) for col in row
+ new Buffer(col, 'base64').toString('utf8') for col in row
# Quoted-printable is never selected by the server
# when 'Q'
# throw new Error("Quoted-printable encoding is not implemented")

0 comments on commit d46170f

Please sign in to comment.
Something went wrong with that request. Please try again.