bitcoin-client 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bitcoin-client.gemspec +1 -0
- data/lib/bitcoin/rpc.rb +5 -5
- data/lib/bitcoin/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38a2da640c3e6eb29cc6bcee4d023d9edf46758e
|
4
|
+
data.tar.gz: bfc6373a17c3e2929ea3906e28d008a1b46afb2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c973ef33ad5eeaa72e363b9d3da4338196790b5bb0a324707832e5def65d91bc85d9ad0e47c8d3df62f004aa8f161e7d820bbbe8b64f3129c564370cd7d1957
|
7
|
+
data.tar.gz: f302ee5aab385b190fd768185cf67cb8ffed77e429dd0fe175500f7887a7ecf93d601abdb9865eb2f840d023c54625d7f0276ef39560c8ccc26d5e60eb4aab95
|
data/bitcoin-client.gemspec
CHANGED
data/lib/bitcoin/rpc.rb
CHANGED
@@ -6,7 +6,7 @@ class Bitcoin::RPC
|
|
6
6
|
@host, @port = options[:host], options[:port]
|
7
7
|
@ssl = options[:ssl]
|
8
8
|
end
|
9
|
-
|
9
|
+
|
10
10
|
def credentials
|
11
11
|
if @user
|
12
12
|
"#{@user}:#{@pass}"
|
@@ -14,22 +14,22 @@ class Bitcoin::RPC
|
|
14
14
|
nil
|
15
15
|
end
|
16
16
|
end
|
17
|
-
|
17
|
+
|
18
18
|
def service_url
|
19
19
|
url = @ssl ? "https://" : "http://"
|
20
20
|
url.concat "#{credentials}@" if c = credentials
|
21
21
|
url.concat "#{@host}:#{@port}"
|
22
22
|
url
|
23
23
|
end
|
24
|
-
|
24
|
+
|
25
25
|
def dispatch(request)
|
26
|
-
RestClient.post(service_url, request.to_post_data) do |respdata, request, result|
|
26
|
+
RestClient.post(service_url, request.to_post_data, content_type: :json) do |respdata, request, result|
|
27
27
|
response = JSON.parse(respdata)
|
28
28
|
raise Bitcoin::Errors::RPCError, response['error'] if response['error']
|
29
29
|
response['result']
|
30
30
|
end
|
31
31
|
end
|
32
|
-
|
32
|
+
|
33
33
|
private
|
34
34
|
def symbolize_keys(hash)
|
35
35
|
case hash
|
data/lib/bitcoin/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bitcoin-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Colin MacKenzie IV
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -147,7 +147,8 @@ files:
|
|
147
147
|
- spec/support/fixtures_helper.rb
|
148
148
|
- spec/support/rpc_service_helper.rb
|
149
149
|
homepage: http://github.com/sinisterchipmunk/bitcoin-client
|
150
|
-
licenses:
|
150
|
+
licenses:
|
151
|
+
- MIT
|
151
152
|
metadata: {}
|
152
153
|
post_install_message:
|
153
154
|
rdoc_options: []
|
@@ -165,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
166
|
version: '0'
|
166
167
|
requirements: []
|
167
168
|
rubyforge_project: bitcoin-client
|
168
|
-
rubygems_version: 2.
|
169
|
+
rubygems_version: 2.1.11
|
169
170
|
signing_key:
|
170
171
|
specification_version: 4
|
171
172
|
summary: Provides a Ruby library to the complete Bitcoin JSON-RPC API.
|