bitcoin_testnet 0.5.0 → 0.5.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile +2 -0
- data/README.md +2 -2
- data/lib/bitcoin_testnet.rb +9 -0
- data/lib/bitcoin_testnet/vcr_integrator.rb +1 -1
- data/lib/bitcoin_testnet/version.rb +1 -1
- data/spec/{bitcoint_testnet → bitcoin_testnet}/executes_spec.rb +0 -0
- data/spec/{bitcoint_testnet → bitcoin_testnet}/executor_spec.rb +0 -0
- data/spec/{bitcoint_testnet → bitcoin_testnet}/prepares_command_spec.rb +0 -0
- data/spec/bitcoin_testnet/vcr_integrator_spec.rb +15 -0
- metadata +10 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fcbe4320fd084077ac6c4a41b014f5d48714471
|
4
|
+
data.tar.gz: cc94f8ec6da3d51bb8f6f151a4992d581439a3a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 769cd0647c62e03aab1e14591a0de373bf27d8c7bd399a36d0ddcc3d3ef346efb0fbbbe96697e65ddc50f6b4d31a0a7f5402abb8ec97b8df912ce4a8229d6b9a
|
7
|
+
data.tar.gz: 6e0c20e4a8cb9933d094c86c1c9429a6d1fdcbf6f1f26f26edb2e3259e493b7f2bf12ab2f8401b84bc91b8ef3876cff47d298c67b6d4c440bbc753945fbd9cb2
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -14,14 +14,14 @@ Second, you have to tell BitcoinTestnet where the testnet in a box directory is.
|
|
14
14
|
|
15
15
|
git submodule add https://github.com/freewil/bitcoin-testnet-box spec/testnet
|
16
16
|
|
17
|
+
See the readme of `bitcoin-testnet-box` to see what version of `bitcoind` to install. The test net you download is configured with a certain version of the bitcoin daemon.
|
18
|
+
|
17
19
|
Then, in your `test_helper`/`spec_helper`:
|
18
20
|
|
19
21
|
BitcoinTestnet.dir = "spec/testnet"
|
20
22
|
|
21
23
|
Third, tell `BitcoinTestnet` when to do its work:
|
22
24
|
|
23
|
-
**Note**: if you user RSpec and VCR, see "RSpec and VCR" section below.
|
24
|
-
|
25
25
|
- Before each spec, call `BitcoinTestnet.start`. This will start and clean the Testnet, so it looks like it did the first time you started the Testnet.
|
26
26
|
- After the test suite is finished, call `BitcoinTestnet.stop`. This turns off the Testnet.
|
27
27
|
|
data/lib/bitcoin_testnet.rb
CHANGED
@@ -15,6 +15,9 @@ module BitcoinTestnet
|
|
15
15
|
mattr_accessor :dir
|
16
16
|
@@dir = nil
|
17
17
|
|
18
|
+
mattr_accessor :current_test
|
19
|
+
@@current_test = nil
|
20
|
+
|
18
21
|
def self.start
|
19
22
|
Booter.boot
|
20
23
|
end
|
@@ -28,6 +31,12 @@ module BitcoinTestnet
|
|
28
31
|
c.before(:each) { VcrIntegrator.start(example) }
|
29
32
|
c.after(:each) { VcrIntegrator.stop(example) }
|
30
33
|
end
|
34
|
+
|
35
|
+
VCR.configure do |c|
|
36
|
+
c.before_record do |interaction|
|
37
|
+
interaction.ignore! if BitcoinTestnet.current_test.exception
|
38
|
+
end
|
39
|
+
end
|
31
40
|
end
|
32
41
|
|
33
42
|
end
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
module BitcoinTestnet
|
4
|
+
describe VcrIntegrator do
|
5
|
+
|
6
|
+
describe ".start" do
|
7
|
+
it "sets the BitcoinTestnet.current_test to be the given test" do
|
8
|
+
test = double(metadata: {})
|
9
|
+
described_class.start(test)
|
10
|
+
expect(BitcoinTestnet.current_test).to eq(test)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bitcoin_testnet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ramon Tayag
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -77,9 +77,10 @@ files:
|
|
77
77
|
- lib/bitcoin_testnet/stopper.rb
|
78
78
|
- lib/bitcoin_testnet/vcr_integrator.rb
|
79
79
|
- lib/bitcoin_testnet/version.rb
|
80
|
-
- spec/
|
81
|
-
- spec/
|
82
|
-
- spec/
|
80
|
+
- spec/bitcoin_testnet/executes_spec.rb
|
81
|
+
- spec/bitcoin_testnet/executor_spec.rb
|
82
|
+
- spec/bitcoin_testnet/prepares_command_spec.rb
|
83
|
+
- spec/bitcoin_testnet/vcr_integrator_spec.rb
|
83
84
|
- spec/spec_helper.rb
|
84
85
|
- testnet/1/bitcoin.conf
|
85
86
|
- testnet/1/testnet3/blk0001.dat
|
@@ -120,7 +121,8 @@ specification_version: 4
|
|
120
121
|
summary: A gem of helpers for making integration tests with the Bitcoin testnet a
|
121
122
|
little easier.
|
122
123
|
test_files:
|
123
|
-
- spec/
|
124
|
-
- spec/
|
125
|
-
- spec/
|
124
|
+
- spec/bitcoin_testnet/executes_spec.rb
|
125
|
+
- spec/bitcoin_testnet/executor_spec.rb
|
126
|
+
- spec/bitcoin_testnet/prepares_command_spec.rb
|
127
|
+
- spec/bitcoin_testnet/vcr_integrator_spec.rb
|
126
128
|
- spec/spec_helper.rb
|