Skip to content

Commit

Permalink
dependencies: Set tunnel-agent as optional dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Turbo87 committed Oct 15, 2013
1 parent 6d7c1c9 commit 751ac28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
"qs": "~0.6.0",
"json-stringify-safe": "~5.0.0",
"forever-agent": "~0.5.0",
"tunnel-agent": "~0.3.0",
"tough-cookie": "~0.9.15",
"node-uuid": "~1.4.0",
"mime": "~1.2.9",
"form-data": "~0.1.0"
},
"optionalDependencies": {
"tunnel-agent": "~0.3.0",
"http-signature": "~0.10.0",
"oauth-sign": "~0.3.0",
"hawk": "~1.0.0",
Expand Down
4 changes: 2 additions & 2 deletions request.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var optional = require('./lib/optional')
, httpSignature = optional('http-signature')
, uuid = require('node-uuid')
, mime = require('mime')
, tunnel = require('tunnel-agent')
, tunnel = optional('tunnel-agent')
, _safeStringify = require('json-stringify-safe')

, ForeverAgent = require('forever-agent')
Expand Down Expand Up @@ -94,7 +94,7 @@ function Request (options) {
this.explicitMethod = true
}

this.canTunnel = options.tunnel !== false;
this.canTunnel = options.tunnel !== false && tunnel;

this.init(options)
}
Expand Down

0 comments on commit 751ac28

Please sign in to comment.