bitpay-sdk 2.4.1 → 2.4.2
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/bitpay/rest_connector.rb +2 -1
- data/lib/bitpay/version.rb +1 -1
- data/spec/client_spec.rb +7 -0
- metadata +2 -3
- data/bitpay-sdk-2.4.0.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 23d0eaf35772b8730fa1fa237052df27ac12c91c
|
|
4
|
+
data.tar.gz: 5d5c43a56d3302bf6e9b39826f6bd4c2eb28b57f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d98a7d9382a372c1724cf595297bc6212c46a5ad6d188c299cbf2e6831172a9a12d78a9ea4bcc8100910c8dc22b858c86590b6f7c0889a07ebceaa0812ea5091
|
|
7
|
+
data.tar.gz: 11d777f508beea52465341d1d4904d2c43a5d0cc8a39d8f5febf880d48c7fa7901d16b6a9f5f093b42f4356698d6910acffc1c7c829339097e4de3d36852ebbf
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
|
4
4
|
|
|
5
|
+
## [2.4.2] - 2015-03-11
|
|
6
|
+
### Fixed
|
|
7
|
+
- GitHub issue 39: handling post paths that include a ? and require a token. A workaround exists for this issue.
|
|
8
|
+
|
|
5
9
|
## [2.4.1] - 2015-03-11
|
|
6
10
|
### Fixed
|
|
7
11
|
- GitHub issue 40: error for endpoints that did not return a 'data' field
|
|
@@ -18,7 +18,8 @@ module BitPay
|
|
|
18
18
|
|
|
19
19
|
def get(path:, token: nil, public: false)
|
|
20
20
|
urlpath = '/' + path
|
|
21
|
-
|
|
21
|
+
token_prefix = if urlpath.include? '?' then '&token=' else '?token=' end
|
|
22
|
+
urlpath = urlpath + token_prefix + token if token
|
|
22
23
|
request = Net::HTTP::Get.new urlpath
|
|
23
24
|
unless public
|
|
24
25
|
request['X-Signature'] = KeyUtils.sign(@uri.to_s + urlpath, @priv_key)
|
data/lib/bitpay/version.rb
CHANGED
data/spec/client_spec.rb
CHANGED
|
@@ -61,6 +61,13 @@ describe BitPay::SDK::Client do
|
|
|
61
61
|
bitpay_client.send_request("GET", "whatever", facade: "merchant")
|
|
62
62
|
expect(WebMock).to have_requested(:get, "#{BitPay::TEST_API_URI}/whatever?token=MERCHANT_TOKEN")
|
|
63
63
|
end
|
|
64
|
+
|
|
65
|
+
it 'should handle query parameters gracefully' do
|
|
66
|
+
stub_request(:get, /#{BitPay::TEST_API_URI}\/ledgers.*/).to_return(:body => '{"awesome": "json"}')
|
|
67
|
+
bitpay_client.send_request("GET", "ledgers/BTC?startDate=2015-01-01&endDate=2015-02-01", facade: "merchant")
|
|
68
|
+
expect(WebMock).to have_requested(:get, "#{BitPay::TEST_API_URI}/ledgers/BTC?startDate=2015-01-01&endDate=2015-02-01&token=MERCHANT_TOKEN")
|
|
69
|
+
end
|
|
70
|
+
|
|
64
71
|
end
|
|
65
72
|
|
|
66
73
|
context "POST" do
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bitpay-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.4.
|
|
4
|
+
version: 2.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bitpay, Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-03-
|
|
11
|
+
date: 2015-03-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|
|
@@ -221,7 +221,6 @@ files:
|
|
|
221
221
|
- LICENSE.md
|
|
222
222
|
- README.md
|
|
223
223
|
- Rakefile
|
|
224
|
-
- bitpay-sdk-2.4.0.gem
|
|
225
224
|
- bitpay-sdk.gemspec
|
|
226
225
|
- config/capybara.rb
|
|
227
226
|
- config/constants.rb
|
data/bitpay-sdk-2.4.0.gem
DELETED
|
Binary file
|