ohanakapa 1.0.0 → 1.1.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6afd9df44e4e14d0effab2bd786c6403b0bacb8d
4
- data.tar.gz: 67e060430cb70d065cb082eecc7fd4d843831417
3
+ metadata.gz: f3dc2037112405c99660c1a03040bb39ce29e74b
4
+ data.tar.gz: cf2d9c1c4a5d524fe8669259ea6dd26db6644daa
5
5
  SHA512:
6
- metadata.gz: 6cc26a543d2d073213bebb5d47efeb957670feb0e37c7b4e28dcc6c4bca1d534b402ac5027f8e4fede437ebe5b5f42c947d17ec4645470baa1a4d10ce634f5f6
7
- data.tar.gz: 89fefdb5dec09c5116a98ba899c6e990e75d04c591b1c9d9caab39265d1c9ba75280a50a15307800911e9b130c8f34cf5df8f9e4f67c6b0a0f836596a6fd25ee
6
+ metadata.gz: fe1468104ade4defe0daf288e93fed46517fabf7bd517de190bb079ebc6036f85e35d12c338a6a2c27a6d08123dea18cd59acb036f202f65a85a21b2ea1f0dfb
7
+ data.tar.gz: 396f8b64fc298821dc7be14e177615726b2230c6974289bcb2c500f9961d0399e7856c2c56d9f74beef3adee3855b0af4ebd466ae0762e7d8f25ece5394068bd
@@ -57,7 +57,7 @@ module Ohanakapa
57
57
  # @option options [String] :kind
58
58
  # @return [Sawyer::Resource]
59
59
  # @example
60
- # Ohanakapa.location("521d33a01974fcdb2b0036a9", :kind => "entertainment")
60
+ # Ohanakapa.update_location("521d33a01974fcdb2b0036a9", :kind => "entertainment")
61
61
  def update_location(id, options)
62
62
  put "locations/#{id}", :query => options
63
63
  end
@@ -24,7 +24,7 @@ module Ohanakapa
24
24
  end
25
25
  when 404 then Ohanakapa::NotFound
26
26
  when 406 then Ohanakapa::NotAcceptable
27
- #when 422 then Ohanakapa::UnprocessableEntity
27
+ when 422 then Ohanakapa::UnprocessableEntity
28
28
  when 500 then Ohanakapa::InternalServerError
29
29
  when 501 then Ohanakapa::NotImplemented
30
30
  when 502 then Ohanakapa::BadGateway
@@ -2,5 +2,5 @@ module Ohanakapa
2
2
 
3
3
  # Current version
4
4
  # @return [String]
5
- VERSION = "1.0.0".freeze
5
+ VERSION = "1.1.0".freeze
6
6
  end
@@ -20,7 +20,7 @@ describe Ohanakapa::Client::Categories do
20
20
  cat_ids = ['52280f5c1edd37edff000001', '52280f5c1edd37edff000003']
21
21
  service = @client.replace_all_categories(service_id, cat_ids)
22
22
  expect(service.name).to match /CalFresh Application Assistance/
23
- assert_requested :put, ohana_url("/services/#{service_id}/categories?api_token=5f996ce5c431a14c99419116a50a6b62&category_ids%5B0%5D=52280f5c1edd37edff000001&category_ids%5B1%5D=52280f5c1edd37edff000003")
23
+ assert_requested :put, ohana_url("/services/#{service_id}/categories?api_token=#{test_api_token}&category_ids%5B0%5D=52280f5c1edd37edff000001&category_ids%5B1%5D=52280f5c1edd37edff000003")
24
24
  end
25
25
  end # .replace_all_categories
26
26
 
@@ -13,7 +13,7 @@ describe Ohanakapa::Client::Categories do
13
13
  keywords = ['apitest', 'sandbox']
14
14
  service = @client.add_keywords_to_a_service(service_id, keywords)
15
15
  expect(service.name).to match /CalFresh Application Assistance/
16
- assert_requested :post, ohana_url("/services/#{service_id}/keywords?api_token=5f996ce5c431a14c99419116a50a6b62&keywords%5B0%5D=apitest&keywords%5B1%5D=sandbox")
16
+ assert_requested :post, ohana_url("/services/#{service_id}/keywords?api_token=#{test_api_token}&keywords%5B0%5D=apitest&keywords%5B1%5D=sandbox")
17
17
  end
18
18
  end # .add_keywords_to_a_service
19
19
 
@@ -34,7 +34,7 @@ describe Ohanakapa::Client::Locations do
34
34
  it "updates a location's attributes" do
35
35
  location = @client.update_location("521d33a01974fcdb2b0036a9", :kind => "entertainment")
36
36
  expect(location.kind).to eq "Entertainment"
37
- assert_requested :put, ohana_url("/locations/#{location.id}?api_token=5f996ce5c431a14c99419116a50a6b62&kind=entertainment")
37
+ assert_requested :put, ohana_url("/locations/#{location.id}?api_token=#{test_api_token}&kind=entertainment")
38
38
  end
39
39
  end # .update_location
40
40
 
@@ -255,7 +255,7 @@ describe Ohanakapa::Client do
255
255
  expect { Ohanakapa.get('boom') }.to raise_error Ohanakapa::InternalServerError
256
256
  end
257
257
 
258
- xit "includes a message" do
258
+ it "includes a message" do
259
259
  stub_get('/boom').
260
260
  to_return \
261
261
  :status => 422,
@@ -303,7 +303,7 @@ describe Ohanakapa::Client do
303
303
  end
304
304
  end
305
305
 
306
- xit "includes an error" do
306
+ it "includes an error" do
307
307
  stub_get('/boom').
308
308
  to_return \
309
309
  :status => 422,
@@ -315,11 +315,11 @@ describe Ohanakapa::Client do
315
315
  Ohanakapa.get('boom')
316
316
  rescue Ohanakapa::UnprocessableEntity => e
317
317
  expect(e.message).to include \
318
- "GET http://ohanapi.herokuapp.com/api/boom: 422 - No location found"
318
+ "GET http://ohanapi.herokuapp.com/api/boom: 422 - Error: No location found"
319
319
  end
320
320
  end
321
321
 
322
- xit "includes an error summary" do
322
+ it "includes an error summary" do
323
323
  stub_get('/boom').
324
324
  to_return \
325
325
  :status => 422,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ohanakapa
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anselm Bradford
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-14 00:00:00.000000000 Z
12
+ date: 2014-06-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sawyer
@@ -46,22 +46,22 @@ executables: []
46
46
  extensions: []
47
47
  extra_rdoc_files: []
48
48
  files:
49
+ - lib/ohanakapa.rb
49
50
  - lib/ohanakapa/arguments.rb
50
51
  - lib/ohanakapa/authentication.rb
52
+ - lib/ohanakapa/client.rb
51
53
  - lib/ohanakapa/client/categories.rb
52
54
  - lib/ohanakapa/client/keywords.rb
53
55
  - lib/ohanakapa/client/locations.rb
54
56
  - lib/ohanakapa/client/organizations.rb
55
57
  - lib/ohanakapa/client/rate_limit.rb
56
58
  - lib/ohanakapa/client/search.rb
57
- - lib/ohanakapa/client.rb
58
59
  - lib/ohanakapa/configurable.rb
59
60
  - lib/ohanakapa/default.rb
60
61
  - lib/ohanakapa/error.rb
61
62
  - lib/ohanakapa/rate_limit.rb
62
63
  - lib/ohanakapa/response/raise_error.rb
63
64
  - lib/ohanakapa/version.rb
64
- - lib/ohanakapa.rb
65
65
  - spec/cassettes/Ohanakapa_Client/_get/handles_query_params.json
66
66
  - spec/cassettes/Ohanakapa_Client/_head/handles_query_params.json
67
67
  - spec/cassettes/Ohanakapa_Client/_last_response/caches_the_last_agent_response.json
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
110
  version: 1.3.5
111
111
  requirements: []
112
112
  rubyforge_project:
113
- rubygems_version: 2.0.3
113
+ rubygems_version: 2.2.2
114
114
  signing_key:
115
115
  specification_version: 4
116
116
  summary: A Ruby wrapper for the Ohana API.