bit_wallet 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -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
  - '59'
16
18
  User-Agent:
@@ -21,7 +23,7 @@ http_interactions:
21
23
  message: OK
22
24
  headers:
23
25
  Date:
24
- - Sun, 07 Apr 2013 10:01:45 +0000
26
+ - Tue, 04 Mar 2014 14:04:30 +0000
25
27
  Connection:
26
28
  - keep-alive
27
29
  Content-Length:
@@ -32,11 +34,11 @@ http_interactions:
32
34
  - bitcoin-json-rpc/v0.7.2-beta
33
35
  body:
34
36
  encoding: US-ASCII
35
- string: ! '{"result":"mxjvwe4pSa7jwMiWZY4yXW2EJE9BrkANc7","error":null,"id":"jsonrpc"}
37
+ string: ! '{"result":"mi487X6jj8ggY6FAoG8ibv7qomcq9TXL1U","error":null,"id":"jsonrpc"}
36
38
 
37
39
  '
38
40
  http_version:
39
- recorded_at: Sun, 07 Apr 2013 10:01:45 GMT
41
+ recorded_at: Tue, 04 Mar 2014 14:04:30 GMT
40
42
  - request:
41
43
  method: post
42
44
  uri: http://admin1:123@localhost:19001/
@@ -48,6 +50,8 @@ http_interactions:
48
50
  - ! '*/*; q=0.5, application/xml'
49
51
  Accept-Encoding:
50
52
  - gzip, deflate
53
+ Content-Type:
54
+ - application/json
51
55
  Content-Length:
52
56
  - '59'
53
57
  User-Agent:
@@ -58,7 +62,7 @@ http_interactions:
58
62
  message: OK
59
63
  headers:
60
64
  Date:
61
- - Sun, 07 Apr 2013 10:01:45 +0000
65
+ - Tue, 04 Mar 2014 14:04:30 +0000
62
66
  Connection:
63
67
  - keep-alive
64
68
  Content-Length:
@@ -69,9 +73,9 @@ http_interactions:
69
73
  - bitcoin-json-rpc/v0.7.2-beta
70
74
  body:
71
75
  encoding: US-ASCII
72
- string: ! '{"result":"mnJcRPpwd6qRQLpj6jgjLAYoydCv3ssPoW","error":null,"id":"jsonrpc"}
76
+ string: ! '{"result":"mkwWW2pnqFkDfH5esHxXBNARTN7GnUDpsv","error":null,"id":"jsonrpc"}
73
77
 
74
78
  '
75
79
  http_version:
76
- recorded_at: Sun, 07 Apr 2013 10:01:45 GMT
77
- recorded_with: VCR 2.4.0
80
+ recorded_at: Tue, 04 Mar 2014 14:04:30 GMT
81
+ 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
  - '59'
16
18
  User-Agent:
@@ -21,7 +23,7 @@ http_interactions:
21
23
  message: OK
22
24
  headers:
23
25
  Date:
24
- - Sun, 07 Apr 2013 10:01:36 +0000
26
+ - Tue, 04 Mar 2014 14:04:27 +0000
25
27
  Connection:
26
28
  - keep-alive
27
29
  Content-Length:
@@ -32,11 +34,11 @@ http_interactions:
32
34
  - bitcoin-json-rpc/v0.7.2-beta
33
35
  body:
34
36
  encoding: US-ASCII
35
- string: ! '{"result":"n23zdewpw3myJV7N7mDPrfiSsvbHMp9NjL","error":null,"id":"jsonrpc"}
37
+ string: ! '{"result":"mi487X6jj8ggY6FAoG8ibv7qomcq9TXL1U","error":null,"id":"jsonrpc"}
36
38
 
37
39
  '
38
40
  http_version:
39
- recorded_at: Sun, 07 Apr 2013 10:01:36 GMT
41
+ recorded_at: Tue, 04 Mar 2014 14:04:27 GMT
40
42
  - request:
41
43
  method: post
42
44
  uri: http://admin1:123@localhost:19001/
@@ -48,6 +50,8 @@ http_interactions:
48
50
  - ! '*/*; q=0.5, application/xml'
49
51
  Accept-Encoding:
50
52
  - gzip, deflate
53
+ Content-Type:
54
+ - application/json
51
55
  Content-Length:
52
56
  - '59'
53
57
  User-Agent:
@@ -58,7 +62,7 @@ http_interactions:
58
62
  message: OK
59
63
  headers:
60
64
  Date:
61
- - Sun, 07 Apr 2013 10:01:36 +0000
65
+ - Tue, 04 Mar 2014 14:04:27 +0000
62
66
  Connection:
63
67
  - keep-alive
64
68
  Content-Length:
@@ -69,9 +73,9 @@ http_interactions:
69
73
  - bitcoin-json-rpc/v0.7.2-beta
70
74
  body:
71
75
  encoding: US-ASCII
72
- string: ! '{"result":"mxirDAv7pjqbgSYA9cFpHewL5m4cnKSda4","error":null,"id":"jsonrpc"}
76
+ string: ! '{"result":"mkwWW2pnqFkDfH5esHxXBNARTN7GnUDpsv","error":null,"id":"jsonrpc"}
73
77
 
74
78
  '
75
79
  http_version:
76
- recorded_at: Sun, 07 Apr 2013 10:01:36 GMT
77
- recorded_with: VCR 2.4.0
80
+ recorded_at: Tue, 04 Mar 2014 14:04:27 GMT
81
+ 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
  - '59'
16
18
  User-Agent:
@@ -21,7 +23,7 @@ http_interactions:
21
23
  message: OK
22
24
  headers:
23
25
  Date:
24
- - Sun, 07 Apr 2013 10:01:42 +0000
26
+ - Tue, 04 Mar 2014 14:04:36 +0000
25
27
  Connection:
26
28
  - keep-alive
27
29
  Content-Length:
@@ -32,9 +34,9 @@ http_interactions:
32
34
  - bitcoin-json-rpc/v0.7.2-beta
33
35
  body:
34
36
  encoding: US-ASCII
35
- string: ! '{"result":"mz7QD5eESX9VcigXQayjkwU9uWacx5zBM5","error":null,"id":"jsonrpc"}
37
+ string: ! '{"result":"mi487X6jj8ggY6FAoG8ibv7qomcq9TXL1U","error":null,"id":"jsonrpc"}
36
38
 
37
39
  '
38
40
  http_version:
39
- recorded_at: Sun, 07 Apr 2013 10:01:42 GMT
40
- recorded_with: VCR 2.4.0
41
+ recorded_at: Tue, 04 Mar 2014 14:04:36 GMT
42
+ 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
  - '59'
16
18
  User-Agent:
@@ -21,7 +23,7 @@ http_interactions:
21
23
  message: OK
22
24
  headers:
23
25
  Date:
24
- - Sun, 07 Apr 2013 10:01:39 +0000
26
+ - Tue, 04 Mar 2014 14:04:33 +0000
25
27
  Connection:
26
28
  - keep-alive
27
29
  Content-Length:
@@ -32,11 +34,11 @@ http_interactions:
32
34
  - bitcoin-json-rpc/v0.7.2-beta
33
35
  body:
34
36
  encoding: US-ASCII
35
- string: ! '{"result":"mpskA1fB184DMGfn3HyzFY3Z49sAufCY3n","error":null,"id":"jsonrpc"}
37
+ string: ! '{"result":"mi487X6jj8ggY6FAoG8ibv7qomcq9TXL1U","error":null,"id":"jsonrpc"}
36
38
 
37
39
  '
38
40
  http_version:
39
- recorded_at: Sun, 07 Apr 2013 10:01:39 GMT
41
+ recorded_at: Tue, 04 Mar 2014 14:04:33 GMT
40
42
  - request:
41
43
  method: post
42
44
  uri: http://admin1:123@localhost:19001/
@@ -48,6 +50,8 @@ http_interactions:
48
50
  - ! '*/*; q=0.5, application/xml'
49
51
  Accept-Encoding:
50
52
  - gzip, deflate
53
+ Content-Type:
54
+ - application/json
51
55
  Content-Length:
52
56
  - '59'
53
57
  User-Agent:
@@ -58,7 +62,7 @@ http_interactions:
58
62
  message: OK
59
63
  headers:
60
64
  Date:
61
- - Sun, 07 Apr 2013 10:01:39 +0000
65
+ - Tue, 04 Mar 2014 14:04:33 +0000
62
66
  Connection:
63
67
  - keep-alive
64
68
  Content-Length:
@@ -69,9 +73,9 @@ http_interactions:
69
73
  - bitcoin-json-rpc/v0.7.2-beta
70
74
  body:
71
75
  encoding: US-ASCII
72
- string: ! '{"result":"mqTc6PVreWeJs6BqVxU8UTUghcxwJpi4bQ","error":null,"id":"jsonrpc"}
76
+ string: ! '{"result":"mkwWW2pnqFkDfH5esHxXBNARTN7GnUDpsv","error":null,"id":"jsonrpc"}
73
77
 
74
78
  '
75
79
  http_version:
76
- recorded_at: Sun, 07 Apr 2013 10:01:39 GMT
77
- recorded_with: VCR 2.4.0
80
+ recorded_at: Tue, 04 Mar 2014 14:04:33 GMT
81
+ 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
  - '59'
16
18
  User-Agent:
@@ -21,7 +23,7 @@ http_interactions:
21
23
  message: OK
22
24
  headers:
23
25
  Date:
24
- - Sun, 07 Apr 2013 10:01:58 +0000
26
+ - Tue, 04 Mar 2014 14:05:37 +0000
25
27
  Connection:
26
28
  - keep-alive
27
29
  Content-Length:
@@ -32,9 +34,9 @@ http_interactions:
32
34
  - bitcoin-json-rpc/v0.7.2-beta
33
35
  body:
34
36
  encoding: US-ASCII
35
- string: ! '{"result":"n2rGKiGUxzmPawxiLNjKLXKXivAeB1Zf5V","error":null,"id":"jsonrpc"}
37
+ string: ! '{"result":"mi487X6jj8ggY6FAoG8ibv7qomcq9TXL1U","error":null,"id":"jsonrpc"}
36
38
 
37
39
  '
38
40
  http_version:
39
- recorded_at: Sun, 07 Apr 2013 10:01:58 GMT
40
- recorded_with: VCR 2.4.0
41
+ recorded_at: Tue, 04 Mar 2014 14:05:37 GMT
42
+ 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
  - '59'
16
18
  User-Agent:
@@ -21,7 +23,7 @@ http_interactions:
21
23
  message: OK
22
24
  headers:
23
25
  Date:
24
- - Sun, 07 Apr 2013 10:01:54 +0000
26
+ - Tue, 04 Mar 2014 14:05:33 +0000
25
27
  Connection:
26
28
  - keep-alive
27
29
  Content-Length:
@@ -32,11 +34,11 @@ http_interactions:
32
34
  - bitcoin-json-rpc/v0.7.2-beta
33
35
  body:
34
36
  encoding: US-ASCII
35
- string: ! '{"result":"n3YuZ2RB5dZAwTakeSU62yxRy2ws1UXyyW","error":null,"id":"jsonrpc"}
37
+ string: ! '{"result":"mi487X6jj8ggY6FAoG8ibv7qomcq9TXL1U","error":null,"id":"jsonrpc"}
36
38
 
37
39
  '
38
40
  http_version:
39
- recorded_at: Sun, 07 Apr 2013 10:01:54 GMT
41
+ recorded_at: Tue, 04 Mar 2014 14:05:33 GMT
40
42
  - request:
41
43
  method: post
42
44
  uri: http://admin1:123@localhost:19001/
@@ -48,6 +50,8 @@ http_interactions:
48
50
  - ! '*/*; q=0.5, application/xml'
49
51
  Accept-Encoding:
50
52
  - gzip, deflate
53
+ Content-Type:
54
+ - application/json
51
55
  Content-Length:
52
56
  - '59'
53
57
  User-Agent:
@@ -58,7 +62,7 @@ http_interactions:
58
62
  message: OK
59
63
  headers:
60
64
  Date:
61
- - Sun, 07 Apr 2013 10:01:54 +0000
65
+ - Tue, 04 Mar 2014 14:05:33 +0000
62
66
  Connection:
63
67
  - keep-alive
64
68
  Content-Length:
@@ -69,9 +73,9 @@ http_interactions:
69
73
  - bitcoin-json-rpc/v0.7.2-beta
70
74
  body:
71
75
  encoding: US-ASCII
72
- string: ! '{"result":"mpVhTriggvRaM6xmkRFfp6jzAPos8CN1o7","error":null,"id":"jsonrpc"}
76
+ string: ! '{"result":"mkwWW2pnqFkDfH5esHxXBNARTN7GnUDpsv","error":null,"id":"jsonrpc"}
73
77
 
74
78
  '
75
79
  http_version:
76
- recorded_at: Sun, 07 Apr 2013 10:01:54 GMT
77
- recorded_with: VCR 2.4.0
80
+ recorded_at: Tue, 04 Mar 2014 14:05:33 GMT
81
+ 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
  - '59'
16
18
  User-Agent:
@@ -21,7 +23,7 @@ http_interactions:
21
23
  message: OK
22
24
  headers:
23
25
  Date:
24
- - Sun, 07 Apr 2013 10:01:48 +0000
26
+ - Tue, 04 Mar 2014 14:05:29 +0000
25
27
  Connection:
26
28
  - keep-alive
27
29
  Content-Length:
@@ -32,9 +34,9 @@ http_interactions:
32
34
  - bitcoin-json-rpc/v0.7.2-beta
33
35
  body:
34
36
  encoding: US-ASCII
35
- string: ! '{"result":"mwypwgBwAnXQckXAuu9Pea4UCaesEsLkks","error":null,"id":"jsonrpc"}
37
+ string: ! '{"result":"mi487X6jj8ggY6FAoG8ibv7qomcq9TXL1U","error":null,"id":"jsonrpc"}
36
38
 
37
39
  '
38
40
  http_version:
39
- recorded_at: Sun, 07 Apr 2013 10:01:48 GMT
40
- recorded_with: VCR 2.4.0
41
+ recorded_at: Tue, 04 Mar 2014 14:05:29 GMT
42
+ 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
  - '59'
16
18
  User-Agent:
@@ -21,7 +23,7 @@ http_interactions:
21
23
  message: OK
22
24
  headers:
23
25
  Date:
24
- - Sun, 07 Apr 2013 10:01:51 +0000
26
+ - Tue, 04 Mar 2014 14:05:40 +0000
25
27
  Connection:
26
28
  - keep-alive
27
29
  Content-Length:
@@ -32,11 +34,11 @@ http_interactions:
32
34
  - bitcoin-json-rpc/v0.7.2-beta
33
35
  body:
34
36
  encoding: US-ASCII
35
- string: ! '{"result":"mwxHK8amw6bAiQD3UUYNXvUhVxrEb1WeKm","error":null,"id":"jsonrpc"}
37
+ string: ! '{"result":"mi487X6jj8ggY6FAoG8ibv7qomcq9TXL1U","error":null,"id":"jsonrpc"}
36
38
 
37
39
  '
38
40
  http_version:
39
- recorded_at: Sun, 07 Apr 2013 10:01:51 GMT
41
+ recorded_at: Tue, 04 Mar 2014 14:05:40 GMT
40
42
  - request:
41
43
  method: post
42
44
  uri: http://admin1:123@localhost:19001/
@@ -48,6 +50,8 @@ http_interactions:
48
50
  - ! '*/*; q=0.5, application/xml'
49
51
  Accept-Encoding:
50
52
  - gzip, deflate
53
+ Content-Type:
54
+ - application/json
51
55
  Content-Length:
52
56
  - '59'
53
57
  User-Agent:
@@ -58,7 +62,7 @@ http_interactions:
58
62
  message: OK
59
63
  headers:
60
64
  Date:
61
- - Sun, 07 Apr 2013 10:01:51 +0000
65
+ - Tue, 04 Mar 2014 14:05:40 +0000
62
66
  Connection:
63
67
  - keep-alive
64
68
  Content-Length:
@@ -69,9 +73,9 @@ http_interactions:
69
73
  - bitcoin-json-rpc/v0.7.2-beta
70
74
  body:
71
75
  encoding: US-ASCII
72
- string: ! '{"result":"mxrXjNJpUgzScavyFGUEkJqxoBStBJQBFd","error":null,"id":"jsonrpc"}
76
+ string: ! '{"result":"mkwWW2pnqFkDfH5esHxXBNARTN7GnUDpsv","error":null,"id":"jsonrpc"}
73
77
 
74
78
  '
75
79
  http_version:
76
- recorded_at: Sun, 07 Apr 2013 10:01:51 GMT
77
- recorded_with: VCR 2.4.0
80
+ recorded_at: Tue, 04 Mar 2014 14:05:40 GMT
81
+ recorded_with: VCR 2.8.0