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 +4 -4
- data/lib/blockchain/client.rb +6 -2
- data/lib/blockchain/receive.rb +9 -9
- data/lib/blockchain/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4193c8aabe734dcf81c6356075cf87386cd51070
|
4
|
+
data.tar.gz: 81f8e277ef65473b209820825f761561a8e30605
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 344aede4eb0b060f557ca27b6e8446a4b207e80107b21f4b69bd833494dc8d56f2c2f37b4fe69869cc96971e3dfd3caf273e647a018e5f95c5bfa85a2c004b5a
|
7
|
+
data.tar.gz: 9dfa8c9400e40dddbd4da2247286a605867104283e5aca0ad9da6f2eeff2ecfcefbe83c2a10842ac284deb195ee28db0db08bb3bbbad4c524d7dea1ec422aaee
|
data/lib/blockchain/client.rb
CHANGED
@@ -26,7 +26,12 @@ module Blockchain
|
|
26
26
|
|
27
27
|
request = nil
|
28
28
|
if method == 'get'
|
29
|
-
url.
|
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
|
data/lib/blockchain/receive.rb
CHANGED
@@ -74,10 +74,10 @@ module Blockchain
|
|
74
74
|
attr_reader :index
|
75
75
|
attr_reader :callback_url
|
76
76
|
|
77
|
-
def initialize(
|
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(
|
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
|
data/lib/blockchain/version.rb
CHANGED
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.
|
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-
|
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.
|
96
|
+
rubygems_version: 2.6.11
|
97
97
|
signing_key:
|
98
98
|
specification_version: 4
|
99
99
|
summary: Blockchain API library (Ruby, v1)
|