oodler 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
data/lib/oodler/client.rb CHANGED
@@ -40,9 +40,9 @@ module Oodler
40
40
 
41
41
  #specify the :location key for city search, i.e :location=>"Houston, Tx"
42
42
  def usa_job_search(options)
43
- options= {:query =>options}
44
- options[:query].merge!({:region => "usa"})
45
- options[:query].merge!({:category => "job"})
43
+ options.merge!({:region => "usa"})
44
+ options.merge!({:category => "job"})
45
+ puts options.inspect
46
46
  self.listing(options)
47
47
  end
48
48
 
@@ -76,10 +76,11 @@ module Oodler
76
76
 
77
77
  def validate_parameters(options)
78
78
  params = options[:query]
79
+ puts options[:query][:region]
79
80
  unless params[:region]
80
- raise OodleArgumentError, 'Missing region paramter. Visit http://developer.oodle.com/regions-list/ for possible regions.'
81
+ raise OodleArgumentError, 'Missing region parameter. Visit http://developer.oodle.com/regions-list/ for possible regions.'
81
82
  end
82
- unless params[:category] || options[:q]
83
+ unless params[:category] || params[:q]
83
84
  raise OodleArgumentError, 'You must supply a category or query parameter. Visit http://developer.oodle.com/categories-list/ for possible categories.'
84
85
  end
85
86
  end
data/test/client_test.rb CHANGED
@@ -129,6 +129,13 @@ class ClientTest < Test::Unit::TestCase
129
129
 
130
130
  end
131
131
 
132
+ should "allow searches using job helper" do
133
+ stub_get("/api/v2/listings?attributes=job_title_software_engineer&region=usa&key=key&category=job", "listings.xml")
134
+ p = @oodler.usa_job_search(:attributes => "job_title_software_engineer")
135
+
136
+ end
137
+
138
+
132
139
 
133
140
 
134
141
 
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.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Hagedorn