movlog 0.3.10 → 0.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/movlog/route.rb +10 -6
- data/lib/movlog/routes.rb +7 -1
- data/lib/movlog/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a18112f93fdd2039c1bb75215bf6f0bc9f122c49
|
4
|
+
data.tar.gz: 6cf688097be74ba795bd16d1f35b4de06759bc04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2f69598607c1c483f82842894d7256102fe5c0b04858f2689ac3b5e7cd016af3e35322126476c7f4d89f6981011050b33f15c48aadaf764dc207c47c7afac83
|
7
|
+
data.tar.gz: e432e294ea6ac9276e85d88810e8ef2db967539eade4259bc415acbee04fbcd726918e1673469781b455c1d7feaa2403be4d7ef5e0c0894f0487817f26f981f3
|
data/lib/movlog/route.rb
CHANGED
@@ -20,8 +20,12 @@ module Skyscanner
|
|
20
20
|
new(data)
|
21
21
|
end
|
22
22
|
|
23
|
+
def to_hash
|
24
|
+
{ meta: @meta.to_hash, flights: @flights.to_hash }.to_json
|
25
|
+
end
|
26
|
+
|
23
27
|
def to_json
|
24
|
-
|
28
|
+
to_hash.to_json
|
25
29
|
end
|
26
30
|
end
|
27
31
|
|
@@ -39,10 +43,10 @@ module Skyscanner
|
|
39
43
|
@date = data[:date]
|
40
44
|
end
|
41
45
|
|
42
|
-
def
|
46
|
+
def to_hash
|
43
47
|
{ min_price: @min_price, direct: @direct, carriers: @carriers,
|
44
|
-
origin: @origin.
|
45
|
-
date: @date }
|
48
|
+
origin: @origin.to_hash, destination: @destination.to_hash,
|
49
|
+
date: @date }
|
46
50
|
end
|
47
51
|
|
48
52
|
end
|
@@ -63,9 +67,9 @@ module Skyscanner
|
|
63
67
|
new(data)
|
64
68
|
end
|
65
69
|
|
66
|
-
def
|
70
|
+
def to_hash
|
67
71
|
{ name: @name, city_name: @city_name, country_name: @country_name,
|
68
|
-
type: @type }
|
72
|
+
type: @type }
|
69
73
|
end
|
70
74
|
end
|
71
75
|
end
|
data/lib/movlog/routes.rb
CHANGED
@@ -63,7 +63,7 @@ module Skyscanner
|
|
63
63
|
carrier_ids.map { |cid| @carriers[cid] }
|
64
64
|
end
|
65
65
|
end
|
66
|
-
|
66
|
+
|
67
67
|
# Query parameters
|
68
68
|
class RouteMeta
|
69
69
|
attr_reader :market, :currency, :locale
|
@@ -76,6 +76,12 @@ module Skyscanner
|
|
76
76
|
load_date(data['outbound'], data['inbound'])
|
77
77
|
end
|
78
78
|
|
79
|
+
def to_hash
|
80
|
+
{ market: @market, currency: @currency, locale: @locale,
|
81
|
+
origin: @origin, destination: @destination,
|
82
|
+
outbound: @outbound, inbound: @inbound }
|
83
|
+
end
|
84
|
+
|
79
85
|
private
|
80
86
|
|
81
87
|
def load_env_data(market, currency, locale)
|
data/lib/movlog/version.rb
CHANGED