rthbound-suitcase 1.7.2 → 1.7.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/suitcase/hotel.rb +6 -8
- data/lib/suitcase/version.rb +1 -1
- metadata +3 -3
data/lib/suitcase/hotel.rb
CHANGED
@@ -122,11 +122,10 @@ module Suitcase
|
|
122
122
|
end
|
123
123
|
update_session(raw, session)
|
124
124
|
|
125
|
-
[split(raw)].flatten.
|
125
|
+
[split(raw)].flatten.map do |hotel_data|
|
126
126
|
h = Hotel.new(parse_information(hotel_data))
|
127
|
-
h.raw = raw if i == 0
|
128
127
|
h
|
129
|
-
end
|
128
|
+
end;hotels.first.raw = parsed
|
130
129
|
end
|
131
130
|
|
132
131
|
# Public: Find a hotel by info other than it's id.
|
@@ -139,7 +138,7 @@ module Suitcase
|
|
139
138
|
params = info.dup
|
140
139
|
|
141
140
|
# Don't parse any params if using EAN's pagination
|
142
|
-
unless params.
|
141
|
+
unless params.keys.any?{ |k| [:cache_key, :cacheKey].include?(k.to_sym) }
|
143
142
|
params["numberOfResults"] = params[:results] ? params[:results] : 10
|
144
143
|
params.delete(:results)
|
145
144
|
if params[:destination_id]
|
@@ -179,11 +178,10 @@ module Suitcase
|
|
179
178
|
Configuration.cache.save_query(:list, params, parsed)
|
180
179
|
end
|
181
180
|
end
|
182
|
-
hotels = [split(parsed)].
|
181
|
+
hotels = [split(parsed)].flatten.map do |hotel_data|
|
183
182
|
h = Hotel.new(parse_information(hotel_data))
|
184
|
-
|
185
|
-
|
186
|
-
end
|
183
|
+
end;hotels.first.raw = parsed
|
184
|
+
|
187
185
|
update_session(parsed, info[:session])
|
188
186
|
|
189
187
|
info[:results] ? hotels[0..(info[:results]-1)] : hotels
|
data/lib/suitcase/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rthbound-suitcase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -206,7 +206,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
206
206
|
version: '0'
|
207
207
|
segments:
|
208
208
|
- 0
|
209
|
-
hash: -
|
209
|
+
hash: -1894620412398467973
|
210
210
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
211
211
|
none: false
|
212
212
|
requirements:
|
@@ -215,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
215
215
|
version: '0'
|
216
216
|
segments:
|
217
217
|
- 0
|
218
|
-
hash: -
|
218
|
+
hash: -1894620412398467973
|
219
219
|
requirements: []
|
220
220
|
rubyforge_project:
|
221
221
|
rubygems_version: 1.8.24
|