vcr 3.0.3 → 4.0.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.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/lib/vcr.rb +18 -1
  3. data/lib/vcr/cassette.rb +11 -3
  4. data/lib/vcr/cassette/persisters/file_system.rb +1 -1
  5. data/lib/vcr/configuration.rb +3 -5
  6. data/lib/vcr/deprecations.rb +0 -62
  7. data/lib/vcr/errors.rb +16 -0
  8. data/lib/vcr/library_hooks/typhoeus.rb +37 -8
  9. data/lib/vcr/middleware/faraday.rb +5 -1
  10. data/lib/vcr/structs.rb +1 -1
  11. data/lib/vcr/util/hooks.rb +1 -0
  12. data/lib/vcr/version.rb +1 -1
  13. metadata +9 -249
  14. data/features/CHANGELOG.md +0 -710
  15. data/features/CONTRIBUTING.md +0 -26
  16. data/features/LICENSE.md +0 -20
  17. data/features/README.md +0 -339
  18. data/features/Upgrade.md +0 -289
  19. data/features/about_these_examples.md +0 -18
  20. data/features/cassettes/allow_unused_http_interactions.feature +0 -100
  21. data/features/cassettes/automatic_re_recording.feature +0 -72
  22. data/features/cassettes/decompress.feature +0 -74
  23. data/features/cassettes/dynamic_erb.feature +0 -100
  24. data/features/cassettes/exclusive.feature +0 -126
  25. data/features/cassettes/format.feature +0 -411
  26. data/features/cassettes/freezing_time.feature +0 -68
  27. data/features/cassettes/naming.feature +0 -28
  28. data/features/cassettes/no_cassette.feature +0 -152
  29. data/features/cassettes/update_content_length_header.feature +0 -112
  30. data/features/configuration/allow_http_connections_when_no_cassette.feature +0 -55
  31. data/features/configuration/cassette_library_dir.feature +0 -31
  32. data/features/configuration/debug_logging.feature +0 -58
  33. data/features/configuration/default_cassette_options.feature +0 -100
  34. data/features/configuration/filter_sensitive_data.feature +0 -153
  35. data/features/configuration/hook_into.feature +0 -172
  36. data/features/configuration/ignore_request.feature +0 -192
  37. data/features/configuration/preserve_exact_body_bytes.feature +0 -108
  38. data/features/configuration/query_parser.feature +0 -84
  39. data/features/configuration/uri_parser.feature +0 -93
  40. data/features/getting_started.md +0 -82
  41. data/features/hooks/after_http_request.feature +0 -58
  42. data/features/hooks/around_http_request.feature +0 -57
  43. data/features/hooks/before_http_request.feature +0 -63
  44. data/features/hooks/before_playback.feature +0 -184
  45. data/features/hooks/before_record.feature +0 -172
  46. data/features/http_libraries/em_http_request.feature +0 -250
  47. data/features/http_libraries/net_http.feature +0 -179
  48. data/features/middleware/faraday.feature +0 -56
  49. data/features/middleware/rack.feature +0 -92
  50. data/features/record_modes/all.feature +0 -82
  51. data/features/record_modes/new_episodes.feature +0 -79
  52. data/features/record_modes/none.feature +0 -72
  53. data/features/record_modes/once.feature +0 -95
  54. data/features/request_matching/README.md +0 -30
  55. data/features/request_matching/body.feature +0 -91
  56. data/features/request_matching/body_as_json.feature +0 -90
  57. data/features/request_matching/custom_matcher.feature +0 -135
  58. data/features/request_matching/headers.feature +0 -85
  59. data/features/request_matching/host.feature +0 -95
  60. data/features/request_matching/identical_request_sequence.feature +0 -89
  61. data/features/request_matching/method.feature +0 -96
  62. data/features/request_matching/path.feature +0 -96
  63. data/features/request_matching/playback_repeats.feature +0 -98
  64. data/features/request_matching/query.feature +0 -97
  65. data/features/request_matching/uri.feature +0 -94
  66. data/features/request_matching/uri_without_param.feature +0 -101
  67. data/features/step_definitions/cli_steps.rb +0 -199
  68. data/features/support/env.rb +0 -46
  69. data/features/support/http_lib_filters.rb +0 -46
  70. data/features/test_frameworks/cucumber.feature +0 -211
  71. data/features/test_frameworks/rspec_macro.feature +0 -81
  72. data/features/test_frameworks/rspec_metadata.feature +0 -150
  73. data/features/test_frameworks/test_unit.feature +0 -49
  74. data/lib/vcr/extensions/net_http_response.rb +0 -36
  75. data/lib/vcr/library_hooks/fakeweb.rb +0 -197
  76. data/spec/acceptance/concurrency_spec.rb +0 -51
  77. data/spec/acceptance/threading_spec.rb +0 -34
  78. data/spec/fixtures/cassette_spec/1_x_cassette.yml +0 -110
  79. data/spec/fixtures/cassette_spec/empty.yml +0 -0
  80. data/spec/fixtures/cassette_spec/example.yml +0 -111
  81. data/spec/fixtures/cassette_spec/with_localhost_requests.yml +0 -111
  82. data/spec/fixtures/fake_example_responses.yml +0 -110
  83. data/spec/fixtures/match_requests_on.yml +0 -187
  84. data/spec/lib/vcr/cassette/erb_renderer_spec.rb +0 -53
  85. data/spec/lib/vcr/cassette/http_interaction_list_spec.rb +0 -295
  86. data/spec/lib/vcr/cassette/migrator_spec.rb +0 -196
  87. data/spec/lib/vcr/cassette/persisters/file_system_spec.rb +0 -75
  88. data/spec/lib/vcr/cassette/persisters_spec.rb +0 -39
  89. data/spec/lib/vcr/cassette/serializers_spec.rb +0 -182
  90. data/spec/lib/vcr/cassette_spec.rb +0 -618
  91. data/spec/lib/vcr/configuration_spec.rb +0 -326
  92. data/spec/lib/vcr/deprecations_spec.rb +0 -85
  93. data/spec/lib/vcr/errors_spec.rb +0 -178
  94. data/spec/lib/vcr/extensions/net_http_response_spec.rb +0 -86
  95. data/spec/lib/vcr/library_hooks/excon_spec.rb +0 -104
  96. data/spec/lib/vcr/library_hooks/fakeweb_spec.rb +0 -169
  97. data/spec/lib/vcr/library_hooks/faraday_spec.rb +0 -68
  98. data/spec/lib/vcr/library_hooks/typhoeus_0.4_spec.rb +0 -36
  99. data/spec/lib/vcr/library_hooks/typhoeus_spec.rb +0 -162
  100. data/spec/lib/vcr/library_hooks/webmock_spec.rb +0 -117
  101. data/spec/lib/vcr/library_hooks_spec.rb +0 -51
  102. data/spec/lib/vcr/middleware/faraday_spec.rb +0 -181
  103. data/spec/lib/vcr/middleware/rack_spec.rb +0 -115
  104. data/spec/lib/vcr/request_ignorer_spec.rb +0 -70
  105. data/spec/lib/vcr/request_matcher_registry_spec.rb +0 -345
  106. data/spec/lib/vcr/structs_spec.rb +0 -732
  107. data/spec/lib/vcr/test_frameworks/cucumber_spec.rb +0 -107
  108. data/spec/lib/vcr/test_frameworks/rspec_spec.rb +0 -94
  109. data/spec/lib/vcr/util/hooks_spec.rb +0 -158
  110. data/spec/lib/vcr/util/internet_connection_spec.rb +0 -37
  111. data/spec/lib/vcr/util/version_checker_spec.rb +0 -31
  112. data/spec/lib/vcr/version_spec.rb +0 -27
  113. data/spec/lib/vcr_spec.rb +0 -354
  114. data/spec/monkey_patches.rb +0 -186
  115. data/spec/spec_helper.rb +0 -63
  116. data/spec/support/configuration_stubbing.rb +0 -8
  117. data/spec/support/cucumber_helpers.rb +0 -39
  118. data/spec/support/fixnum_extension.rb +0 -10
  119. data/spec/support/http_library_adapters.rb +0 -289
  120. data/spec/support/limited_uri.rb +0 -21
  121. data/spec/support/ruby_interpreter.rb +0 -7
  122. data/spec/support/shared_example_groups/excon.rb +0 -63
  123. data/spec/support/shared_example_groups/hook_into_http_library.rb +0 -594
  124. data/spec/support/shared_example_groups/request_hooks.rb +0 -59
  125. data/spec/support/sinatra_app.rb +0 -86
  126. data/spec/support/vcr_localhost_server.rb +0 -76
  127. data/spec/support/vcr_stub_helpers.rb +0 -17
File without changes
@@ -1,111 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://example.com/
6
- body: ''
7
- headers: {}
8
- response:
9
- status:
10
- code: 200
11
- message: OK
12
- headers:
13
- Last-Modified:
14
- - Tue, 15 Nov 2005 13:24:10 GMT
15
- Connection:
16
- - Keep-Alive
17
- Date:
18
- - Thu, 25 Feb 2010 07:52:38 GMT
19
- Content-Type:
20
- - text/html; charset=UTF-8
21
- Etag:
22
- - ! '"24ec5-1b6-4059a80bfd280"'
23
- Server:
24
- - Apache/2.2.3 (CentOS)
25
- Content-Length:
26
- - '438'
27
- Age:
28
- - '3009'
29
- Accept-Ranges:
30
- - bytes
31
- body: ! "<HTML>\n<HEAD>\n <TITLE>Example Web Page</TITLE>\n</HEAD> \n<body> \n<p>You
32
- have reached this web page by typing &quot;example.com&quot;,\n&quot;example.net&quot;,\n
33
- \ or &quot;example.org&quot; into your web browser.</p>\n<p>These domain names
34
- are reserved for use in documentation and are not available \n for registration.
35
- See <a href=\"http://www.rfc-editor.org/rfc/rfc2606.txt\">RFC \n 2606</a>,
36
- Section 3.</p>\n</BODY>\n</HTML>\n"
37
- http_version: '1.1'
38
- recorded_at: Tue, 01 Nov 2011 04:49:54 GMT
39
- - request:
40
- method: get
41
- uri: http://example.com/foo
42
- body: ''
43
- headers: {}
44
- response:
45
- status:
46
- code: 404
47
- message: Not Found
48
- headers:
49
- Connection:
50
- - close
51
- Content-Type:
52
- - text/html; charset=iso-8859-1
53
- Date:
54
- - Thu, 25 Feb 2010 07:52:38 GMT
55
- Server:
56
- - Apache/2.2.3 (CentOS)
57
- Content-Length:
58
- - '277'
59
- body: ! '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
60
-
61
- <html><head>
62
-
63
- <title>404 Not Found</title>
64
-
65
- </head><body>
66
-
67
- <h1>Not Found</h1>
68
-
69
- <p>The requested URL /foo was not found on this server.</p>
70
-
71
- <hr>
72
-
73
- <address>Apache/2.2.3 (CentOS) Server at example.com Port 80</address>
74
-
75
- </body></html>
76
-
77
- '
78
- http_version: '1.1'
79
- recorded_at: Tue, 01 Nov 2011 04:49:54 GMT
80
- - request:
81
- method: get
82
- uri: http://example.com/
83
- body: ''
84
- headers: {}
85
- response:
86
- status:
87
- code: 200
88
- message: OK
89
- headers:
90
- Last-Modified:
91
- - Tue, 15 Nov 2005 13:24:10 GMT
92
- Connection:
93
- - Keep-Alive
94
- Date:
95
- - Thu, 25 Feb 2010 07:52:38 GMT
96
- Content-Type:
97
- - text/html; charset=UTF-8
98
- Etag:
99
- - ! '"24ec5-1b6-4059a80bfd280"'
100
- Server:
101
- - Apache/2.2.3 (CentOS)
102
- Content-Length:
103
- - '438'
104
- Age:
105
- - '3009'
106
- Accept-Ranges:
107
- - bytes
108
- body: Another example.com response
109
- http_version: '1.1'
110
- recorded_at: Tue, 01 Nov 2011 04:49:54 GMT
111
- recorded_with: VCR 2.0.0
@@ -1,111 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://localhost/
6
- body: ''
7
- headers: {}
8
- response:
9
- status:
10
- code: 200
11
- message: OK
12
- headers:
13
- Etag:
14
- - ! '"24ec5-1b6-4059a80bfd280"'
15
- Last-Modified:
16
- - Tue, 15 Nov 2005 13:24:10 GMT
17
- Connection:
18
- - Keep-Alive
19
- Content-Type:
20
- - text/html; charset=UTF-8
21
- Date:
22
- - Thu, 25 Feb 2010 07:53:51 GMT
23
- Server:
24
- - Apache/2.2.3 (CentOS)
25
- Content-Length:
26
- - '438'
27
- Age:
28
- - '9260'
29
- Accept-Ranges:
30
- - bytes
31
- body: Localhost response
32
- http_version: '1.1'
33
- recorded_at: Tue, 01 Nov 2011 04:49:54 GMT
34
- - request:
35
- method: get
36
- uri: http://127.0.0.1/
37
- body: ''
38
- headers: {}
39
- response:
40
- status:
41
- code: 404
42
- message: Not Found
43
- headers:
44
- Content-Type:
45
- - text/html; charset=iso-8859-1
46
- Connection:
47
- - close
48
- Server:
49
- - Apache/2.2.3 (CentOS)
50
- Date:
51
- - Thu, 25 Feb 2010 07:53:52 GMT
52
- Content-Length:
53
- - '277'
54
- body: 127.0.0.1 response
55
- http_version: '1.1'
56
- recorded_at: Tue, 01 Nov 2011 04:49:54 GMT
57
- - request:
58
- method: get
59
- uri: http://0.0.0.0/
60
- body: ''
61
- headers: {}
62
- response:
63
- status:
64
- code: 404
65
- message: Not Found
66
- headers:
67
- Content-Type:
68
- - text/html; charset=iso-8859-1
69
- Connection:
70
- - close
71
- Server:
72
- - Apache/2.2.3 (CentOS)
73
- Date:
74
- - Thu, 25 Feb 2010 07:53:52 GMT
75
- Content-Length:
76
- - '277'
77
- body: 127.0.0.1 response
78
- http_version: '1.1'
79
- recorded_at: Tue, 01 Nov 2011 04:49:54 GMT
80
- - request:
81
- method: get
82
- uri: http://example.com/
83
- body: ''
84
- headers: {}
85
- response:
86
- status:
87
- code: 200
88
- message: OK
89
- headers:
90
- Etag:
91
- - ! '"24ec5-1b6-4059a80bfd280"'
92
- Last-Modified:
93
- - Tue, 15 Nov 2005 13:24:10 GMT
94
- Connection:
95
- - Keep-Alive
96
- Content-Type:
97
- - text/html; charset=UTF-8
98
- Date:
99
- - Thu, 25 Feb 2010 07:53:51 GMT
100
- Server:
101
- - Apache/2.2.3 (CentOS)
102
- Content-Length:
103
- - '438'
104
- Age:
105
- - '9260'
106
- Accept-Ranges:
107
- - bytes
108
- body: example.com response
109
- http_version: '1.1'
110
- recorded_at: Tue, 01 Nov 2011 04:49:54 GMT
111
- recorded_with: VCR 1.11.3
@@ -1,110 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://example.com/foo
6
- body: ''
7
- headers: {}
8
- response:
9
- status:
10
- code: 200
11
- message: OK
12
- headers:
13
- Last-Modified:
14
- - Tue, 15 Nov 2005 13:24:10 GMT
15
- Connection:
16
- - Keep-Alive
17
- Etag:
18
- - ! '"24ec5-1b6-4059a80bfd280"'
19
- Content-Type:
20
- - text/html; charset=UTF-8
21
- Date:
22
- - Wed, 31 Mar 2010 02:43:23 GMT
23
- Server:
24
- - Apache/2.2.3 (CentOS)
25
- Content-Length:
26
- - '438'
27
- Age:
28
- - '3285'
29
- Accept-Ranges:
30
- - bytes
31
- body: example.com get response 1 with path=foo
32
- http_version: '1.1'
33
- recorded_at: Tue, 01 Nov 2011 04:49:54 GMT
34
- - request:
35
- method: get
36
- uri: http://example.com/foo
37
- body: ''
38
- headers: {}
39
- response:
40
- status:
41
- code: 200
42
- message: OK
43
- headers:
44
- Last-Modified:
45
- - Tue, 15 Nov 2005 13:24:10 GMT
46
- Connection:
47
- - Keep-Alive
48
- Etag:
49
- - ! '"24ec5-1b6-4059a80bfd280"'
50
- Content-Type:
51
- - text/html; charset=UTF-8
52
- Date:
53
- - Wed, 31 Mar 2010 02:43:23 GMT
54
- Server:
55
- - Apache/2.2.3 (CentOS)
56
- Content-Length:
57
- - '438'
58
- Age:
59
- - '3285'
60
- Accept-Ranges:
61
- - bytes
62
- body: example.com get response 2 with path=foo
63
- http_version: '1.1'
64
- recorded_at: Tue, 01 Nov 2011 04:49:54 GMT
65
- - request:
66
- method: post
67
- uri: http://example.com/
68
- body: ''
69
- headers: {}
70
- response:
71
- status:
72
- code: 200
73
- message: OK
74
- headers:
75
- Last-Modified:
76
- - Tue, 15 Nov 2005 13:24:10 GMT
77
- Connection:
78
- - close
79
- Etag:
80
- - ! '"24ec5-1b6-4059a80bfd280"'
81
- Content-Type:
82
- - text/html; charset=UTF-8
83
- Date:
84
- - Wed, 31 Mar 2010 02:43:26 GMT
85
- Server:
86
- - Apache/2.2.3 (CentOS)
87
- Content-Length:
88
- - '438'
89
- Accept-Ranges:
90
- - bytes
91
- body: example.com post response with id=3
92
- http_version: '1.1'
93
- recorded_at: Tue, 01 Nov 2011 04:49:54 GMT
94
- - request:
95
- method: get
96
- uri: http://example.com/two_set_cookie_headers
97
- body: ''
98
- headers: {}
99
- response:
100
- status:
101
- code: 200
102
- message: OK
103
- headers:
104
- Set-Cookie:
105
- - bar=bazz
106
- - foo=bar
107
- body: this respons has two set-cookie headers
108
- http_version: '1.1'
109
- recorded_at: Tue, 01 Nov 2011 04:49:54 GMT
110
- recorded_with: VCR 1.11.3
@@ -1,187 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: http://example.com/method
6
- body: ''
7
- headers: {}
8
- response:
9
- status:
10
- code: 200
11
- message: OK
12
- headers:
13
- Etag:
14
- - ! '"24ec5-1b6-4059a80bfd280"'
15
- body: post method response
16
- http_version: '1.1'
17
- recorded_at: Tue, 01 Nov 2011 04:49:54 GMT
18
- - request:
19
- method: get
20
- uri: http://example.com/method
21
- body: ''
22
- headers: {}
23
- response:
24
- status:
25
- code: 200
26
- message: OK
27
- headers:
28
- Etag:
29
- - ! '"24ec5-1b6-4059a80bfd280"'
30
- body: get method response
31
- http_version: '1.1'
32
- recorded_at: Tue, 01 Nov 2011 04:49:54 GMT
33
- - request:
34
- method: post
35
- uri: http://example1.com/host
36
- body: ''
37
- headers: {}
38
- response:
39
- status:
40
- code: 200
41
- message: OK
42
- headers:
43
- Etag:
44
- - ! '"24ec5-1b6-4059a80bfd280"'
45
- body: example1.com host response
46
- http_version: '1.1'
47
- recorded_at: Tue, 01 Nov 2011 04:49:54 GMT
48
- - request:
49
- method: post
50
- uri: http://example2.com/host
51
- body: ''
52
- headers: {}
53
- response:
54
- status:
55
- code: 200
56
- message: OK
57
- headers:
58
- Etag:
59
- - ! '"24ec5-1b6-4059a80bfd280"'
60
- body: example2.com host response
61
- http_version: '1.1'
62
- recorded_at: Tue, 01 Nov 2011 04:49:54 GMT
63
- - request:
64
- method: post
65
- uri: http://example.com/path1
66
- body: ''
67
- headers: {}
68
- response:
69
- status:
70
- code: 200
71
- message: OK
72
- headers:
73
- Etag:
74
- - ! '"24ec5-1b6-4059a80bfd280"'
75
- body: path1 response
76
- http_version: '1.1'
77
- recorded_at: Tue, 01 Nov 2011 04:49:54 GMT
78
- - request:
79
- method: post
80
- uri: http://example.com/path2
81
- body: ''
82
- headers: {}
83
- response:
84
- status:
85
- code: 200
86
- message: OK
87
- headers:
88
- Etag:
89
- - ! '"24ec5-1b6-4059a80bfd280"'
90
- body: path2 response
91
- http_version: '1.1'
92
- recorded_at: Tue, 01 Nov 2011 04:49:54 GMT
93
- - request:
94
- method: post
95
- uri: http://example.com/uri1
96
- body: ''
97
- headers: {}
98
- response:
99
- status:
100
- code: 200
101
- message: OK
102
- headers:
103
- Etag:
104
- - ! '"24ec5-1b6-4059a80bfd280"'
105
- body: uri1 response
106
- http_version: '1.1'
107
- recorded_at: Tue, 01 Nov 2011 04:49:54 GMT
108
- - request:
109
- method: post
110
- uri: http://example.com/uri2
111
- body: ''
112
- headers: {}
113
- response:
114
- status:
115
- code: 200
116
- message: OK
117
- headers:
118
- Etag:
119
- - ! '"24ec5-1b6-4059a80bfd280"'
120
- body: uri2 response
121
- http_version: '1.1'
122
- recorded_at: Tue, 01 Nov 2011 04:49:54 GMT
123
- - request:
124
- method: post
125
- uri: http://example.com/
126
- body: param=val1
127
- headers: {}
128
- response:
129
- status:
130
- code: 200
131
- message: OK
132
- headers:
133
- Etag:
134
- - ! '"24ec5-1b6-4059a80bfd280"'
135
- body: val1 body response
136
- http_version: '1.1'
137
- recorded_at: Tue, 01 Nov 2011 04:49:54 GMT
138
- - request:
139
- method: post
140
- uri: http://example.com/
141
- body: param=val2
142
- headers: {}
143
- response:
144
- status:
145
- code: 200
146
- message: OK
147
- headers:
148
- Etag:
149
- - ! '"24ec5-1b6-4059a80bfd280"'
150
- body: val2 body response
151
- http_version: '1.1'
152
- recorded_at: Tue, 01 Nov 2011 04:49:54 GMT
153
- - request:
154
- method: post
155
- uri: http://example.com/
156
- body: ''
157
- headers:
158
- X-Http-Header1:
159
- - val1
160
- response:
161
- status:
162
- code: 200
163
- message: OK
164
- headers:
165
- Etag:
166
- - ! '"24ec5-1b6-4059a80bfd280"'
167
- body: val1 header response
168
- http_version: '1.1'
169
- recorded_at: Tue, 01 Nov 2011 04:49:54 GMT
170
- - request:
171
- method: post
172
- uri: http://example.com/
173
- body: ''
174
- headers:
175
- X-Http-Header1:
176
- - val2
177
- response:
178
- status:
179
- code: 200
180
- message: OK
181
- headers:
182
- Etag:
183
- - ! '"24ec5-1b6-4059a80bfd280"'
184
- body: val2 header response
185
- http_version: '1.1'
186
- recorded_at: Tue, 01 Nov 2011 04:49:54 GMT
187
- recorded_with: VCR 1.11.3