vcr_cable 0.3.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +25 -3
- data/lib/generators/templates/vcr_cable.yml +3 -1
- data/lib/vcr_cable.rb +17 -7
- data/lib/vcr_cable/version.rb +1 -1
- data/test/dummy/log/test.log +168 -0
- data/test/vcr_cable_test.rb +34 -10
- metadata +24 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe1ff17449e0a3663ecc995c7b4c839ee822edb2
|
4
|
+
data.tar.gz: 9aea8f382fd1ccb05ba7aaf1f6bf7987cf670232
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c8397872b0c8482ee88d9d39d64e0f082e45498550259999ecd2fcd0928d5aeb1bd5d3330650182f183bbcf3fd337f3cb76b45f91fbaaa3553220c7a7a4a96f
|
7
|
+
data.tar.gz: cbc5df15d80cf206a0d5a68dc7ddf284e20d04b5c70f311e0ab63ad676367fc3fec68be0718dbbc271a47589ca002f8267c266b19cabef69d0acff0f1a970763
|
data/README.md
CHANGED
@@ -19,6 +19,14 @@ gem 'fakeweb' # or webmock
|
|
19
19
|
|
20
20
|
*Note: You can choose between the FakeWeb and WebMock gems for faking web requests. If one of those gems is already loaded by your application it will be used automatically.*
|
21
21
|
|
22
|
+
By default `vcr_cable` is disabled. In order to enable it you need to start the server with the ENV variable `ENABLE_VCR_CABLE=true` like this:
|
23
|
+
|
24
|
+
```bash
|
25
|
+
ENABLE_VCR_CABLE=true bundle exec rails s
|
26
|
+
```
|
27
|
+
|
28
|
+
Or you can enable `vcr_cable` in the yaml config file (check the section below).
|
29
|
+
|
22
30
|
That's it! Now all external requests will hit the remote servers only one time, and the application will subsequently use the recorded data.
|
23
31
|
|
24
32
|
## Custom VCR Configuration
|
@@ -29,11 +37,13 @@ The default VCR configuration is:
|
|
29
37
|
development:
|
30
38
|
hook_into: fakeweb
|
31
39
|
cassette_library_dir: development_cassettes
|
40
|
+
enable_erb: false
|
41
|
+
allow_playback_repeats: false
|
32
42
|
allow_http_connections_when_no_cassette: true
|
33
|
-
|
43
|
+
enable_vcr_cable: false
|
34
44
|
```
|
35
45
|
|
36
|
-
If you want to override those values or configure vcr_cable to work in some
|
46
|
+
If you want to override those values or configure `vcr_cable` to work in some
|
37
47
|
other environment you can generate the `vcr_cable.yml` config file and update it:
|
38
48
|
|
39
49
|
```bash
|
@@ -42,7 +52,19 @@ bundle exec rails generate vcr_cable
|
|
42
52
|
|
43
53
|
The file will be located in the ```config``` folder of your rails application.
|
44
54
|
|
45
|
-
|
55
|
+
## Config via env
|
56
|
+
|
57
|
+
You can also enable/disable vcr_cable by setting `ENABLE_VCR_CABLE=true` or `ENABLE_VCR_CABLE=false` in your environment. This allows each developer to opt in or opt out for vcr_cable on their own machine.
|
58
|
+
|
59
|
+
## Extra
|
60
|
+
|
61
|
+
If you use `vcr_cable` in development I recommend to enable http requests for webmock or fakeweb. Just create an initializer, for example:
|
62
|
+
|
63
|
+
```ruby
|
64
|
+
WebMock.allow_net_connect! if defined? WebMock
|
65
|
+
```
|
66
|
+
|
67
|
+
It will prevent exceptions when you disable `vcr_cable`.
|
46
68
|
|
47
69
|
## Contributing
|
48
70
|
|
data/lib/vcr_cable.rb
CHANGED
@@ -9,32 +9,37 @@ module VcrCable
|
|
9
9
|
DEFAULT_CONFIG = {
|
10
10
|
'development' => {
|
11
11
|
'cassette_library_dir' => 'development_cassettes',
|
12
|
-
'allow_http_connections_when_no_cassette' => true
|
12
|
+
'allow_http_connections_when_no_cassette' => true,
|
13
|
+
'allow_playback_repeats' => false
|
13
14
|
}
|
14
15
|
}
|
15
16
|
|
16
17
|
def configure_vcr
|
17
18
|
VCR.configure do |c|
|
18
19
|
c.hook_into config['hook_into']
|
20
|
+
c.default_cassette_options = {
|
21
|
+
:erb => config['enable_erb'],
|
22
|
+
:allow_playback_repeats => config['allow_playback_repeats']
|
23
|
+
}
|
19
24
|
c.cassette_library_dir = config['cassette_library_dir']
|
20
25
|
c.allow_http_connections_when_no_cassette = config['allow_http_connections_when_no_cassette']
|
21
26
|
end
|
22
27
|
end
|
23
28
|
|
24
29
|
def config
|
25
|
-
@config ||= default_config.merge
|
30
|
+
@config ||= default_config.merge(local_config).merge(env_config)
|
26
31
|
end
|
27
32
|
|
28
33
|
def enabled?
|
29
|
-
config.present? &&
|
34
|
+
config.present? && config['enable_vcr_cable']
|
30
35
|
end
|
31
36
|
|
32
|
-
def
|
33
|
-
%w(true 1).include?(ENV['
|
37
|
+
def enabled_by_env?
|
38
|
+
%w(true 1).include?(ENV['ENABLE_VCR_CABLE']).presence
|
34
39
|
end
|
35
40
|
|
36
41
|
def reset_config
|
37
|
-
%w[local_config config_file default_config config].each do |name|
|
42
|
+
%w[local_config config_file default_config env_config config].each do |name|
|
38
43
|
instance_variable_set "@#{name}", nil
|
39
44
|
end
|
40
45
|
end
|
@@ -61,13 +66,18 @@ module VcrCable
|
|
61
66
|
@default_config ||= if DEFAULT_CONFIG.has_key? env
|
62
67
|
DEFAULT_CONFIG[env].merge({
|
63
68
|
'hook_into' => select_default_mocking_library,
|
64
|
-
'disable_vcr_cable' => disabled_by_env?
|
65
69
|
})
|
66
70
|
else
|
67
71
|
{}
|
68
72
|
end
|
69
73
|
end
|
70
74
|
|
75
|
+
def env_config
|
76
|
+
@env_config ||= {
|
77
|
+
'enable_vcr_cable' => enabled_by_env?,
|
78
|
+
}.select { |_, value| !value.nil? }
|
79
|
+
end
|
80
|
+
|
71
81
|
def select_default_mocking_library
|
72
82
|
if gem_available? 'fakeweb'
|
73
83
|
:fakeweb
|
data/lib/vcr_cable/version.rb
CHANGED
data/test/dummy/log/test.log
CHANGED
@@ -1152,3 +1152,171 @@ Connecting to database specified by database.yml
|
|
1152
1152
|
[1m[35m (0.0ms)[0m rollback transaction
|
1153
1153
|
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1154
1154
|
[1m[35m (0.0ms)[0m rollback transaction
|
1155
|
+
Connecting to database specified by database.yml
|
1156
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
1157
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1158
|
+
Connecting to database specified by database.yml
|
1159
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1160
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1161
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1162
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1163
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1164
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1165
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1166
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1167
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1168
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1169
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1170
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1171
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1172
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1173
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1174
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1175
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1176
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1177
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1178
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1179
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1180
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1181
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1182
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1183
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1184
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1185
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1186
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1187
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1188
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1189
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1190
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1191
|
+
Connecting to database specified by database.yml
|
1192
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
1193
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1194
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1195
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1196
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1197
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1198
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1199
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1200
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1201
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1202
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1203
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1204
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1205
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1206
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1207
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1208
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1209
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1210
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1211
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1212
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1213
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1214
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1215
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1216
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1217
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1218
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1219
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1220
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1221
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1222
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1223
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1224
|
+
Connecting to database specified by database.yml
|
1225
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1226
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1227
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1228
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1229
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1230
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1231
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1232
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1233
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1234
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1235
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1236
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1237
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1238
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1239
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1240
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1241
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1242
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1243
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1244
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1245
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1246
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1247
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1248
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1249
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1250
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1251
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1252
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1253
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1254
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1255
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1256
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1257
|
+
Connecting to database specified by database.yml
|
1258
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1259
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1260
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1261
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1262
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1263
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1264
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1265
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1266
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1267
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1268
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1269
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1270
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1271
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1272
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1273
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1274
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1275
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1276
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1277
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1278
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1279
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1280
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1281
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1282
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1283
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1284
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1285
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1286
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1287
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1288
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1289
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1290
|
+
Connecting to database specified by database.yml
|
1291
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1292
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1293
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1294
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1295
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1296
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1297
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1298
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1299
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1300
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1301
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1302
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1303
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1304
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1305
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1306
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1307
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1308
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1309
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1310
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1311
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1312
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1313
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1314
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1315
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1316
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1317
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1318
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1319
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1320
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1321
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1322
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
data/test/vcr_cable_test.rb
CHANGED
@@ -3,26 +3,50 @@ require 'test_helper'
|
|
3
3
|
class VcrCableTest < ActiveSupport::TestCase
|
4
4
|
setup { VcrCable.reset_config }
|
5
5
|
|
6
|
-
test 'is
|
7
|
-
VcrCable.
|
8
|
-
assert VcrCable.enabled?
|
6
|
+
test 'is disabled by default' do
|
7
|
+
assert !VcrCable.enabled?
|
9
8
|
end
|
10
9
|
|
11
|
-
test 'is
|
12
|
-
VcrCable.stubs(:config).returns({})
|
13
|
-
assert
|
10
|
+
test 'is enabled when config enables it' do
|
11
|
+
VcrCable.stubs(:config).returns({'enable_vcr_cable' => true})
|
12
|
+
assert VcrCable.enabled?
|
14
13
|
end
|
15
14
|
|
16
15
|
test 'is not enabled when config disables it' do
|
17
|
-
VcrCable.stubs(:config).returns({'
|
16
|
+
VcrCable.stubs(:config).returns({'enable_vcr_cable' => false})
|
18
17
|
assert !VcrCable.enabled?
|
19
18
|
end
|
20
19
|
|
21
|
-
test 'is
|
22
|
-
ENV
|
20
|
+
test 'is enabled when ENABLE_VCR_CABLE is present in ENV and set to true' do
|
21
|
+
ENV['ENABLE_VCR_CABLE'] = 'true'
|
22
|
+
assert VcrCable.enabled?
|
23
|
+
end
|
24
|
+
|
25
|
+
test 'is not enabled when ENABLE_VCR_CABLE is present in ENV and set to false' do
|
26
|
+
ENV['ENABLE_VCR_CABLE'] = 'false'
|
23
27
|
assert !VcrCable.enabled?
|
24
28
|
end
|
25
29
|
|
30
|
+
test 'erb is not enabled when config disables it' do
|
31
|
+
VcrCable.stubs(:config).returns({'enable_erb' => false})
|
32
|
+
assert !VcrCable.config['enable_erb']
|
33
|
+
end
|
34
|
+
|
35
|
+
test 'erb is enabled when config enables it' do
|
36
|
+
VcrCable.stubs(:config).returns({'enable_erb' => true})
|
37
|
+
assert VcrCable.config['enable_erb']
|
38
|
+
end
|
39
|
+
|
40
|
+
test 'allow_playback_repeats is not enabled when config disables it' do
|
41
|
+
VcrCable.stubs(:config).returns({'allow_playback_repeats' => false})
|
42
|
+
assert !VcrCable.config['allow_playback_repeats']
|
43
|
+
end
|
44
|
+
|
45
|
+
test 'allow_playback_repeats is enabled when config enables it' do
|
46
|
+
VcrCable.stubs(:config).returns({'allow_playback_repeats' => true})
|
47
|
+
assert VcrCable.config['allow_playback_repeats']
|
48
|
+
end
|
49
|
+
|
26
50
|
test 'loads FakeWeb or WebMock based on which is installed' do
|
27
51
|
VcrCable.stubs(:env).returns('development')
|
28
52
|
assert_equal :fakeweb, VcrCable.config['hook_into']
|
@@ -51,7 +75,7 @@ class VcrCableTest < ActiveSupport::TestCase
|
|
51
75
|
end
|
52
76
|
|
53
77
|
test 'adds VCR::Middleware::Rack to the middleware stack' do
|
54
|
-
list = Dir.chdir(Rails.root) {`bundle exec rake middleware RAILS_ENV=development`}
|
78
|
+
list = Dir.chdir(Rails.root) {`bundle exec rake middleware RAILS_ENV=development ENABLE_VCR_CABLE=true`}
|
55
79
|
assert_match /VCR::Middleware::Rack/, list
|
56
80
|
end
|
57
81
|
|
metadata
CHANGED
@@ -1,97 +1,97 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vcr_cable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- andrea longhi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: vcr
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: fakeweb
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: sqlite3
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: guard-test
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: mocha
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
description: use VCR in development (or whatever Rails environment you want)
|
@@ -101,20 +101,23 @@ executables: []
|
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
|
+
- MIT-LICENSE
|
105
|
+
- README.md
|
106
|
+
- Rakefile
|
104
107
|
- lib/generators/templates/vcr_cable.yml
|
105
108
|
- lib/generators/vcr_cable_generator.rb
|
106
109
|
- lib/tasks/vcr_cable_tasks.rake
|
110
|
+
- lib/vcr_cable.rb
|
107
111
|
- lib/vcr_cable/railtie.rb
|
108
112
|
- lib/vcr_cable/version.rb
|
109
|
-
-
|
110
|
-
-
|
111
|
-
- Rakefile
|
112
|
-
- README.md
|
113
|
+
- test/dummy/README.rdoc
|
114
|
+
- test/dummy/Rakefile
|
113
115
|
- test/dummy/app/assets/javascripts/application.js
|
114
116
|
- test/dummy/app/assets/stylesheets/application.css
|
115
117
|
- test/dummy/app/controllers/application_controller.rb
|
116
118
|
- test/dummy/app/helpers/application_helper.rb
|
117
119
|
- test/dummy/app/views/layouts/application.html.erb
|
120
|
+
- test/dummy/config.ru
|
118
121
|
- test/dummy/config/application.rb
|
119
122
|
- test/dummy/config/boot.rb
|
120
123
|
- test/dummy/config/database.yml
|
@@ -132,7 +135,6 @@ files:
|
|
132
135
|
- test/dummy/config/locales/en.yml
|
133
136
|
- test/dummy/config/routes.rb
|
134
137
|
- test/dummy/config/vcr_cable.yml
|
135
|
-
- test/dummy/config.ru
|
136
138
|
- test/dummy/db/development.sqlite3
|
137
139
|
- test/dummy/db/schema.rb
|
138
140
|
- test/dummy/db/test.sqlite3
|
@@ -144,8 +146,6 @@ files:
|
|
144
146
|
- test/dummy/public/422.html
|
145
147
|
- test/dummy/public/500.html
|
146
148
|
- test/dummy/public/favicon.ico
|
147
|
-
- test/dummy/Rakefile
|
148
|
-
- test/dummy/README.rdoc
|
149
149
|
- test/dummy/script/rails
|
150
150
|
- test/test_helper.rb
|
151
151
|
- test/vcr_cable_test.rb
|
@@ -158,17 +158,17 @@ require_paths:
|
|
158
158
|
- lib
|
159
159
|
required_ruby_version: !ruby/object:Gem::Requirement
|
160
160
|
requirements:
|
161
|
-
- -
|
161
|
+
- - ">="
|
162
162
|
- !ruby/object:Gem::Version
|
163
163
|
version: '0'
|
164
164
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
165
|
requirements:
|
166
|
-
- -
|
166
|
+
- - ">="
|
167
167
|
- !ruby/object:Gem::Version
|
168
168
|
version: '0'
|
169
169
|
requirements: []
|
170
170
|
rubyforge_project:
|
171
|
-
rubygems_version: 2.
|
171
|
+
rubygems_version: 2.2.2
|
172
172
|
signing_key:
|
173
173
|
specification_version: 4
|
174
174
|
summary: use VCR in development
|