Comparing version 1.4.0-rc to 1.4.0
@@ -5,5 +5,4 @@ # Changelog | ||
_Currently release candidate at `gangway@1.4.0-rc`._ | ||
- Added `Accept: "application/json" default header | ||
- Internal change: remove dependency on inflection library. | ||
@@ -10,0 +9,0 @@ ## 1.3.1 |
{ | ||
"name": "gangway", | ||
"version": "1.4.0-rc", | ||
"version": "1.4.0", | ||
"description": "A client-side API abstraction layer", | ||
@@ -22,3 +22,2 @@ "engines": { | ||
"dependencies": { | ||
"inflected": "1.1.6", | ||
"promise": "~7.1", | ||
@@ -25,0 +24,0 @@ "superagent": "~1.7" |
@@ -1,2 +0,2 @@ | ||
var Inflector = require('inflected') | ||
var singularize = require('./singularize') | ||
var url = require('./url') | ||
@@ -8,4 +8,4 @@ | ||
return segment + (i === segments.length - 1 ? '' : '/{' + Inflector.singularize(segment) + '_id}') | ||
return segment + (i === segments.length - 1 ? '' : '/{' + singularize(segment) + '_id}') | ||
}).reduce(url.resolve, '') | ||
} |
@@ -197,4 +197,20 @@ var API = require('../src/api') | ||
it ('does not add additional post parameters', function(done) { | ||
var api = API({ | ||
baseURL: 'http://example.com' | ||
}) | ||
var users = api.resource('users') | ||
var notes = users.resource('notes') | ||
fauxJax.on('request', function(request) { | ||
assert.equal('note' in JSON.parse(request.requestBody), false) | ||
done() | ||
}) | ||
notes.create({ body: { description: 'hi' }, params: { user_id: 1 }}) | ||
}) | ||
}) | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
42648
2
34
795
1
- Removedinflected@1.1.6
- Removedinflected@1.1.6(transitive)