rthbound-suitcase 1.7.2 → 1.7.3

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.
@@ -122,11 +122,10 @@ module Suitcase
122
122
  end
123
123
  update_session(raw, session)
124
124
 
125
- [split(raw)].flatten.each_with_index do |hotel_data, i|
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.symbolize_keys.keys.any?{ |k| [:cache_key, :cacheKey].include?(k) }
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)].each_with_index do |hotel_data, i|
181
+ hotels = [split(parsed)].flatten.map do |hotel_data|
183
182
  h = Hotel.new(parse_information(hotel_data))
184
- h.raw = parsed if i == 0
185
- h
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
@@ -1,3 +1,3 @@
1
1
  module Suitcase
2
- VERSION = "1.7.2"
2
+ VERSION = "1.7.3"
3
3
  end
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.2
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: -1478877458648309527
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: -1478877458648309527
218
+ hash: -1894620412398467973
219
219
  requirements: []
220
220
  rubyforge_project:
221
221
  rubygems_version: 1.8.24