expedia_api 0.1.8 → 0.1.9
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: 1f79a79fb8c74ac5071faf1a6453abbd80a96822
|
4
|
+
data.tar.gz: 97b56432745191b7e78fa76e06c450b29f434de3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d533fa5fec8ce3a37fe85a705a19f74269c27cbd7829bfd510b9ba593206e4c7a047e66e6f1b81241d96d55ddec5ed49e7e9df1b8b9b394f89a3df3285e834b
|
7
|
+
data.tar.gz: 7f1bb5ab71a46c56ec2e3395968908163378a4859bee12f9bd1108d2bbb25b746b0f3fdd338088bf5c871c8daa6934ea872eead3fb9fbc25d64747aacea98d34
|
@@ -19,7 +19,12 @@ module ExpediaApi
|
|
19
19
|
|
20
20
|
# extracts the json of the flight legs from the data.
|
21
21
|
def extract_flightlegs
|
22
|
-
@raw_data.fetch(:FlightItinerary, {}).fetch(:FlightLeg,
|
22
|
+
data = @raw_data.fetch(:FlightItinerary, {}).fetch(:FlightLeg, [])
|
23
|
+
if data.is_a?(Array)
|
24
|
+
data
|
25
|
+
else
|
26
|
+
[data]
|
27
|
+
end
|
23
28
|
end
|
24
29
|
|
25
30
|
end
|
@@ -60,7 +60,12 @@ module ExpediaApi
|
|
60
60
|
|
61
61
|
# extracts the segments of the flight from the json
|
62
62
|
def extract_segments
|
63
|
-
@raw_data[:FlightSegment] || []
|
63
|
+
data = @raw_data[:FlightSegment] || []
|
64
|
+
if data.is_a?(Array)
|
65
|
+
data
|
66
|
+
else
|
67
|
+
[data]
|
68
|
+
end
|
64
69
|
end
|
65
70
|
|
66
71
|
# returns the total time it will in seconds.
|
data/lib/expedia_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: expedia_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hendrik Kleinwaechter
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|