minitest-vcr 1.2.2 → 1.3.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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e2e4822bb5bb9d78c392e978d4c59b6fc9416a48
|
|
4
|
+
data.tar.gz: b95124993966eac0440db91250e89d252bda899a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8477b40032c747c4868e047219924e469e1cb13c361be73e6d08e211c960137e9eec1ec5be1a2281d9603d9df060733247471e1b37700eed6c258b1008b19fd4
|
|
7
|
+
data.tar.gz: f6267618ebe6c5ea253e6c25288a2b566bf5559fde62ea4e6257520305c3a2843644751adff7779a4419087c43623391d6645bc50e0b0d9fe2026a41a2b74702
|
data/lib/minitest-vcr/spec.rb
CHANGED
|
@@ -55,3 +55,25 @@ module MinitestVcr
|
|
|
55
55
|
|
|
56
56
|
end
|
|
57
57
|
end # MinitestVcr
|
|
58
|
+
|
|
59
|
+
if defined? ActiveSupport::TestCase
|
|
60
|
+
class ActiveSupport::TestCase
|
|
61
|
+
def before_setup
|
|
62
|
+
super
|
|
63
|
+
if self.class.name.match("::vcr::")
|
|
64
|
+
base_path = self.class.name.split("::")
|
|
65
|
+
.map {|p| p.underscore.gsub(" ", "_") unless p == "vcr" }.join("/")
|
|
66
|
+
|
|
67
|
+
file_name = name.gsub(/^test_.\d+_/, " ").strip.gsub(" ", "_")
|
|
68
|
+
VCR.insert_cassette(base_path + "/" + file_name)
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def after_teardown
|
|
73
|
+
if self.class.name.match("::vcr::")
|
|
74
|
+
::VCR.eject_cassette
|
|
75
|
+
end
|
|
76
|
+
super
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
data/lib/minitest-vcr/version.rb
CHANGED
|
@@ -8,11 +8,11 @@ http_interactions:
|
|
|
8
8
|
string: ''
|
|
9
9
|
headers:
|
|
10
10
|
User-Agent:
|
|
11
|
-
- Faraday v0.9.
|
|
11
|
+
- Faraday v0.9.1
|
|
12
12
|
Accept-Encoding:
|
|
13
13
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
14
14
|
Accept:
|
|
15
|
-
-
|
|
15
|
+
- "*/*"
|
|
16
16
|
response:
|
|
17
17
|
status:
|
|
18
18
|
code: 200
|
|
@@ -25,15 +25,15 @@ http_interactions:
|
|
|
25
25
|
Content-Type:
|
|
26
26
|
- text/html
|
|
27
27
|
Date:
|
|
28
|
-
-
|
|
28
|
+
- Tue, 31 Mar 2015 20:03:52 GMT
|
|
29
29
|
Etag:
|
|
30
|
-
-
|
|
30
|
+
- '"359670651"'
|
|
31
31
|
Expires:
|
|
32
|
-
-
|
|
32
|
+
- Tue, 07 Apr 2015 20:03:52 GMT
|
|
33
33
|
Last-Modified:
|
|
34
34
|
- Fri, 09 Aug 2013 23:54:35 GMT
|
|
35
35
|
Server:
|
|
36
|
-
- ECS (
|
|
36
|
+
- ECS (sjc/16A4)
|
|
37
37
|
X-Cache:
|
|
38
38
|
- HIT
|
|
39
39
|
X-Ec-Custom-Error:
|
|
@@ -41,8 +41,8 @@ http_interactions:
|
|
|
41
41
|
Content-Length:
|
|
42
42
|
- '1270'
|
|
43
43
|
body:
|
|
44
|
-
encoding:
|
|
45
|
-
string:
|
|
44
|
+
encoding: UTF-8
|
|
45
|
+
string: "<!doctype html>\n<html>\n<head>\n <title>Example Domain</title>\n\n
|
|
46
46
|
\ <meta charset=\"utf-8\" />\n <meta http-equiv=\"Content-type\" content=\"text/html;
|
|
47
47
|
charset=utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width,
|
|
48
48
|
initial-scale=1\" />\n <style type=\"text/css\">\n body {\n background-color:
|
|
@@ -60,5 +60,5 @@ http_interactions:
|
|
|
60
60
|
or asking for permission.</p>\n <p><a href=\"http://www.iana.org/domains/example\">More
|
|
61
61
|
information...</a></p>\n</div>\n</body>\n</html>\n"
|
|
62
62
|
http_version:
|
|
63
|
-
recorded_at:
|
|
63
|
+
recorded_at: Tue, 31 Mar 2015 20:03:52 GMT
|
|
64
64
|
recorded_with: VCR 2.9.3
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: minitest-vcr
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mike Piccolo
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2015-03-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: vcr
|
|
@@ -202,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
202
202
|
version: '0'
|
|
203
203
|
requirements: []
|
|
204
204
|
rubyforge_project:
|
|
205
|
-
rubygems_version: 2.
|
|
205
|
+
rubygems_version: 2.4.5
|
|
206
206
|
signing_key:
|
|
207
207
|
specification_version: 4
|
|
208
208
|
summary: Allows VCR to automatically make cassetes with proper file paths with MiniTest
|