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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2a2785fa846dc9f20ccf3182be415da192ab0d7c
4
- data.tar.gz: e20b1f1b80be6e339d8d3f736c642f09ad38a58a
3
+ metadata.gz: 38a2da640c3e6eb29cc6bcee4d023d9edf46758e
4
+ data.tar.gz: bfc6373a17c3e2929ea3906e28d008a1b46afb2d
5
5
  SHA512:
6
- metadata.gz: 3f2b6b13d4ef46bb59341526715ce88bebe0ba1058f3914b0e4c8ed24b458277e637e0c7b5d345d32bdf17653095336ad07409565fc2bcec7fb8c21a9900b7c5
7
- data.tar.gz: cc5a52df9d85050c486ebb7a4f4ab71c183ecdf52bb05cc3882fb141144bc5a7316784d1b700ba813dafbbdfd3918d047d3f33847c961de8d9bc01c23d07d3be
6
+ metadata.gz: 6c973ef33ad5eeaa72e363b9d3da4338196790b5bb0a324707832e5def65d91bc85d9ad0e47c8d3df62f004aa8f161e7d820bbbe8b64f3129c564370cd7d1957
7
+ data.tar.gz: f302ee5aab385b190fd768185cf67cb8ffed77e429dd0fe175500f7887a7ecf93d601abdb9865eb2f840d023c54625d7f0276ef39560c8ccc26d5e60eb4aab95
@@ -3,6 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
  require "bitcoin/version"
4
4
 
5
5
  Gem::Specification.new do |s|
6
+ s.licenses = [ 'MIT' ]
6
7
  s.name = "bitcoin-client"
7
8
  s.version = Bitcoin::VERSION
8
9
  s.authors = ["Colin MacKenzie IV"]
@@ -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
@@ -2,7 +2,7 @@ module Bitcoin
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- PATCH = 2
5
+ PATCH = 3
6
6
  REL = nil
7
7
 
8
8
  STRING = REL ? [MAJOR, MINOR, PATCH, REL].join('.') : [MAJOR, MINOR, PATCH].join('.')
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.2
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-05 00:00:00.000000000 Z
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.0.3
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.