rack-vcr 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +25 -1
- data/lib/rack/vcr/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a363c46853907046d67adc464963251eecd4b276
|
4
|
+
data.tar.gz: c2a672a981910a93d2cbca50a8aee7b0f74e8e9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4f10f5006867f4b86d472f242e4e40e7f8f475e8f745439b2fcbdfc8470d0d9356d7f034379ecca26faa7f292ee0f22abaea5224f37176a75de605c121fecc2
|
7
|
+
data.tar.gz: 734e6a3adcf2e8f8f0c6da178a69bb8b0fa8e2147c31e5cc8df3da5a42bf5e2b7ea7ee7f2aa72b9530ad3f13505eb9a7ff99a7f034a500c3c075e420d957ce68
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -22,7 +22,31 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
### Rails
|
24
24
|
|
25
|
-
|
25
|
+
In `config/initializer/rack_vcr.rb`:
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
if Rails.env.test?
|
29
|
+
Rails.configuration.middleware.insert(0, Rack::VCR)
|
30
|
+
end
|
31
|
+
```
|
32
|
+
|
33
|
+
In `spec/spec_helper.rb`:
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
VCR.configure do |config|
|
37
|
+
config.cassette_library_dir = 'doc/cassettes'
|
38
|
+
end
|
39
|
+
|
40
|
+
RSpec.configure do |config|
|
41
|
+
config.around(:each, type: :request) do |ex|
|
42
|
+
host! "yourapp.hostname"
|
43
|
+
name = example.full_description.gsub /[^\w\-]/, '_'
|
44
|
+
VCR.use_cassette(name, record: :all) do
|
45
|
+
ex.run
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
```
|
26
50
|
|
27
51
|
### Sinatra/Rack
|
28
52
|
|
data/lib/rack/vcr/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-vcr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tatsuhiko Miyagawa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: vcr
|