dwolla_v2 1.2.3 → 2.0.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: 34a0ab11784cf99dad83b2824e127eaf693e7710
4
- data.tar.gz: c3deb851a0049d8049ce875fd93d28e545e13b88
3
+ metadata.gz: e574c96fed50363e9fcdec5288f31df261b25a1b
4
+ data.tar.gz: 2080ba7cda54511bfd2c692db0795acdb99f0348
5
5
  SHA512:
6
- metadata.gz: 214d05d8ea57d8321a3d83fb1788601476e23622bf1c5a9bc5086def918f888f928b5cd6c7ef0a1575928daaefe24b05db14d5c10ef146f0da94fa9091e751aa
7
- data.tar.gz: 01d63051c44748a2ed97ca3c91f573c8b14dbc21a6506b7b9cad2d45d3d8996d4bde14c32039879eaa019d15dcd1852e7c952cdf1fade55fdd7aa51e8f8b3fca
6
+ metadata.gz: 810a4d8b011ce4bb027c79be84601c88e7934ea4a8e6180f7c6390c94d3831a3982ab92dd4b5ac0b9a8dd08fb65774182d8088d5459e0093b34e098168258a28
7
+ data.tar.gz: 9d152fde10b2c8b990b518ac7179d6d00bdeb646e41c781ba4f615e27c3d016c1696c62d2404721e1cfa054fc70b067907737796ab53a07bd8086f50ddb3ca8e
@@ -13,5 +13,7 @@ before_install: gem install bundler -v 1.11.2
13
13
 
14
14
  matrix:
15
15
  allow_failures:
16
+ - rvm: 1.9.3
16
17
  - rvm: rbx-2
18
+ - rvm: jruby
17
19
  fast_finish: true
data/README.md CHANGED
@@ -11,7 +11,7 @@ Dwolla V2 Ruby client. For the V1 Ruby client see [Dwolla/dwolla-ruby](https://g
11
11
  Add this line to your application's Gemfile:
12
12
 
13
13
  ```ruby
14
- gem 'dwolla_v2', '~> 1.2'
14
+ gem 'dwolla_v2', '~> 2.0'
15
15
  ```
16
16
 
17
17
  And then execute:
@@ -241,12 +241,12 @@ Requests return a `DwollaV2::Response`.
241
241
 
242
242
  ```ruby
243
243
  res = token.get "/"
244
- # => #<DwollaV2::Response status=200 headers={"server"=>"cloudflare-nginx", "date"=>"Mon, 28 Mar 2016 15:30:23 GMT", "content-type"=>"application/vnd.dwolla.v1.hal+json; charset=UTF-8", "content-length"=>"150", "connection"=>"close", "set-cookie"=>"__cfduid=d9dcd0f586c166d36cbd45b992bdaa11b1459179023; expires=Tue, 28-Mar-17 15:30:23 GMT; path=/; domain=.dwolla.com; HttpOnly", "x-request-id"=>"69a4e612-5dae-4c52-a6a0-2f921e34a88a", "cf-ray"=>"28ac1f81875941e3-MSP"} {"_links"=>{"events"=>{"href"=>"https://api-sandbox.dwolla.com/events"}, "webhook-subscriptions"=>{"href"=>"https://api-sandbox.dwolla.com/webhook-subscriptions"}}}>
244
+ # => #<DwollaV2::Response response_status=200 response_headers={"server"=>"cloudflare-nginx", "date"=>"Mon, 28 Mar 2016 15:30:23 GMT", "content-type"=>"application/vnd.dwolla.v1.hal+json; charset=UTF-8", "content-length"=>"150", "connection"=>"close", "set-cookie"=>"__cfduid=d9dcd0f586c166d36cbd45b992bdaa11b1459179023; expires=Tue, 28-Mar-17 15:30:23 GMT; path=/; domain=.dwolla.com; HttpOnly", "x-request-id"=>"69a4e612-5dae-4c52-a6a0-2f921e34a88a", "cf-ray"=>"28ac1f81875941e3-MSP"} {"_links"=>{"events"=>{"href"=>"https://api-sandbox.dwolla.com/events"}, "webhook-subscriptions"=>{"href"=>"https://api-sandbox.dwolla.com/webhook-subscriptions"}}}>
245
245
 
246
- res.status
246
+ res.response_status
247
247
  # => 200
248
248
 
249
- res.headers
249
+ res.response_headers
250
250
  # => {"server"=>"cloudflare-nginx", "date"=>"Mon, 28 Mar 2016 15:30:23 GMT", "content-type"=>"application/vnd.dwolla.v1.hal+json; charset=UTF-8", "content-length"=>"150", "connection"=>"close", "set-cookie"=>"__cfduid=d9dcd0f586c166d36cbd45b992bdaa11b1459179023; expires=Tue, 28-Mar-17 15:30:23 GMT; path=/; domain=.dwolla.com; HttpOnly", "x-request-id"=>"69a4e612-5dae-4c52-a6a0-2f921e34a88a", "cf-ray"=>"28ac1f81875941e3-MSP"}
251
251
 
252
252
  res._links.events.href
@@ -263,12 +263,12 @@ begin
263
263
  token.get "/not-found"
264
264
  rescue DwollaV2::NotFoundError => e
265
265
  e
266
- # => #<DwollaV2::NotFoundError status=404 headers={"server"=>"cloudflare-nginx", "date"=>"Mon, 28 Mar 2016 15:35:32 GMT", "content-type"=>"application/vnd.dwolla.v1.hal+json; profile=\"http://nocarrier.co.uk/profiles/vnd.error/\"; charset=UTF-8", "content-length"=>"69", "connection"=>"close", "set-cookie"=>"__cfduid=da1478bfdf3e56275cd8a6a741866ccce1459179332; expires=Tue, 28-Mar-17 15:35:32 GMT; path=/; domain=.dwolla.com; HttpOnly", "access-control-allow-origin"=>"*", "x-request-id"=>"667fca74-b53d-43db-bddd-50426a011881", "cf-ray"=>"28ac270abca64207-MSP"} {"code"=>"NotFound", "message"=>"The requested resource was not found."}>
266
+ # => #<DwollaV2::NotFoundError response_status=404 response_headers={"server"=>"cloudflare-nginx", "date"=>"Mon, 28 Mar 2016 15:35:32 GMT", "content-type"=>"application/vnd.dwolla.v1.hal+json; profile=\"http://nocarrier.co.uk/profiles/vnd.error/\"; charset=UTF-8", "content-length"=>"69", "connection"=>"close", "set-cookie"=>"__cfduid=da1478bfdf3e56275cd8a6a741866ccce1459179332; expires=Tue, 28-Mar-17 15:35:32 GMT; path=/; domain=.dwolla.com; HttpOnly", "access-control-allow-origin"=>"*", "x-request-id"=>"667fca74-b53d-43db-bddd-50426a011881", "cf-ray"=>"28ac270abca64207-MSP"} {"code"=>"NotFound", "message"=>"The requested resource was not found."}>
267
267
 
268
- e.status
268
+ e.response_status
269
269
  # => 404
270
270
 
271
- e.headers
271
+ e.response_headers
272
272
  # => {"server"=>"cloudflare-nginx", "date"=>"Mon, 28 Mar 2016 15:35:32 GMT", "content-type"=>"application/vnd.dwolla.v1.hal+json; profile=\"http://nocarrier.co.uk/profiles/vnd.error/\"; charset=UTF-8", "content-length"=>"69", "connection"=>"close", "set-cookie"=>"__cfduid=da1478bfdf3e56275cd8a6a741866ccce1459179332; expires=Tue, 28-Mar-17 15:35:32 GMT; path=/; domain=.dwolla.com; HttpOnly", "access-control-allow-origin"=>"*", "x-request-id"=>"667fca74-b53d-43db-bddd-50426a011881", "cf-ray"=>"28ac270abca64207-MSP"}
273
273
 
274
274
  e.code
@@ -334,6 +334,10 @@ The gem is available as open source under the terms of the [MIT License](https:/
334
334
 
335
335
  ## Changelog
336
336
 
337
+ - **2.0.0**
338
+ - Rename `DwollaV2::Response` `#status` => `#response_status`, `#headers` => `#response_headers` to prevent
339
+ [conflicts with response body properties][response-conflicts].
340
+ - Remove support for Ruby versions < 2 ([Bump public_suffix dependency version][public-suffix]).
337
341
  - **1.2.3** - Implement `#empty?` on `DwollaV2::Token` to allow it to be passed to ActiveRecord constructor.
338
342
  - **1.2.2** - Strip domain from URLs provided to `token.*` methods.
339
343
  - **1.2.1** - Update sandbox URLs from uat => sandbox.
@@ -348,3 +352,6 @@ The gem is available as open source under the terms of the [MIT License](https:/
348
352
  - **0.3.0** - ISO8601 values in response body are converted to `Time` objects
349
353
  - **0.2.0** - Works with `attr_encrypted`
350
354
  - **0.1.1** - Handle 500 error with HTML response body when requesting a token
355
+
356
+ [response-conflicts]: https://discuss.dwolla.com/t/document-change-or-more-clarifiation/3964
357
+ [public-suffix]: https://github.com/Dwolla/dwolla-v2-ruby/pull/18#discussion_r108028135
@@ -24,7 +24,6 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency "rspec", "~> 3.0"
25
25
  spec.add_development_dependency "webmock", "~> 1.22"
26
26
 
27
- spec.add_dependency "public_suffix", "~> 1.4.6"
28
27
  spec.add_dependency "hashie", "~> 3.4"
29
28
  spec.add_dependency "faraday", "~> 0.9"
30
29
  spec.add_dependency "faraday_middleware", "~> 0.10"
@@ -2,14 +2,17 @@ module DwollaV2
2
2
  class Response
3
3
  extend Forwardable
4
4
 
5
- delegate [:status] => :@response
6
5
  delegate [:to_s, :to_json] => :response_body
7
6
 
8
7
  def initialize response
9
8
  @response = response
10
9
  end
11
10
 
12
- def headers
11
+ def response_status
12
+ @response.status
13
+ end
14
+
15
+ def response_headers
13
16
  if @response.respond_to? :response_headers
14
17
  @response.response_headers
15
18
  elsif @response.respond_to? :headers
@@ -42,7 +45,11 @@ module DwollaV2
42
45
  end
43
46
 
44
47
  def inspect
45
- Util.pretty_inspect self.class.name, { status: status, headers: headers }, response_body
48
+ Util.pretty_inspect(
49
+ self.class.name,
50
+ { response_status: status, response_headers: headers },
51
+ response_body
52
+ )
46
53
  end
47
54
 
48
55
  private
@@ -1,3 +1,3 @@
1
1
  module DwollaV2
2
- VERSION = "1.2.3"
2
+ VERSION = "2.0.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dwolla_v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Ausman
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-09 00:00:00.000000000 Z
11
+ date: 2017-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -66,20 +66,6 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.22'
69
- - !ruby/object:Gem::Dependency
70
- name: public_suffix
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 1.4.6
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: 1.4.6
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: hashie
85
71
  requirement: !ruby/object:Gem::Requirement