blockcypher-ruby 0.2.4 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (24) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +8 -3
  3. data/lib/blockcypher-ruby.rb +1 -0
  4. data/lib/blockcypher/api.rb +75 -41
  5. data/spec/blockcypher/api_spec.rb +100 -57
  6. data/spec/config.yml.sample +2 -0
  7. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/Asset_API/Asset_Transfer/should_transfer_asset.yml +1349 -0
  8. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/Asset_API/Generate_Asset_Address/should_include_private_public_oap_address_original_address_hashes.yml +51 -0
  9. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/Asset_API/Issue_Asset/should_issue_asset.yml +156 -0
  10. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/_address_final_balance/should_get_the_balance_of_an_address.yml +102 -0
  11. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/_address_generate/should_generate_new_addresses.yml +97 -0
  12. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/_create_forwarding_address/allows_creating_a_payment_forward_with_a_callback.yml +100 -0
  13. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/_create_forwarding_address/allows_creating_a_payment_forward_with_a_callback_and_confirmation_notifications_enabled.yml +101 -0
  14. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/_create_forwarding_address/allows_creating_a_payment_forward_with_options.yml +102 -0
  15. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/_create_forwarding_address/creates_a_payment_forward.yml +99 -0
  16. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/_create_forwarding_address/is_possible_to_use_the_alias_create_payments_forwarding.yml +99 -0
  17. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/_delete_forwarding_address/deletes_all_previously_created_forwarding_addresses.yml +269 -0
  18. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/_faucet/should_fund_a_bcy_test_address_with_the_faucet.yml +96 -0
  19. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/_list_forwarding_addresses/lists_all_forwading_addresses_created_for_a_given_token.yml +119 -0
  20. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/_transaction_new/should_call_the_txs/new_api.yml +187 -0
  21. data/spec/fixtures/vcr_cassettes/BlockCypher_Api/_transaction_sign_and_send/should_call_txs/send_api.yml +187 -0
  22. data/spec/spec_helper.rb +15 -0
  23. data/spec/support/vcr.rb +10 -0
  24. metadata +66 -6
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'pry'
4
+ require 'rspec'
5
+ require 'yaml'
6
+ require 'active_support/core_ext/hash/indifferent_access'
7
+ require 'pathname'
8
+ require 'blockcypher'
9
+
10
+ SPEC_DIR = Pathname.new(File.dirname(__FILE__))
11
+
12
+ Dir[SPEC_DIR.join('support', '**', '*.rb')].sort.each { |f| require f }
13
+
14
+ CONFIG_FILE = SPEC_DIR.join('config.yml')
15
+ CONFIG = YAML.load_file(CONFIG_FILE).with_indifferent_access
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'vcr'
4
+
5
+ VCR.configure do |config|
6
+ config.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
7
+ config.hook_into :webmock
8
+ config.configure_rspec_metadata!
9
+ config.filter_sensitive_data('<api_token>') { CONFIG[:api_token] }
10
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blockcypher-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - CoinHako
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-01-29 00:00:00.000000000 Z
14
+ date: 2020-05-08 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bitcoin-ruby
@@ -41,6 +41,20 @@ dependencies:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
43
  version: '0'
44
+ - !ruby/object:Gem::Dependency
45
+ name: activesupport
46
+ requirement: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
51
+ type: :development
52
+ prerelease: false
53
+ version_requirements: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
44
58
  - !ruby/object:Gem::Dependency
45
59
  name: bundler
46
60
  requirement: !ruby/object:Gem::Requirement
@@ -55,6 +69,20 @@ dependencies:
55
69
  - - "~>"
56
70
  - !ruby/object:Gem::Version
57
71
  version: '1.6'
72
+ - !ruby/object:Gem::Dependency
73
+ name: pry
74
+ requirement: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ type: :development
80
+ prerelease: false
81
+ version_requirements: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
58
86
  - !ruby/object:Gem::Dependency
59
87
  name: rake
60
88
  requirement: !ruby/object:Gem::Requirement
@@ -84,7 +112,21 @@ dependencies:
84
112
  - !ruby/object:Gem::Version
85
113
  version: '0'
86
114
  - !ruby/object:Gem::Dependency
87
- name: pry
115
+ name: vcr
116
+ requirement: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
121
+ type: :development
122
+ prerelease: false
123
+ version_requirements: !ruby/object:Gem::Requirement
124
+ requirements:
125
+ - - ">="
126
+ - !ruby/object:Gem::Version
127
+ version: '0'
128
+ - !ruby/object:Gem::Dependency
129
+ name: webmock
88
130
  requirement: !ruby/object:Gem::Requirement
89
131
  requirements:
90
132
  - - ">="
@@ -105,12 +147,31 @@ extra_rdoc_files: []
105
147
  files:
106
148
  - LICENSE
107
149
  - README.md
150
+ - lib/blockcypher-ruby.rb
108
151
  - lib/blockcypher.rb
109
152
  - lib/blockcypher/api.rb
110
153
  - spec/blockcypher/api_spec.rb
154
+ - spec/config.yml.sample
155
+ - spec/fixtures/vcr_cassettes/BlockCypher_Api/Asset_API/Asset_Transfer/should_transfer_asset.yml
156
+ - spec/fixtures/vcr_cassettes/BlockCypher_Api/Asset_API/Generate_Asset_Address/should_include_private_public_oap_address_original_address_hashes.yml
157
+ - spec/fixtures/vcr_cassettes/BlockCypher_Api/Asset_API/Issue_Asset/should_issue_asset.yml
158
+ - spec/fixtures/vcr_cassettes/BlockCypher_Api/_address_final_balance/should_get_the_balance_of_an_address.yml
159
+ - spec/fixtures/vcr_cassettes/BlockCypher_Api/_address_generate/should_generate_new_addresses.yml
160
+ - spec/fixtures/vcr_cassettes/BlockCypher_Api/_create_forwarding_address/allows_creating_a_payment_forward_with_a_callback.yml
161
+ - spec/fixtures/vcr_cassettes/BlockCypher_Api/_create_forwarding_address/allows_creating_a_payment_forward_with_a_callback_and_confirmation_notifications_enabled.yml
162
+ - spec/fixtures/vcr_cassettes/BlockCypher_Api/_create_forwarding_address/allows_creating_a_payment_forward_with_options.yml
163
+ - spec/fixtures/vcr_cassettes/BlockCypher_Api/_create_forwarding_address/creates_a_payment_forward.yml
164
+ - spec/fixtures/vcr_cassettes/BlockCypher_Api/_create_forwarding_address/is_possible_to_use_the_alias_create_payments_forwarding.yml
165
+ - spec/fixtures/vcr_cassettes/BlockCypher_Api/_delete_forwarding_address/deletes_all_previously_created_forwarding_addresses.yml
166
+ - spec/fixtures/vcr_cassettes/BlockCypher_Api/_faucet/should_fund_a_bcy_test_address_with_the_faucet.yml
167
+ - spec/fixtures/vcr_cassettes/BlockCypher_Api/_list_forwarding_addresses/lists_all_forwading_addresses_created_for_a_given_token.yml
168
+ - spec/fixtures/vcr_cassettes/BlockCypher_Api/_transaction_new/should_call_the_txs/new_api.yml
169
+ - spec/fixtures/vcr_cassettes/BlockCypher_Api/_transaction_sign_and_send/should_call_txs/send_api.yml
170
+ - spec/spec_helper.rb
171
+ - spec/support/vcr.rb
111
172
  homepage: http://www.blockcypher.com
112
173
  licenses:
113
- - Apache 2.0
174
+ - Apache-2.0
114
175
  metadata: {}
115
176
  post_install_message:
116
177
  rdoc_options: []
@@ -127,8 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
188
  - !ruby/object:Gem::Version
128
189
  version: '0'
129
190
  requirements: []
130
- rubyforge_project:
131
- rubygems_version: 2.4.5.1
191
+ rubygems_version: 3.0.3
132
192
  signing_key:
133
193
  specification_version: 4
134
194
  summary: Ruby library to help you build your crypto application on BlockCypher