ohanakapa 1.1.2 → 1.1.3

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.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ohanakapa/default.rb +6 -10
  3. data/lib/ohanakapa/version.rb +1 -1
  4. data/spec/cassettes/Ohanakapa_Client/_get/handles_query_params.json +1 -1
  5. data/spec/cassettes/Ohanakapa_Client/_head/handles_query_params.json +1 -1
  6. data/spec/cassettes/Ohanakapa_Client/_last_response/caches_the_last_agent_response.json +1 -1
  7. data/spec/cassettes/Ohanakapa_Client/auto_pagination/fetches_all_the_pages.json +1 -1
  8. data/spec/cassettes/Ohanakapa_Client_Categories/_categories/returns_all_categories.json +1 -1
  9. data/spec/cassettes/Ohanakapa_Client_Categories/_replace_all_categories/replaces_all_categories_for_a_service.json +1 -1
  10. data/spec/cassettes/Ohanakapa_Client_Locations/_location/returns_an_location.json +1 -1
  11. data/spec/cassettes/Ohanakapa_Client_Locations/_locations/returns_all_locations.json +1 -1
  12. data/spec/cassettes/Ohanakapa_Client_Locations/_nearby/returns_locations_near_the_queried_location.json +1 -1
  13. data/spec/cassettes/Ohanakapa_Client_Locations/_update_location/updates_a_location_s_attributes.json +1 -1
  14. data/spec/cassettes/Ohanakapa_Client_Organizations/_organization/returns_an_organization.json +1 -1
  15. data/spec/cassettes/Ohanakapa_Client_Organizations/_organizations/returns_all_organizations.json +1 -1
  16. data/spec/cassettes/Ohanakapa_Client_Search/_search/searches_for_keyword_food_and_language_Spanish_.json +1 -1
  17. data/spec/cassettes/Ohanakapa_Client_Search/_search/searches_for_keyword_market_.json +1 -1
  18. data/spec/cassettes/Ohanakapa_Client_Search/_search/searches_for_location_san_mateo_ca_.json +1 -1
  19. data/spec/cassettes/root.json +1 -1
  20. data/spec/ohanakapa/client/categories_spec.rb +12 -10
  21. data/spec/ohanakapa/client/locations_spec.rb +22 -18
  22. data/spec/ohanakapa/client/organizations_spec.rb +8 -7
  23. data/spec/ohanakapa/client_spec.rb +159 -128
  24. data/spec/spec_helper.rb +13 -15
  25. metadata +11 -16
  26. data/spec/cassettes/Ohanakapa_Client/authentication/when_application_authenticated/makes_authenticated_calls.json +0 -1
  27. data/spec/cassettes/Ohanakapa_Client_Categories/_add_keywords_to_a_service/adds_keywords_to_a_given_service.json +0 -1
@@ -12,21 +12,19 @@ require 'ohanakapa'
12
12
  require 'rspec'
13
13
  require 'webmock/rspec'
14
14
 
15
- WebMock.disable_net_connect!(:allow => 'coveralls.io')
15
+ WebMock.disable_net_connect!(allow: 'coveralls.io')
16
16
 
17
- RSpec.configure do |config|
18
- config.raise_errors_for_deprecations!
19
- end
17
+ RSpec.configure(&:raise_errors_for_deprecations!)
20
18
 
21
19
  require 'vcr'
22
20
  VCR.configure do |c|
23
21
  c.configure_rspec_metadata!
24
22
 
25
23
  c.default_cassette_options = {
26
- :serialize_with => :json,
27
- :preserve_exact_body_bytes => true,
28
- :decode_compressed_response => true,
29
- :record => ENV['TRAVIS'] ? :none : :once
24
+ serialize_with: :json,
25
+ preserve_exact_body_bytes: true,
26
+ decode_compressed_response: true,
27
+ record: ENV['TRAVIS'] ? :none : :once
30
28
  }
31
29
  c.cassette_library_dir = 'spec/cassettes'
32
30
  c.hook_into :webmock
@@ -61,7 +59,7 @@ def stub_put(url)
61
59
  end
62
60
 
63
61
  def fixture_path
64
- File.expand_path("../fixtures", __FILE__)
62
+ File.expand_path('../fixtures', __FILE__)
65
63
  end
66
64
 
67
65
  def fixture(file)
@@ -70,9 +68,9 @@ end
70
68
 
71
69
  def json_response(file)
72
70
  {
73
- :body => fixture(file),
74
- :headers => {
75
- :content_type => 'application/json; charset=utf-8'
71
+ body: fixture(file),
72
+ headers: {
73
+ content_type: 'application/json; charset=utf-8'
76
74
  }
77
75
  }
78
76
  end
@@ -84,9 +82,9 @@ def ohana_url(url)
84
82
  uri = Addressable::URI.parse(url)
85
83
 
86
84
  uri.to_s
87
- #url =~ /^http/ ? url : "http://ohana-api-demo.herokuapp.com/api#{url}"
85
+ # url =~ /^http/ ? url : "http://ohana-api-demo.herokuapp.com/api#{url}"
88
86
  end
89
87
 
90
88
  def api_token_client
91
- Ohanakapa::Client.new(:api_token => test_api_token)
92
- end
89
+ Ohanakapa::Client.new(api_token: test_api_token)
90
+ end
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.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anselm Bradford
@@ -9,34 +9,34 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-08-22 00:00:00.000000000 Z
12
+ date: 2017-09-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sawyer
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ~>
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: 0.5.3
20
+ version: '0.8'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ~>
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: 0.5.3
27
+ version: '0.8'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: bundler
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ~>
32
+ - - "~>"
33
33
  - !ruby/object:Gem::Version
34
34
  version: '1.0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ~>
39
+ - - "~>"
40
40
  - !ruby/object:Gem::Version
41
41
  version: '1.0'
42
42
  description: A Ruby wrapper for the Ohana API.
@@ -64,9 +64,7 @@ files:
64
64
  - spec/cassettes/Ohanakapa_Client/_get/handles_query_params.json
65
65
  - spec/cassettes/Ohanakapa_Client/_head/handles_query_params.json
66
66
  - spec/cassettes/Ohanakapa_Client/_last_response/caches_the_last_agent_response.json
67
- - spec/cassettes/Ohanakapa_Client/authentication/when_application_authenticated/makes_authenticated_calls.json
68
67
  - spec/cassettes/Ohanakapa_Client/auto_pagination/fetches_all_the_pages.json
69
- - spec/cassettes/Ohanakapa_Client_Categories/_add_keywords_to_a_service/adds_keywords_to_a_given_service.json
70
68
  - spec/cassettes/Ohanakapa_Client_Categories/_categories/returns_all_categories.json
71
69
  - spec/cassettes/Ohanakapa_Client_Categories/_replace_all_categories/replaces_all_categories_for_a_service.json
72
70
  - spec/cassettes/Ohanakapa_Client_Locations/_location/returns_an_location.json
@@ -98,17 +96,17 @@ require_paths:
98
96
  - lib
99
97
  required_ruby_version: !ruby/object:Gem::Requirement
100
98
  requirements:
101
- - - '>='
99
+ - - ">="
102
100
  - !ruby/object:Gem::Version
103
101
  version: 1.9.2
104
102
  required_rubygems_version: !ruby/object:Gem::Requirement
105
103
  requirements:
106
- - - '>='
104
+ - - ">="
107
105
  - !ruby/object:Gem::Version
108
106
  version: 1.3.5
109
107
  requirements: []
110
108
  rubyforge_project:
111
- rubygems_version: 2.2.2
109
+ rubygems_version: 2.5.2
112
110
  signing_key:
113
111
  specification_version: 4
114
112
  summary: A Ruby wrapper for the Ohana API.
@@ -116,9 +114,7 @@ test_files:
116
114
  - spec/cassettes/Ohanakapa_Client/_get/handles_query_params.json
117
115
  - spec/cassettes/Ohanakapa_Client/_head/handles_query_params.json
118
116
  - spec/cassettes/Ohanakapa_Client/_last_response/caches_the_last_agent_response.json
119
- - spec/cassettes/Ohanakapa_Client/authentication/when_application_authenticated/makes_authenticated_calls.json
120
117
  - spec/cassettes/Ohanakapa_Client/auto_pagination/fetches_all_the_pages.json
121
- - spec/cassettes/Ohanakapa_Client_Categories/_add_keywords_to_a_service/adds_keywords_to_a_given_service.json
122
118
  - spec/cassettes/Ohanakapa_Client_Categories/_categories/returns_all_categories.json
123
119
  - spec/cassettes/Ohanakapa_Client_Categories/_replace_all_categories/replaces_all_categories_for_a_service.json
124
120
  - spec/cassettes/Ohanakapa_Client_Locations/_location/returns_an_location.json
@@ -140,4 +136,3 @@ test_files:
140
136
  - spec/ohanakapa/rate_limit_spec.rb
141
137
  - spec/ohanakapa_spec.rb
142
138
  - spec/spec_helper.rb
143
- has_rdoc:
@@ -1 +0,0 @@
1
- {"http_interactions":[{"request":{"method":"get","uri":"http://ohana-api-demo.herokuapp.com/api?api_token=97b4937b385eb63d1f46","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["application/vnd.ohanapi-v1+json"],"User-Agent":["Ohanakapa Ruby Gem 1.1.1"],"X-Api-Token":["97b4937b385eb63d1f46"],"Accept-Encoding":["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Connection":["keep-alive"],"Content-Type":["application/json; charset=utf-8"],"Transfer-Encoding":["chunked"],"Status":["200 OK"],"X-Frame-Options":["SAMEORIGIN"],"X-Xss-Protection":["1; mode=block"],"X-Content-Type-Options":["nosniff"],"Cache-Control":["max-age=0, private, must-revalidate"],"X-Request-Id":["6c01ed0b-4ba5-441c-8c1e-d69323fd3313"],"X-Runtime":["0.003992"],"X-Powered-By":["Phusion Passenger 4.0.48"],"Date":["Fri, 22 Aug 2014 21:13:53 GMT"],"Server":["nginx/1.6.0 + Phusion Passenger 4.0.48"],"Via":["1.1 vegur"]},"body":{"encoding":"UTF-8","base64_string":"eyJvcmdhbml6YXRpb25zX3VybCI6Imh0dHA6Ly9vaGFuYS1hcGktZGVtby5o\nZXJva3VhcHAuY29tL2FwaS9vcmdhbml6YXRpb25zey9vcmdhbml6YXRpb25f\naWR9IiwibG9jYXRpb25zX3VybCI6Imh0dHA6Ly9vaGFuYS1hcGktZGVtby5o\nZXJva3VhcHAuY29tL2FwaS9sb2NhdGlvbnN7L2xvY2F0aW9uX2lkfSIsImxv\nY2F0aW9uX3NlYXJjaF91cmwiOiJodHRwOi8vb2hhbmEtYXBpLWRlbW8uaGVy\nb2t1YXBwLmNvbS9hcGkvc2VhcmNoez9jYXRlZ29yeSxrZXl3b3JkLGxhbmd1\nYWdlLGxhdF9sbmcsbG9jYXRpb24scmFkaXVzLG9yZ19uYW1lfSJ9\n"},"http_version":null},"recorded_at":"Fri, 22 Aug 2014 21:13:53 GMT"}],"recorded_with":"VCR 2.9.2"}
@@ -1 +0,0 @@
1
- {"http_interactions":[{"request":{"method":"post","uri":"http://ohana-api-demo.herokuapp.com/api/services/1/keywords?api_token=Ohana-API-Admin-Demo&keywords%5B0%5D=apitest&keywords%5B1%5D=sandbox","body":{"encoding":"UTF-8","base64_string":"e30=\n"},"headers":{"Accept":["application/vnd.ohanapi-v1+json"],"User-Agent":["Ohanakapa Ruby Gem 1.1.1"],"X-Api-Token":["Ohana-API-Admin-Demo"],"Accept-Encoding":["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"]}},"response":{"status":{"code":404,"message":"Not Found"},"headers":{"Connection":["keep-alive"],"Content-Type":["application/json; charset=utf-8"],"Transfer-Encoding":["chunked"],"Status":["404 Not Found"],"X-Frame-Options":["SAMEORIGIN"],"X-Xss-Protection":["1; mode=block"],"X-Content-Type-Options":["nosniff"],"Cache-Control":["no-cache"],"X-Request-Id":["cca7d607-7c30-4bd3-9883-2b107dc0a608"],"X-Runtime":["0.051177"],"X-Powered-By":["Phusion Passenger 4.0.48"],"Date":["Fri, 22 Aug 2014 21:09:10 GMT"],"Server":["nginx/1.6.0 + Phusion Passenger 4.0.48"],"Via":["1.1 vegur"]},"body":{"encoding":"UTF-8","base64_string":"eyJzdGF0dXMiOjQwNCwibWVzc2FnZSI6IlRoZSByZXF1ZXN0ZWQgcmVzb3Vy\nY2UgY291bGQgbm90IGJlIGZvdW5kLiIsImRvY3VtZW50YXRpb25fdXJsIjoi\naHR0cDovL29oYW5hLWFwaS1kZW1vLmhlcm9rdWFwcC5jb20vZG9jcyJ9\n"},"http_version":null},"recorded_at":"Fri, 22 Aug 2014 21:09:10 GMT"}],"recorded_with":"VCR 2.9.2"}