coinrpc 2.0.0 → 2.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
  SHA256:
3
- metadata.gz: 10cff07aebe3b64ba01cd8c59f50f7db97d455954adaef5813514bb9a4352079
4
- data.tar.gz: 19b5357773239877bed09865571389b1a6897e6f65de2302acfb62ad55c940c1
3
+ metadata.gz: f80efb4ad16cc2494f8c143fa84607c207317cfe0594f086d59fa068a4807072
4
+ data.tar.gz: d9c5104d11491b5495eda5aa23eb275d576ccd5d7e934c79d22309abc81727b5
5
5
  SHA512:
6
- metadata.gz: d95f608c8d69d345f2f72a83344afd6a43ef93d2cb121ae70f29039fe5358589e676c4d6a63c74dcf0e44688d4009f26a3f170d08c87baa4d7e844c21772328c
7
- data.tar.gz: 6c9ca37fb9c28257037476754ef4fd9027191f9a7b48e82299b4e052c958569cb9363b558447b58070d58bac99776cda84e48a35fa60219593b028c3ba57bf62
6
+ metadata.gz: 9dc237a79a5084bb2457faefdf885d49f5c50c5543ffa9f9c65ac0b66d7fa8454559433caae0f92d08c82dbf7124809b8810a815194ac21cd56125f5e35e4fa8
7
+ data.tar.gz: 35f065275ae97da765aee7054ec77836928356d8d2efbd17fdd046f6337d71c6fb6c8ae997258c1fd7c7d60e167c2f5bf52fc1faece9cce387e8d9ba59c1e3ce
data/README.md CHANGED
@@ -6,7 +6,7 @@ A simple client for Bitcoin Core style RPC. Supports batch requests.
6
6
 
7
7
  Add this line to your application's Gemfile:
8
8
 
9
- gem 'coinrpc'
9
+ gem "coinrpc"
10
10
 
11
11
  And then execute:
12
12
 
@@ -19,7 +19,7 @@ Or install it yourself as:
19
19
  ## Usage
20
20
 
21
21
  ```
22
- require 'coinrpc'
22
+ require "coinrpc"
23
23
  client = CoinRPC::Client.new("http://username:password@hostname:port")
24
24
  puts client.getblockchaininfo
25
25
  ```
@@ -27,13 +27,13 @@ Or install it yourself as:
27
27
  Responses will contain coin values as BigDecimals:
28
28
 
29
29
  ```
30
- puts client.getrawtransaction(txid)['vout'].first['value'].to_s("F")
30
+ puts client.getrawtransaction(txid)["vout"].first["value"].to_s("F")
31
31
  ```
32
32
 
33
33
  ## Contributing
34
34
 
35
35
  1. Fork it ( https://github.com/doersf/coinrpc/fork )
36
36
  2. Create your feature branch (`git checkout -b my-new-feature`)
37
- 3. Commit your changes (`git commit -am 'Add some feature'`)
37
+ 3. Commit your changes (`git commit -am "Add some feature"`)
38
38
  4. Push to the branch (`git push origin my-new-feature`)
39
39
  5. Create a new Pull Request
@@ -1,3 +1,3 @@
1
1
  module CoinRPC
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
data/lib/coinrpc.rb CHANGED
@@ -45,7 +45,7 @@ module CoinRPC
45
45
  # this won"t work without Oj.mimic_JSON
46
46
  result = Oj.strict_load(response, :decimal_class => BigDecimal)
47
47
 
48
- raise result["error"]["message"] if result.is_a?(Hash) and result.key?("error")
48
+ raise result["error"]["message"] if result.is_a?(Hash) and !result["error"].nil?
49
49
 
50
50
  if result.is_a?(Hash) then
51
51
  result["result"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coinrpc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Atif Nazir
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-01 00:00:00.000000000 Z
11
+ date: 2022-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler