suitcase 1.4.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -71,9 +71,9 @@ Caching is not recommended for car rentals, because they all change so quickly.
71
71
  Contributing
72
72
  ------------
73
73
 
74
- ### Running the specs
74
+ ### Running the tests
75
75
 
76
- To set up for the specs, you need to edit the file `spec/keys.rb` with the proper information. Currently, testing reservations is unsupported. You can run the specs with the default rake task by running `rake` from the command line.
76
+ To set up for the tests, you need to edit the file `test/keys.rb` with the proper information. Currently, testing reservations is unsupported. You can run the tests with the default rake task by running `rake` from the command line.
77
77
 
78
78
  ### Pull requests/issues
79
79
 
@@ -170,8 +170,13 @@
170
170
  params = info.dup
171
171
  params["numberOfResults"] = params[:results] ? params[:results] : 10
172
172
  params.delete(:results)
173
- params["destinationString"] = params[:location]
174
- params.delete(:location)
173
+ if params[:destination_id]
174
+ params["destinationId"] = params[:destination_id]
175
+ params.delete(:destination_id)
176
+ elsif params[:location]
177
+ params["destinationString"] = params[:location]
178
+ params.delete(:location)
179
+ end
175
180
 
176
181
  amenities = params[:amenities] ? params[:amenities].map {|amenity|
177
182
  AMENITIES[amenity]
@@ -1,3 +1,3 @@
1
1
  module Suitcase
2
- VERSION = "1.4.0"
2
+ VERSION = "1.4.1"
3
3
  end
@@ -20,11 +20,17 @@ describe Suitcase::Hotel do
20
20
  @hotel.must_be_kind_of(Suitcase::Hotel)
21
21
  end
22
22
 
23
- it "returns multiple Hotels if an ID is not passed in" do
23
+ it "returns multiple Hotels if a location is passed in" do
24
24
  hotels = Suitcase::Hotel.find(location: "London, UK")
25
25
  hotels.must_be_kind_of(Array)
26
26
  hotels.first.must_be_kind_of(Suitcase::Hotel)
27
27
  end
28
+
29
+ it "returns multiple Hotels if a destination ID is passed in" do
30
+ hotels = Suitcase::Hotel.find(destination_id: "58870F43-9215-4662-BAA1-CC9A20FEC4F1")
31
+ hotels.must_be_kind_of(Array)
32
+ hotels.first.must_be_kind_of(Suitcase::Hotel)
33
+ end
28
34
 
29
35
  it "returns multiple Hotels if multiple ID's are passed in" do
30
36
  hotels = Suitcase::Hotel.find(ids: [123904, 191937, 220166])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: suitcase
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-14 00:00:00.000000000 Z
12
+ date: 2012-05-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest