Skip to content

Commit

Permalink
Merge a0a7248 into 07bd1c6
Browse files Browse the repository at this point in the history
  • Loading branch information
filipkis committed Feb 26, 2017
2 parents 07bd1c6 + a0a7248 commit e0065fe
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Changelog.md
@@ -1,3 +1,5 @@
# v1.0.4 / 2017-02-26
- Fix: Switched from Realtidsinformation v3 to v4

# v1.0.3 / 2015-06-01
- Fix: Added lodash as dependency
Expand Down
4 changes: 2 additions & 2 deletions lib/services/RealtimeInformation.coffee
Expand Up @@ -4,9 +4,9 @@ Base = require './Base'
class RealtimeInformation extends Base
constructor: (config) ->
@key = config.keys.realtimeInformation
@service = 'realtimeInformation (SL Realtidsinformation 3)'
@service = 'realtimeInformation (SL Realtidsinformation 4)'
super

module.exports = (args...) ->
service = new RealtimeInformation args...
(args...) -> service.prepareRequest "realtimedepartures", args...
(args...) -> service.prepareRequest "realtimedeparturesV4", args...
5 changes: 3 additions & 2 deletions package.json
@@ -1,7 +1,7 @@
{
"name": "sl-api",
"description": "Wrapper for Storstockholms Lokaltrafiks (SL) public API:s",
"version": "1.0.3",
"version": "1.0.4",
"author": {
"name": "Simon Johansson",
"email": "mail@simon-johansson.com"
Expand Down Expand Up @@ -66,6 +66,7 @@
"test": "mocha --compilers coffee:coffee-script/register -R spec",
"example": "npm run-script compile && node example/index.js",
"precommit": "npm test",
"prepush": "npm test"
"prepush": "npm test",
"prepublish": "npm run compile"
}
}
2 changes: 1 addition & 1 deletion test/test.coffee
Expand Up @@ -65,7 +65,7 @@ describe 'SL (Storstockholms Lokaltrafik) API Wrapper\n', ()->
it 'should make request to realtimedepartures endpoint', (done) ->
new SL(keys).realtimeInformation (err, data) ->
url = request.get.args[0][0].url
expect(url).to.eql 'http://api.sl.se/api2/realtimedepartures.json?key=xxx'
expect(url).to.eql 'http://api.sl.se/api2/realtimedeparturesV4.json?key=xxx'
done()

it 'should return the response with right formatting', (done) ->
Expand Down

0 comments on commit e0065fe

Please sign in to comment.