oodler 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Rakefile +1 -1
  2. data/VERSION +1 -1
  3. data/lib/oodler/client.rb +5 -6
  4. metadata +1 -4
data/Rakefile CHANGED
@@ -14,7 +14,7 @@ begin
14
14
 
15
15
 
16
16
  gem.add_dependency('roxml', '~> 3.1.3')
17
- gem.add_dependency('crack', '~> 0.1.4', '<= 0.1.6')
17
+ gem.add_dependency('crack', '<= 0.1.6')
18
18
  gem.add_dependency('httparty', '>= 0.5.2')
19
19
 
20
20
  gem.add_development_dependency('shoulda', '>= 2.10.1')
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.6
1
+ 0.1.7
data/lib/oodler/client.rb CHANGED
@@ -23,17 +23,14 @@ module Oodler
23
23
 
24
24
  #client.search("chicago", {:category =>"vehicle/cars"})
25
25
  def search( region, options={})
26
- options= {:query =>options}
27
- options[:query].merge!({:region => region}) if region
28
-
26
+ options.merge!({:region => region})
29
27
  self.listing(options)
30
28
  end
31
29
 
32
30
  #helper method - client.search_by_category("chicago", "vehicle/car")
33
31
  def search_by_category(region,category, options={})
34
- options= {:query =>options}
35
- options[:query].merge!({:region => region}) if region
36
- options[:query].merge!({:category => category}) if category
32
+ options.merge!({:region => region}) if region
33
+ options.merge!({:category => category}) if category
37
34
  self.listing(options)
38
35
 
39
36
  end
@@ -74,7 +71,9 @@ module Oodler
74
71
  private
75
72
 
76
73
  def validate_parameters(options)
74
+
77
75
  params = options[:query]
76
+
78
77
  unless params[:region]
79
78
  raise OodleArgumentError, 'Missing region parameter. Visit http://developer.oodle.com/regions-list/ for possible regions.'
80
79
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oodler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Hagedorn
@@ -28,9 +28,6 @@ dependencies:
28
28
  version_requirement:
29
29
  version_requirements: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
32
- - !ruby/object:Gem::Version
33
- version: 0.1.4
34
31
  - - <=
35
32
  - !ruby/object:Gem::Version
36
33
  version: 0.1.6