expedia_api 0.1.8 → 0.1.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5e6ebd0c3a9096821ea7f7af3733dc9e581979a5
4
- data.tar.gz: 640d4ed2e77bce8a2a5bb211074a9ab211457886
3
+ metadata.gz: 1f79a79fb8c74ac5071faf1a6453abbd80a96822
4
+ data.tar.gz: 97b56432745191b7e78fa76e06c450b29f434de3
5
5
  SHA512:
6
- metadata.gz: 7f7de3574914acf821fbf26221cf4e1bc80c84a3228b5e9bf6d3a43ff4cf09d7a1ecb5c208ecc89c1604a8bda27da93baa37c33501f574f431aa0f9a00a49dfb
7
- data.tar.gz: 11ff20b25f339faf3c5f0e479707322b1c42c76655ccd51d951b6c5b7c4b956f152fabb57609f35990467393dd6a0421ae550806e6d4a05043d79b0dac15c4e3
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.
@@ -1,3 +1,3 @@
1
1
  module ExpediaApi
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
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.8
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-16 00:00:00.000000000 Z
11
+ date: 2016-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler