campgrounds 0.0.1 → 0.0.2

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.
@@ -57,7 +57,7 @@ describe Campgrounds::CampgroundSearch do
57
57
  end
58
58
 
59
59
  it "lets you search by address" do
60
- results = campground.campground_search.find_by_address('Denver, CO', 50)
60
+ results = campground.campground_search.find_by_address({:address => 'Denver, CO', :range => 50})
61
61
  results['count'].wont_be_empty
62
62
  results['result'].each do |r|
63
63
  r['state'].must_equal 'CO'
@@ -65,12 +65,19 @@ describe Campgrounds::CampgroundSearch do
65
65
  end
66
66
 
67
67
  it "only returns results within the desired range" do
68
- results = campground.campground_search.find_by_address('Denver, CO', 50)
68
+ results = campground.campground_search.find_by_address({:address => 'Denver, CO', :range => 50})
69
69
  results['result'].each do |r|
70
70
  r['distance'].must_be :<=, 50
71
71
  end
72
72
  end
73
73
 
74
+ it "lets you use typical find methods when searching by address" do
75
+ results = campground.campground_search.find_by_address({:address => 'Denver, CO', :range => 50, :pets => true})
76
+ results['result'].each do |r|
77
+ r['sitesWithPetsAllowed'].must_equal 'Y'
78
+ r['state'].must_equal 'CO'
79
+ end
80
+ end
74
81
  end
75
82
 
76
83
  describe "campground_search find method" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: campgrounds
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
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-10-10 00:00:00.000000000 Z
12
+ date: 2012-11-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: hashie
@@ -146,13 +146,13 @@ executables: []
146
146
  extensions: []
147
147
  extra_rdoc_files: []
148
148
  files:
149
+ - .gitignore
149
150
  - .rvmrc
150
151
  - Gemfile
151
152
  - Gemfile.lock
152
153
  - LICENSE.txt
153
154
  - README.md
154
155
  - Rakefile
155
- - campgrounds-0.0.1.gem
156
156
  - campgrounds.gemspec
157
157
  - lib/campgrounds.rb
158
158
  - lib/campgrounds/base.rb
@@ -184,18 +184,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
184
184
  - - ! '>='
185
185
  - !ruby/object:Gem::Version
186
186
  version: '0'
187
- segments:
188
- - 0
189
- hash: -1639732289215519928
190
187
  required_rubygems_version: !ruby/object:Gem::Requirement
191
188
  none: false
192
189
  requirements:
193
190
  - - ! '>='
194
191
  - !ruby/object:Gem::Version
195
192
  version: '0'
196
- segments:
197
- - 0
198
- hash: -1639732289215519928
199
193
  requirements: []
200
194
  rubyforge_project:
201
195
  rubygems_version: 1.8.24