bit_wallet 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. checksums.yaml +8 -8
  2. data/CHANGELOG.md +4 -0
  3. data/bit_wallet.gemspec +1 -1
  4. data/lib/bit_wallet/version.rb +1 -1
  5. data/lib/bit_wallet/wallet.rb +0 -2
  6. data/spec/bit_wallet/accounts_spec.rb +32 -30
  7. data/spec/bit_wallet/wallet_spec.rb +48 -32
  8. data/spec/fixtures/vcr_cassettes/BitWallet_Account/_balance/should_be_able_to_override_the_min_conf.yml +15 -83
  9. data/spec/fixtures/vcr_cassettes/BitWallet_Account/_balance/should_default_to_the_config_min_conf.yml +15 -83
  10. data/spec/fixtures/vcr_cassettes/BitWallet_Account/_balance/should_return_the_balance_of_the_account.yml +23 -87
  11. data/spec/fixtures/vcr_cassettes/BitWallet_Account/_recent_transactions/should_default_to_list_10_transactions.yml +85 -129
  12. data/spec/fixtures/vcr_cassettes/BitWallet_Account/_recent_transactions/when_transaction_limit_is_6/should_list_the_6_most_recent_transactions.yml +67 -117
  13. data/spec/fixtures/vcr_cassettes/BitWallet_Account/_send_amount/_to_is_a_BitWallet_Address/should_send_it_to_the_address_of_the_given_BitWallet_Address.yml +32 -94
  14. data/spec/fixtures/vcr_cassettes/BitWallet_Account/_send_amount/account_does_not_have_enough_money/should_fail_with_the_InsufficientFunds_error.yml +26 -90
  15. data/spec/fixtures/vcr_cassettes/BitWallet_Account/_send_amount/should_send_money_to_the_given_address.yml +29 -91
  16. data/spec/fixtures/vcr_cassettes/BitWallet_Account/_send_many/should_send_the_amounts_of_money_to_the_specified_accounts.yml +30 -16
  17. data/spec/fixtures/vcr_cassettes/BitWallet_Account/_total_received/should_return_the_total_amount_received_by_the_address.yml +6 -4
  18. data/spec/fixtures/vcr_cassettes/BitWallet_Account/addresses/.yml +6 -4
  19. data/spec/fixtures/vcr_cassettes/BitWallet_Account/on_initialization/should_be_assigned_that_name.yml +15 -83
  20. data/spec/fixtures/vcr_cassettes/BitWallet_Account/on_initialization/should_have_a_default_name.yml +6 -4
  21. data/spec/fixtures/vcr_cassettes/BitWallet_Account/on_initialization/when_the_account_name_already_exists/should_return_that_same_address.yml +15 -83
  22. data/spec/fixtures/vcr_cassettes/BitWallet_Account/wallet/.yml +6 -4
  23. data/spec/fixtures/vcr_cassettes/BitWallet_Accounts/_includes_account_name_account_/should_return_true_if_the_array_includes_the_account.yml +15 -120
  24. data/spec/fixtures/vcr_cassettes/BitWallet_Accounts/_new/should_create_a_new_BitWallet_Account_with_a_default_address.yml +15 -120
  25. data/spec/fixtures/vcr_cassettes/BitWallet_Accounts/_with_balance/should_return_accounts_with_a_balance_0.yml +19 -370
  26. data/spec/fixtures/vcr_cassettes/BitWallet_Accounts/wallet/.yml +11 -118
  27. data/spec/fixtures/vcr_cassettes/BitWallet_Address/_total_received/should_return_the_total_amount_received_by_the_address.yml +11 -7
  28. data/spec/fixtures/vcr_cassettes/BitWallet_Address/account/.yml +11 -7
  29. data/spec/fixtures/vcr_cassettes/BitWallet_Address/on_initialization/address_given_already_exists/should_not_create_an_address.yml +6 -4
  30. data/spec/fixtures/vcr_cassettes/BitWallet_Address/on_initialization/no_address_is_given/should_create_an_address.yml +11 -7
  31. data/spec/fixtures/vcr_cassettes/BitWallet_Addresses/_new/with_address_string_given/should_return_an_Address_with_the_given_address_string.yml +6 -4
  32. data/spec/fixtures/vcr_cassettes/BitWallet_Addresses/_new/without_any_address_string_given/should_return_an_Address_that_points_to_the_same_account.yml +11 -7
  33. data/spec/fixtures/vcr_cassettes/BitWallet_Addresses/account/.yml +6 -4
  34. data/spec/fixtures/vcr_cassettes/BitWallet_Addresses/new/.yml +11 -7
  35. data/spec/fixtures/vcr_cassettes/BitWallet_Transaction/on_initialization/should_be_able_to_take_a_bitcoind_hash.yml +15 -231
  36. data/spec/fixtures/vcr_cassettes/BitWallet_Wallet/_accounts/should_return_array_of_BitWallet_Accounts.yml +11 -266
  37. data/spec/fixtures/vcr_cassettes/BitWallet_Wallet/_move/should_move_funds_from_one_account_to_another.yml +25 -13
  38. data/spec/fixtures/vcr_cassettes/BitWallet_Wallet/_recent_transactions/should_allow_overriding_of_the_transaction_limit.yml +82 -274
  39. data/spec/fixtures/vcr_cassettes/BitWallet_Wallet/_recent_transactions/should_return_the_most_recent_transactions_of_all_accounts_defaulting_to_10_transactions.yml +82 -274
  40. metadata +4 -4
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZTdmOGQyNGU2NWI4ZDAyNjc4OTE2ZTYyMTE2YjlkMGIwZjA1ZTA1NQ==
4
+ ZTAwZTc0MjQyZGNhNDU3NWVjMzVlMGVjZjdjNmYyMjFmMjdhOTJjNQ==
5
5
  data.tar.gz: !binary |-
6
- Njg5YzcxMzUyZjIzNWU2NWYyMDUxMWI0ZWM3N2RkZGZiYzMwMTM5ZA==
6
+ OTJjMDBjYzZkYTVjMGE0NzAyNmQ0ZTU3ZjJiNTNlOWM1NGViMDViYQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZTFmYTEzOTAxMTZjM2Y1YTFlYjhiMGYyN2Q5NGUzNTM1YzdkMGVjZDY2ZTI2
10
- OTVjOGI3NWE1NWIzOGYwMzRlMGZmZmEwZDY2ZTc1Y2ViNWIzNGUwZTZhODA4
11
- ZTE3ZmRlZjhmYzUxZThkYjMzNjliYzhlNDQzYTM4OTQ1MzhiMTA=
9
+ ZjhhOTkxY2QxNWUzZjVmMjVlZGE1YTE0ODE2ODAwN2Y3YzE0OWQwZTQ2M2Qz
10
+ ZGM5ZWUxMDE4NGRkNjI5OWYyMmE5ZjFkZjdjNWFiM2M3MGRmMjU0OWNiZTcz
11
+ MTEyMjhlZTMzY2U3M2MyZTAwZjY5NzhkMGNhMTFjN2JhMjE2MGQ=
12
12
  data.tar.gz: !binary |-
13
- ZjkwYTU5MDE0MzE2ZmMxYzk2ZTMxODE0YmY3MzQyMjE2OGIxODgyY2ViNjMx
14
- NDc3ZDFiMDgxYmE2MGU1MjZhNmRkZGU3ODY0OWMxZmVhMWJlZGQ3NWU2Zjg3
15
- ZDAzNTlhNDIxYTMwOWU0NThhNGFlNjQ5MzdkYzJjYzQxNjVhODA=
13
+ OWUyNDAzNGNkNDc3NDQ0ZjMxMGFhYmE3Y2UyNGY4YjZmMzRiNzNmYTg2N2Jl
14
+ OTA2MGJlYzcxOTg4NWE3NDY1OWU1MjkwOTY0Y2E3NzI3NTRkZjllMTQ2N2M3
15
+ Mzk2MmNjN2U1OWEyYzIwMDRjYWViOTFiZWYyMzVmYjQ0NTg3NjY=
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # v0.6.1
2
+
3
+ - Fix warning where Wallet#client was being accessed but it was private
4
+
1
5
  # v0.6.0
2
6
 
3
7
  - Handle error -6 (invalid address)
data/bit_wallet.gemspec CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |gem|
21
21
  gem.add_dependency 'activesupport'
22
22
  gem.add_development_dependency 'rspec', '~> 2.12'
23
23
  gem.add_development_dependency 'factory_girl', '4.2.0'
24
- gem.add_development_dependency 'bitcoin_testnet', '0.5.0'
24
+ gem.add_development_dependency 'bitcoin_testnet', '0.5.1'
25
25
  gem.add_development_dependency 'vcr', '~> 2.4'
26
26
  gem.add_development_dependency 'webmock', '1.9.0'
27
27
  end
@@ -1,3 +1,3 @@
1
1
  module BitWallet
2
- VERSION = '0.6.0'
2
+ VERSION = '0.6.1'
3
3
  end
@@ -39,8 +39,6 @@ module BitWallet
39
39
  comment)
40
40
  end
41
41
 
42
- private
43
-
44
42
  def client
45
43
  @client ||= InstantiatesBitcoinClient.execute(@config)
46
44
  end
@@ -1,45 +1,47 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe BitWallet::Accounts, vcr: {record: :once} do
3
+ module BitWallet
4
+ describe Accounts, vcr: {record: :once} do
4
5
 
5
- let(:wallet) do
6
- build(:wallet)
7
- end
6
+ let(:wallet) do
7
+ build(:wallet)
8
+ end
8
9
 
9
- subject do
10
- BitWallet::Accounts.new(wallet)
11
- end
10
+ subject do
11
+ Accounts.new(wallet)
12
+ end
12
13
 
13
- its(:wallet) { should == wallet }
14
+ its(:wallet) { should == wallet }
14
15
 
15
- describe '#new' do
16
- it 'should create a new BitWallet::Account with a default address' do
17
- account = wallet.accounts.new('accountname')
18
- account.should be_kind_of(BitWallet::Account)
19
- account.addresses.count.should == 1
16
+ describe '#new' do
17
+ it 'should create a new BitWallet::Account with a default address' do
18
+ account = wallet.accounts.new('accountname')
19
+ account.should be_kind_of(Account)
20
+ account.addresses.count.should == 1
21
+ end
20
22
  end
21
- end
22
23
 
23
- describe '#includes_account_name?(account)' do
24
- it 'should return true if the array includes the account' do
25
- account = subject.new('accountname')
26
- subject.includes_account_name?('accountname').should == true
24
+ describe '#includes_account_name?(account)' do
25
+ it 'should return true if the array includes the account' do
26
+ account = subject.new('accountname')
27
+ subject.includes_account_name?('accountname').should == true
28
+ end
27
29
  end
28
- end
29
30
 
30
- describe '.with_balance' do
31
- it 'should return accounts with a balance > 0' do
32
- default_account = subject.new('')
33
- account_1 = subject.new('nomoney')
34
- account_2 = subject.new('moneyd')
31
+ describe '.with_balance' do
32
+ it 'should return accounts with a balance > 0' do
33
+ default_account = subject.new('')
34
+ account_1 = subject.new('nomoney')
35
+ account_2 = subject.new('moneyd')
35
36
 
36
- default_account.send_amount 10, to: account_2.addresses.first
37
+ default_account.send_amount 10, to: account_2.addresses.first
37
38
 
38
- accounts_with_balance = subject.with_balance
39
- accounts_with_balance.should include(default_account)
40
- accounts_with_balance.should_not include(account_1)
41
- accounts_with_balance.should include(account_2)
39
+ accounts_with_balance = subject.with_balance
40
+ accounts_with_balance.should include(default_account)
41
+ accounts_with_balance.should_not include(account_1)
42
+ accounts_with_balance.should include(account_2)
43
+ end
42
44
  end
43
- end
44
45
 
46
+ end
45
47
  end
@@ -1,49 +1,65 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe BitWallet::Wallet, vcr: true do
3
+ module BitWallet
4
+ describe Wallet, vcr: true do
4
5
 
5
- describe '#accounts' do
6
- it 'should return array of BitWallet::Accounts' do
7
- wallet = build(:wallet)
8
- wallet.accounts.should be_kind_of(BitWallet::Accounts)
6
+ describe '#accounts' do
7
+ it 'should return array of BitWallet::Accounts' do
8
+ wallet = build(:wallet)
9
+ wallet.accounts.should be_kind_of(Accounts)
10
+ end
9
11
  end
10
- end
11
12
 
12
- describe '#recent_transactions' do
13
- it 'should return the most recent transactions of all accounts defaulting to 10 transactions' do
14
- wallet = build(:wallet)
15
- default_account = wallet.accounts.new('')
16
- account_1 = wallet.accounts.new('1')
13
+ describe '#recent_transactions' do
14
+ it 'should return the most recent transactions of all accounts defaulting to 10 transactions' do
15
+ wallet = build(:wallet)
16
+ default_account = wallet.accounts.new('')
17
+ account_1 = wallet.accounts.new('1')
18
+
19
+ 1.upto(11).each do |n|
20
+ default_account.send_amount n, to: account_1.addresses.first
21
+ end
17
22
 
18
- 1.upto(11).each do |n|
19
- default_account.send_amount n, to: account_1.addresses.first
23
+ wallet.recent_transactions.size.should == 10
20
24
  end
21
25
 
22
- wallet.recent_transactions.size.should == 10
23
- end
26
+ it 'should allow overriding of the transaction limit' do
27
+ wallet = build(:wallet)
28
+ default_account = wallet.accounts.new('')
29
+ account_1 = wallet.accounts.new('1')
24
30
 
25
- it 'should allow overriding of the transaction limit' do
26
- wallet = build(:wallet)
27
- default_account = wallet.accounts.new('')
28
- account_1 = wallet.accounts.new('1')
31
+ 1.upto(11).each do |n|
32
+ default_account.send_amount n, to: account_1.addresses.first
33
+ end
29
34
 
30
- 1.upto(11).each do |n|
31
- default_account.send_amount n, to: account_1.addresses.first
35
+ wallet.recent_transactions(limit: 5).size.should == 5
32
36
  end
37
+ end
33
38
 
34
- wallet.recent_transactions(limit: 5).size.should == 5
39
+ describe '#move' do
40
+ it 'should move funds from one account to another' do
41
+ wallet = build(:wallet)
42
+ default_account = wallet.accounts.new('')
43
+ account_1 = wallet.accounts.new('1')
44
+ wallet.move '', '1', 1.1
45
+ wallet.move default_account, account_1, 0.5
46
+ account_1.balance.should == 1.6
47
+ end
35
48
  end
36
- end
37
49
 
38
- describe '#move' do
39
- it 'should move funds from one account to another' do
40
- wallet = build(:wallet)
41
- default_account = wallet.accounts.new('')
42
- account_1 = wallet.accounts.new('1')
43
- wallet.move '', '1', 1.1
44
- wallet.move default_account, account_1, 0.5
45
- account_1.balance.should == 1.6
50
+ describe "#client" do
51
+ it "returns the client created by InstantiatesBitcoinClient" do
52
+ client = double
53
+ config = {some: "config"}
54
+ allow(InstantiatesBitcoinClient).
55
+ to receive(:execute).with(config).
56
+ and_return(client)
57
+
58
+ wallet = described_class.new(config)
59
+
60
+ expect(wallet.client).to eq(client)
61
+ end
46
62
  end
47
- end
48
63
 
64
+ end
49
65
  end
@@ -11,6 +11,8 @@ http_interactions:
11
11
  - ! '*/*; q=0.5, application/xml'
12
12
  Accept-Encoding:
13
13
  - gzip, deflate
14
+ Content-Type:
15
+ - application/json
14
16
  Content-Length:
15
17
  - '53'
16
18
  User-Agent:
@@ -21,22 +23,22 @@ http_interactions:
21
23
  message: OK
22
24
  headers:
23
25
  Date:
24
- - Sun, 07 Apr 2013 10:00:51 +0000
26
+ - Tue, 04 Mar 2014 14:05:10 +0000
25
27
  Connection:
26
28
  - keep-alive
27
29
  Content-Length:
28
- - '109'
30
+ - '58'
29
31
  Content-Type:
30
32
  - application/json
31
33
  Server:
32
34
  - bitcoin-json-rpc/v0.7.2-beta
33
35
  body:
34
36
  encoding: US-ASCII
35
- string: ! '{"result":{"":8502.99850000,"1":0.00000000,"name":0.00000000,"nona":0.00000000},"error":null,"id":"jsonrpc"}
37
+ string: ! '{"result":{"":8800.00000000},"error":null,"id":"jsonrpc"}
36
38
 
37
39
  '
38
40
  http_version:
39
- recorded_at: Sun, 07 Apr 2013 10:00:51 GMT
41
+ recorded_at: Tue, 04 Mar 2014 14:05:10 GMT
40
42
  - request:
41
43
  method: post
42
44
  uri: http://admin1:123@localhost:19001/
@@ -48,45 +50,10 @@ http_interactions:
48
50
  - ! '*/*; q=0.5, application/xml'
49
51
  Accept-Encoding:
50
52
  - gzip, deflate
51
- Content-Length:
52
- - '55'
53
- User-Agent:
54
- - Ruby
55
- response:
56
- status:
57
- code: 200
58
- message: OK
59
- headers:
60
- Date:
61
- - Sun, 07 Apr 2013 10:00:51 +0000
62
- Connection:
63
- - keep-alive
64
- Content-Length:
65
- - '76'
66
53
  Content-Type:
67
54
  - application/json
68
- Server:
69
- - bitcoin-json-rpc/v0.7.2-beta
70
- body:
71
- encoding: US-ASCII
72
- string: ! '{"result":"n23DGsJT8vnsU8B4phPNj2RGdZZGmG8BLq","error":null,"id":"jsonrpc"}
73
-
74
- '
75
- http_version:
76
- recorded_at: Sun, 07 Apr 2013 10:00:52 GMT
77
- - request:
78
- method: post
79
- uri: http://admin1:123@localhost:19001/
80
- body:
81
- encoding: US-ASCII
82
- string: ! '{"method":"getnewaddress","params":["1"],"id":"jsonrpc"}'
83
- headers:
84
- Accept:
85
- - ! '*/*; q=0.5, application/xml'
86
- Accept-Encoding:
87
- - gzip, deflate
88
55
  Content-Length:
89
- - '56'
56
+ - '55'
90
57
  User-Agent:
91
58
  - Ruby
92
59
  response:
@@ -95,7 +62,7 @@ http_interactions:
95
62
  message: OK
96
63
  headers:
97
64
  Date:
98
- - Sun, 07 Apr 2013 10:00:52 +0000
65
+ - Tue, 04 Mar 2014 14:05:10 +0000
99
66
  Connection:
100
67
  - keep-alive
101
68
  Content-Length:
@@ -106,59 +73,24 @@ http_interactions:
106
73
  - bitcoin-json-rpc/v0.7.2-beta
107
74
  body:
108
75
  encoding: US-ASCII
109
- string: ! '{"result":"moKwpivcfe6ZLixVdxKhF66EFgp829Hawg","error":null,"id":"jsonrpc"}
76
+ string: ! '{"result":"mi487X6jj8ggY6FAoG8ibv7qomcq9TXL1U","error":null,"id":"jsonrpc"}
110
77
 
111
78
  '
112
79
  http_version:
113
- recorded_at: Sun, 07 Apr 2013 10:00:52 GMT
80
+ recorded_at: Tue, 04 Mar 2014 14:05:10 GMT
114
81
  - request:
115
82
  method: post
116
83
  uri: http://admin1:123@localhost:19001/
117
84
  body:
118
85
  encoding: US-ASCII
119
- string: ! '{"method":"getnewaddress","params":["name"],"id":"jsonrpc"}'
86
+ string: ! '{"method":"getnewaddress","params":["nona"],"id":"jsonrpc"}'
120
87
  headers:
121
88
  Accept:
122
89
  - ! '*/*; q=0.5, application/xml'
123
90
  Accept-Encoding:
124
91
  - gzip, deflate
125
- Content-Length:
126
- - '59'
127
- User-Agent:
128
- - Ruby
129
- response:
130
- status:
131
- code: 200
132
- message: OK
133
- headers:
134
- Date:
135
- - Sun, 07 Apr 2013 10:00:52 +0000
136
- Connection:
137
- - keep-alive
138
- Content-Length:
139
- - '76'
140
92
  Content-Type:
141
93
  - application/json
142
- Server:
143
- - bitcoin-json-rpc/v0.7.2-beta
144
- body:
145
- encoding: US-ASCII
146
- string: ! '{"result":"mkxFkuJ8ZTumdGhD4tE81ty7GjSXTWJP11","error":null,"id":"jsonrpc"}
147
-
148
- '
149
- http_version:
150
- recorded_at: Sun, 07 Apr 2013 10:00:52 GMT
151
- - request:
152
- method: post
153
- uri: http://admin1:123@localhost:19001/
154
- body:
155
- encoding: US-ASCII
156
- string: ! '{"method":"getnewaddress","params":["nona"],"id":"jsonrpc"}'
157
- headers:
158
- Accept:
159
- - ! '*/*; q=0.5, application/xml'
160
- Accept-Encoding:
161
- - gzip, deflate
162
94
  Content-Length:
163
95
  - '59'
164
96
  User-Agent:
@@ -169,7 +101,7 @@ http_interactions:
169
101
  message: OK
170
102
  headers:
171
103
  Date:
172
- - Sun, 07 Apr 2013 10:00:52 +0000
104
+ - Tue, 04 Mar 2014 14:05:10 +0000
173
105
  Connection:
174
106
  - keep-alive
175
107
  Content-Length:
@@ -180,9 +112,9 @@ http_interactions:
180
112
  - bitcoin-json-rpc/v0.7.2-beta
181
113
  body:
182
114
  encoding: US-ASCII
183
- string: ! '{"result":"msGD3CP21pssyDqzQhZvfSNZGnuZBHC5m2","error":null,"id":"jsonrpc"}
115
+ string: ! '{"result":"mkwWW2pnqFkDfH5esHxXBNARTN7GnUDpsv","error":null,"id":"jsonrpc"}
184
116
 
185
117
  '
186
118
  http_version:
187
- recorded_at: Sun, 07 Apr 2013 10:00:52 GMT
188
- recorded_with: VCR 2.4.0
119
+ recorded_at: Tue, 04 Mar 2014 14:05:10 GMT
120
+ recorded_with: VCR 2.8.0
@@ -11,6 +11,8 @@ http_interactions:
11
11
  - ! '*/*; q=0.5, application/xml'
12
12
  Accept-Encoding:
13
13
  - gzip, deflate
14
+ Content-Type:
15
+ - application/json
14
16
  Content-Length:
15
17
  - '53'
16
18
  User-Agent:
@@ -21,22 +23,22 @@ http_interactions:
21
23
  message: OK
22
24
  headers:
23
25
  Date:
24
- - Sun, 07 Apr 2013 10:00:46 +0000
26
+ - Tue, 04 Mar 2014 14:05:14 +0000
25
27
  Connection:
26
28
  - keep-alive
27
29
  Content-Length:
28
- - '109'
30
+ - '58'
29
31
  Content-Type:
30
32
  - application/json
31
33
  Server:
32
34
  - bitcoin-json-rpc/v0.7.2-beta
33
35
  body:
34
36
  encoding: US-ASCII
35
- string: ! '{"result":{"":8502.99850000,"1":0.00000000,"name":0.00000000,"nona":0.00000000},"error":null,"id":"jsonrpc"}
37
+ string: ! '{"result":{"":8800.00000000},"error":null,"id":"jsonrpc"}
36
38
 
37
39
  '
38
40
  http_version:
39
- recorded_at: Sun, 07 Apr 2013 10:00:46 GMT
41
+ recorded_at: Tue, 04 Mar 2014 14:05:14 GMT
40
42
  - request:
41
43
  method: post
42
44
  uri: http://admin1:123@localhost:19001/
@@ -48,45 +50,10 @@ http_interactions:
48
50
  - ! '*/*; q=0.5, application/xml'
49
51
  Accept-Encoding:
50
52
  - gzip, deflate
51
- Content-Length:
52
- - '55'
53
- User-Agent:
54
- - Ruby
55
- response:
56
- status:
57
- code: 200
58
- message: OK
59
- headers:
60
- Date:
61
- - Sun, 07 Apr 2013 10:00:46 +0000
62
- Connection:
63
- - keep-alive
64
- Content-Length:
65
- - '76'
66
53
  Content-Type:
67
54
  - application/json
68
- Server:
69
- - bitcoin-json-rpc/v0.7.2-beta
70
- body:
71
- encoding: US-ASCII
72
- string: ! '{"result":"mzExDTWuKRwMBchjMDhc6G8DtGWw9u1Xn3","error":null,"id":"jsonrpc"}
73
-
74
- '
75
- http_version:
76
- recorded_at: Sun, 07 Apr 2013 10:00:46 GMT
77
- - request:
78
- method: post
79
- uri: http://admin1:123@localhost:19001/
80
- body:
81
- encoding: US-ASCII
82
- string: ! '{"method":"getnewaddress","params":["1"],"id":"jsonrpc"}'
83
- headers:
84
- Accept:
85
- - ! '*/*; q=0.5, application/xml'
86
- Accept-Encoding:
87
- - gzip, deflate
88
55
  Content-Length:
89
- - '56'
56
+ - '55'
90
57
  User-Agent:
91
58
  - Ruby
92
59
  response:
@@ -95,7 +62,7 @@ http_interactions:
95
62
  message: OK
96
63
  headers:
97
64
  Date:
98
- - Sun, 07 Apr 2013 10:00:46 +0000
65
+ - Tue, 04 Mar 2014 14:05:14 +0000
99
66
  Connection:
100
67
  - keep-alive
101
68
  Content-Length:
@@ -106,59 +73,24 @@ http_interactions:
106
73
  - bitcoin-json-rpc/v0.7.2-beta
107
74
  body:
108
75
  encoding: US-ASCII
109
- string: ! '{"result":"mx1o3s4pwQEZGo7Tn4gnK6Yc7ssEWE7Ts6","error":null,"id":"jsonrpc"}
76
+ string: ! '{"result":"mi487X6jj8ggY6FAoG8ibv7qomcq9TXL1U","error":null,"id":"jsonrpc"}
110
77
 
111
78
  '
112
79
  http_version:
113
- recorded_at: Sun, 07 Apr 2013 10:00:46 GMT
80
+ recorded_at: Tue, 04 Mar 2014 14:05:14 GMT
114
81
  - request:
115
82
  method: post
116
83
  uri: http://admin1:123@localhost:19001/
117
84
  body:
118
85
  encoding: US-ASCII
119
- string: ! '{"method":"getnewaddress","params":["name"],"id":"jsonrpc"}'
86
+ string: ! '{"method":"getnewaddress","params":["nona"],"id":"jsonrpc"}'
120
87
  headers:
121
88
  Accept:
122
89
  - ! '*/*; q=0.5, application/xml'
123
90
  Accept-Encoding:
124
91
  - gzip, deflate
125
- Content-Length:
126
- - '59'
127
- User-Agent:
128
- - Ruby
129
- response:
130
- status:
131
- code: 200
132
- message: OK
133
- headers:
134
- Date:
135
- - Sun, 07 Apr 2013 10:00:46 +0000
136
- Connection:
137
- - keep-alive
138
- Content-Length:
139
- - '76'
140
92
  Content-Type:
141
93
  - application/json
142
- Server:
143
- - bitcoin-json-rpc/v0.7.2-beta
144
- body:
145
- encoding: US-ASCII
146
- string: ! '{"result":"n35X4Gno3GUzhSdoWaLtbGFCMKJ4pxrzZW","error":null,"id":"jsonrpc"}
147
-
148
- '
149
- http_version:
150
- recorded_at: Sun, 07 Apr 2013 10:00:46 GMT
151
- - request:
152
- method: post
153
- uri: http://admin1:123@localhost:19001/
154
- body:
155
- encoding: US-ASCII
156
- string: ! '{"method":"getnewaddress","params":["nona"],"id":"jsonrpc"}'
157
- headers:
158
- Accept:
159
- - ! '*/*; q=0.5, application/xml'
160
- Accept-Encoding:
161
- - gzip, deflate
162
94
  Content-Length:
163
95
  - '59'
164
96
  User-Agent:
@@ -169,7 +101,7 @@ http_interactions:
169
101
  message: OK
170
102
  headers:
171
103
  Date:
172
- - Sun, 07 Apr 2013 10:00:46 +0000
104
+ - Tue, 04 Mar 2014 14:05:14 +0000
173
105
  Connection:
174
106
  - keep-alive
175
107
  Content-Length:
@@ -180,9 +112,9 @@ http_interactions:
180
112
  - bitcoin-json-rpc/v0.7.2-beta
181
113
  body:
182
114
  encoding: US-ASCII
183
- string: ! '{"result":"mtWxCLZY62c8twij3DKX5cCy1ye5znvEv6","error":null,"id":"jsonrpc"}
115
+ string: ! '{"result":"mkwWW2pnqFkDfH5esHxXBNARTN7GnUDpsv","error":null,"id":"jsonrpc"}
184
116
 
185
117
  '
186
118
  http_version:
187
- recorded_at: Sun, 07 Apr 2013 10:00:46 GMT
188
- recorded_with: VCR 2.4.0
119
+ recorded_at: Tue, 04 Mar 2014 14:05:14 GMT
120
+ recorded_with: VCR 2.8.0