bitcoin_testnet 0.3.1 → 0.4.0
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.
@@ -1,12 +1,16 @@
|
|
1
1
|
module BitcoinTestnet
|
2
2
|
class VcrIntegrator
|
3
3
|
|
4
|
-
def self.start
|
5
|
-
self.new.start
|
4
|
+
def self.start(*args)
|
5
|
+
self.new(*args).start
|
6
6
|
end
|
7
7
|
|
8
|
-
def self.stop
|
9
|
-
self.new.stop
|
8
|
+
def self.stop(*args)
|
9
|
+
self.new(*args).stop
|
10
|
+
end
|
11
|
+
|
12
|
+
def initialize(rspec_example)
|
13
|
+
@rspec_example = rspec_example
|
10
14
|
end
|
11
15
|
|
12
16
|
def start
|
@@ -20,6 +24,7 @@ module BitcoinTestnet
|
|
20
24
|
private
|
21
25
|
|
22
26
|
def should_perform?
|
27
|
+
return false unless @rspec_example.metadata[:vcr]
|
23
28
|
return true if !cassette_exists? && allow_unused_http_interactions?
|
24
29
|
return true if !cassette_exists?
|
25
30
|
false
|
data/lib/bitcoin_testnet.rb
CHANGED
@@ -23,8 +23,8 @@ module BitcoinTestnet
|
|
23
23
|
|
24
24
|
def self.configure_with_rspec_and_vcr!
|
25
25
|
RSpec.configure do |c|
|
26
|
-
c.before(:each) { VcrIntegrator.start }
|
27
|
-
c.after(:each) { VcrIntegrator.stop }
|
26
|
+
c.before(:each) { VcrIntegrator.start(example) }
|
27
|
+
c.after(:each) { VcrIntegrator.stop(example) }
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bitcoin_testnet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-04-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|