rspectacular 0.48.0 → 0.49.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e32e96801f2260691b7265812354dbd799dbee26
4
- data.tar.gz: 66ce79700fa1a2da2b447fc86c8dfe9246d97fe0
3
+ metadata.gz: c708c8152fdbd84414bffdae2fefa7988d76b422
4
+ data.tar.gz: c1033432c444027c508819658eef41ccd6264c34
5
5
  SHA512:
6
- metadata.gz: 42a7e1cfb54f9ede0b889930ab915877ad3c07876054ecbe5d5daee2115c28908c9293cb98aa3d73647134808741b6442460d04d6dcf11cd28a9086b41739492
7
- data.tar.gz: c4bff608f19a777c178193bf037f02cc703fd11ceb61a4c97bdf648084d4e393ffdebb115ac445c885e1572de78422559783d65c443404e0bff26e55e6d5dcd7
6
+ metadata.gz: 94e7ce5b49088eb502be19d3e7500b2f977308ee074448244aed9b5de4c35037e1e1010da9e2bd322880ade2f4091a9f6c8177d6bc550dd00fabded9a9140b9a
7
+ data.tar.gz: 7aecc751f856f12bfd9186aa1078f96ad5de712fddcb8c4bedd66aec95a956834de55f5af4337cffe9720c0f3b0be88f4698f2f2bd193144ba9eb23f83534f44
@@ -7,18 +7,28 @@ begin
7
7
 
8
8
  RSpec.configure do |config|
9
9
  config.after(:each, stripe: true) do
10
- VCR.turn_off! if defined?(VCR)
11
- WebMock.allow_net_connect! if defined?(WebMock)
10
+ if defined?(VCR)
11
+ vcr_turned_on = VCR.turned_on?
12
+ VCR.turn_off!
13
+ end
12
14
 
13
- Stripe::Plan.all(:count => 100).each do |plan|
14
- if plan.id.match(/test/i) || plan.name.match(/test/i)
15
- plan.delete
16
- end
15
+ if defined?(WebMock)
16
+ webmock_net_connect = WebMock.net_connect_allowed?
17
+ WebMock.allow_net_connect!
17
18
  end
18
19
 
19
- Stripe::Customer.all(:count => 100).each(&:delete)
20
+ begin
21
+ Stripe::Plan.all(:count => 100).each do |plan|
22
+ if plan.id.match(/test/i) || plan.name.match(/test/i)
23
+ plan.delete
24
+ end
25
+ end
20
26
 
21
- VCR.turn_on! if defined?(VCR)
27
+ Stripe::Customer.all(:count => 100).each(&:delete)
28
+ ensure
29
+ VCR.turn_on! if defined?(VCR) && vcr_turned_on
30
+ WebMock.allow_net_connect! if defined?(WebMock) && webmock_net_connect
31
+ end
22
32
  end
23
33
  end
24
34
  rescue LoadError
@@ -1,3 +1,3 @@
1
1
  module RSpectacular
2
- VERSION = '0.48.0'
2
+ VERSION = '0.49.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspectacular
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.48.0
4
+ version: 0.49.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - jfelchner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-31 00:00:00.000000000 Z
11
+ date: 2014-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec