transilien_realtime 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 68916028ace3035309227b7bb2fac604e37497d9
4
- data.tar.gz: 963924a58bc4476cd0a78d6a1bf96a2f0f7fe6e5
3
+ metadata.gz: 7c8fce3ab306079cd9de63a0503d39def27cd2ad
4
+ data.tar.gz: ff081cf3f9fe8a457ffe6e15977c507e4bf83586
5
5
  SHA512:
6
- metadata.gz: c581c1271e4b311fd0ecfd91607d58e5c44507ee93551572cc07722065271149455581f64174e6e7b4930a7009e88cff264fbbea2f2adc77106b72689da25936
7
- data.tar.gz: e4a23f26ae73195a6ba89cfe65f4fc67eb12d9372bf27799814f1b71f52e3362d72fef4c1a416d0f215d1b5a0c1a646f22eff102bfe4f166651cafed7191249a
6
+ metadata.gz: cd10a241c667168033af662a5f0025eca3f7db06b069aa9c5b8d49935e45f4dbc6bdb953bbabb5ff92f760e8348302dd2bb87d705052f273fcdaa72667c51b2d
7
+ data.tar.gz: 5b93b217e36cab62ea992f9d46a74efb7f0329e8d0c7ad21bdd4771ebd08da0d033128577d5089ddb23eeedbd4bbd662237015fc344558a21298526d863270a1
data/README.md CHANGED
@@ -41,9 +41,9 @@ tr.trains
41
41
  => [#<TransilienRealtime::Train:0x007f945dcc4770 @departure_at=2015-05-15 16:12:00 +0200, @mission="MOCA", @numero="136891", @terminus="87381509">]
42
42
  ```
43
43
 
44
- Important note about Train#departure_at:
44
+ Important note about `Train#departure_at`:
45
45
 
46
- Since the API doesn't give a timezone and that Europe/Paris offset change according to DST, there's no way to provide a correct Time instance after parsing this partial Date. As a workaround, the time is parsed "as if" and forced into a fake DST, so you can easily shift the date into a timezone of your concern.
46
+ Since the API doesn't give a timezone and that `Europe/Paris` offset change according to DST, there's no way to provide a correct Time instance after parsing this partial Date. As a workaround, the time is parsed "as if" and forced into a fake DST, so you can easily shift the date into a timezone of your concern.
47
47
 
48
48
  ## Development
49
49
 
@@ -36,8 +36,8 @@ module TransilienRealtime
36
36
  @numero = numero
37
37
  @departure_at = Time.strptime(departure_at + ' +0000', '%d/%m/%Y %H:%M %z')
38
38
  @terminus = terminus
39
- @mode = MODES[mode]
40
- @state = STATES[state]
39
+ @state = state && STATES[state[0]] # SNCF xsd is wrong: say to expect a /^S/ but give 'Supprimé'
40
+ @mode = mode && MODES[mode[0]] # consider they will be consistant, so wait for /^R/ instead of R
41
41
  end
42
42
 
43
43
  def to_json(options={})
@@ -1,3 +1,3 @@
1
1
  module TransilienRealtime
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: transilien_realtime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Lecavelier
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-05-18 00:00:00.000000000 Z
11
+ date: 2015-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http