blockchain 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ad92df1e084cfe05666bfc1b54bcde999de70dec
4
- data.tar.gz: 2ec38849a086345f5824a654428d38ac4dcbb6e5
3
+ metadata.gz: 4193c8aabe734dcf81c6356075cf87386cd51070
4
+ data.tar.gz: 81f8e277ef65473b209820825f761561a8e30605
5
5
  SHA512:
6
- metadata.gz: 5dc36e728ed3219a0a0c6b72d232932de48a3c6c499faa41e3ac2ef3c57786013c45cf3fa69a7930283c9e0dad976dc256a0b8f229cce0a82dcffa0050266f4f
7
- data.tar.gz: 3aa3343bd6f4aeb6ea26e66ba4dc1f064d86e27f221a9334ce35b801d585c1d9cb70e82ade16845bd22f6b5c3d9a61e792e8382941f699f917b099d175cb1394
6
+ metadata.gz: 344aede4eb0b060f557ca27b6e8446a4b207e80107b21f4b69bd833494dc8d56f2c2f37b4fe69869cc96971e3dfd3caf273e647a018e5f95c5bfa85a2c004b5a
7
+ data.tar.gz: 9dfa8c9400e40dddbd4da2247286a605867104283e5aca0ad9da6f2eeff2ecfcefbe83c2a10842ac284deb195ee28db0db08bb3bbbad4c524d7dea1ec422aaee
@@ -26,7 +26,12 @@ module Blockchain
26
26
 
27
27
  request = nil
28
28
  if method == 'get'
29
- url.query = data.nil? ? nil : URI.encode_www_form(data)
29
+ if url.request_uri != '/v2/receive'
30
+ url.query = data.nil? ? nil : URI.encode_www_form(data)
31
+ elsif
32
+ url.query = ""
33
+ data.each { |k,v| url.query << "#{k}=#{v}&" }
34
+ end
30
35
  request = Net::HTTP::Get.new(url.request_uri)
31
36
  elsif method == 'post'
32
37
  request = Net::HTTP::Post.new(url.request_uri)
@@ -52,5 +57,4 @@ module Blockchain
52
57
  return response.body
53
58
  end
54
59
  end
55
-
56
60
  end
@@ -74,10 +74,10 @@ module Blockchain
74
74
  attr_reader :index
75
75
  attr_reader :callback_url
76
76
 
77
- def initialize(address, index, callback)
78
- @address = address
79
- @index = index
80
- @callback_url = callback
77
+ def initialize(r)
78
+ @address = r['address']
79
+ @index = r['index']
80
+ @callback_url = r['callback']
81
81
  end
82
82
  end
83
83
 
@@ -87,11 +87,11 @@ module Blockchain
87
87
  attr_reader :raw_response
88
88
  attr_reader :response_code
89
89
 
90
- def initialize(callback_url, called_at, raw_response, response_code)
91
- @callback_url = callback_url
92
- @called_at = called_at
93
- @raw_response = raw_response
94
- @response_code = response_code
90
+ def initialize(r)
91
+ @callback_url = r['callback_url']
92
+ @called_at = r['called_at']
93
+ @raw_response = r['raw_response']
94
+ @response_code = ['response_code']
95
95
  end
96
96
  end
97
97
  end
@@ -1,3 +1,3 @@
1
1
  module Blockchain
2
- VERSION = "3.0.0"
2
+ VERSION = "3.0.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blockchain
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blockchain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-26 00:00:00.000000000 Z
11
+ date: 2017-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  version: '0'
94
94
  requirements: []
95
95
  rubyforge_project:
96
- rubygems_version: 2.5.1
96
+ rubygems_version: 2.6.11
97
97
  signing_key:
98
98
  specification_version: 4
99
99
  summary: Blockchain API library (Ruby, v1)