station_master 0.1.2 → 0.1.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3940cfff3af385f10f8677b083a42940700d8aaa
|
4
|
+
data.tar.gz: 65ccabc48ebca170de535bad2dded470e2d16ccd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 194a0fa98f3da2e7460d3134c3be3f1350a314b05d16fee46ad007f9ea179efe742668f2a34efbeca6ea5f9c3de4209b0b709cf25d93f1efea6763197e51a640
|
7
|
+
data.tar.gz: 577e3ae0c99d603ee9bf33c828e8063c61197f3a866a8378d1269da078752454c0a8837a56d710f2cedf05851aca7e67fe00fe635d82cdbd4f0b4b78b9380626
|
@@ -8,7 +8,7 @@ module StationMaster
|
|
8
8
|
@train_type = hash[:categoria]
|
9
9
|
@origin = hash[:origine]
|
10
10
|
@platform = (hash[:binarioProgrammatoArrivoDescrizione].to_s || '0').strip
|
11
|
-
@time = Time.at((hash[:orarioArrivo] || 0) / 1000)
|
11
|
+
@time = Time.at((hash[:orarioArrivo] || 0) / 1000).in_time_zone(TIME_ZONE)
|
12
12
|
@delay = hash[:ritardo]
|
13
13
|
end
|
14
14
|
|
@@ -8,7 +8,7 @@ module StationMaster
|
|
8
8
|
@train_type = hash[:categoria]
|
9
9
|
@destination = hash[:destinazione]
|
10
10
|
@platform = (hash[:binarioProgrammatoPartenzaDescrizione].to_s || '0').strip
|
11
|
-
@time = Time.at((hash[:orarioPartenza] || 0) / 1000)
|
11
|
+
@time = Time.at((hash[:orarioPartenza] || 0) / 1000).in_time_zone(TIME_ZONE)
|
12
12
|
@delay = hash[:ritardo]
|
13
13
|
end
|
14
14
|
|
@@ -3,22 +3,22 @@ module StationMaster
|
|
3
3
|
module Find
|
4
4
|
include Ask
|
5
5
|
|
6
|
-
def find_station_arrivals(station_code, time =
|
6
|
+
def find_station_arrivals(station_code, time = Time.now)
|
7
7
|
MultiJson::load(
|
8
8
|
remote_call(:arrivals, {
|
9
9
|
station_code: station_code,
|
10
|
-
time: format_time(time
|
10
|
+
time: format_time(time.in_time_zone(TIME_ZONE)) }),
|
11
11
|
symbolize_keys: true)
|
12
12
|
.inject([]) do |array, arrival_hash|
|
13
13
|
array << Arrival.new(arrival_hash)
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
def find_station_departures(station_code, time =
|
17
|
+
def find_station_departures(station_code, time = Time.now)
|
18
18
|
MultiJson::load(
|
19
19
|
remote_call(:departures, {
|
20
20
|
station_code: station_code,
|
21
|
-
time: format_time(time
|
21
|
+
time: format_time(time.in_time_zone(TIME_ZONE)) }),
|
22
22
|
symbolize_keys: true)
|
23
23
|
.inject([]) do |array, arrival_hash|
|
24
24
|
array << Departure.new(arrival_hash)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: station_master
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefano Ordine
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|