simple-websocket-vcr 0.0.4 → 0.0.5

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 (31) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +2 -0
  3. data/CHANGES.md +16 -2
  4. data/README.md +0 -1
  5. data/lib/simple_websocket_vcr.rb +95 -76
  6. data/lib/simple_websocket_vcr/cassette.rb +115 -36
  7. data/lib/simple_websocket_vcr/configuration.rb +14 -11
  8. data/lib/simple_websocket_vcr/errors.rb +7 -9
  9. data/lib/simple_websocket_vcr/monkey_patch.rb +18 -0
  10. data/lib/simple_websocket_vcr/recordable_websocket_client.rb +97 -97
  11. data/lib/simple_websocket_vcr/version.rb +2 -4
  12. data/simple-websocket-vcr.gemspec +7 -6
  13. data/spec/fixtures/vcr_cassettes/EXPLICIT/some_explicitly_specified_json_cassette.json +30 -0
  14. data/spec/fixtures/vcr_cassettes/EXPLICIT/some_explicitly_specified_yaml_cassette.yml +44 -0
  15. data/spec/fixtures/vcr_cassettes/EXPLICIT/some_template.json +13 -0
  16. data/spec/fixtures/vcr_cassettes/EXPLICIT/some_template.yml +25 -0
  17. data/spec/fixtures/vcr_cassettes/VCR_for_WS/automatically_picked_cassette_name_is_ok,_when_describing_parent_and_example_child1.yml +2 -0
  18. data/spec/fixtures/vcr_cassettes/VCR_for_WS/automatically_picked_cassette_name_is_ok,_when_describing_parent_and_example_child2.yml +2 -0
  19. data/spec/fixtures/vcr_cassettes/VCR_for_WS/{automatically_picked_cassette_name_is_ok,_when_describing_parent_and_example_child1.json → automatically_picked_cassette_name_is_ok,_when_describing_parent_and_example_child2_for_json.json} +0 -0
  20. data/spec/fixtures/vcr_cassettes/VCR_for_WS/automatically_picked_cassette_name_is_ok,_when_using_context_foo_and_example_bar.yml +2 -0
  21. data/spec/fixtures/vcr_cassettes/VCR_for_WS/should_record_also_the_outgoing_communication.yml +11 -0
  22. data/spec/fixtures/vcr_cassettes/VCR_for_WS/{should_record_the_closing_event.json → should_record_the_closing_event(json).json} +1 -1
  23. data/spec/fixtures/vcr_cassettes/VCR_for_WS/should_record_the_closing_event(yaml).yml +6 -0
  24. data/spec/fixtures/vcr_cassettes/VCR_for_WS/should_record_the_very_first_message_caught_on_the_client_yielded_by_the_connect_method.yml +5 -0
  25. data/spec/vcr_spec.rb +160 -57
  26. metadata +62 -51
  27. data/spec/fixtures/vcr_cassettes/EXPLICIT/some_explicitly_specified_cassette.json +0 -30
  28. data/spec/fixtures/vcr_cassettes/VCR_for_WS/automatically_picked_cassette_name_is_ok,_when_describing_parent_and_example_child2.json +0 -3
  29. data/spec/fixtures/vcr_cassettes/VCR_for_WS/automatically_picked_cassette_name_is_ok,_when_using_context_foo_and_example_bar.json +0 -3
  30. data/spec/fixtures/vcr_cassettes/VCR_for_WS/should_record_also_the_outgoing_communication.json +0 -21
  31. data/spec/fixtures/vcr_cassettes/VCR_for_WS/should_record_the_very_first_message_caught_on_the_client_yielded_by_the_connect_method.json +0 -9
@@ -3,7 +3,7 @@
3
3
  {
4
4
  "operation": "read",
5
5
  "type": "text",
6
- "data": "WelcomeResponse={\"sessionId\":\"2EmXcWEVbBBotTuwusO2-WJRX1oAuDEH9YdCd_Y5\"}"
6
+ "data": "WelcomeResponse={\"sessionId\":\"rfynzN_MQHaFvhedHpqiQj1zFo0hBHsiICU4pmX-\"}"
7
7
  },
8
8
  {
9
9
  "operation": "close"
@@ -0,0 +1,6 @@
1
+ ---
2
+ websocket_interactions:
3
+ - - operation: read
4
+ type: text
5
+ data: WelcomeResponse={"sessionId":"3CEro9B5w8IUD4DAaVxRocyKm-rMVXLMlECNwfgD"}
6
+ - operation: close
@@ -0,0 +1,5 @@
1
+ ---
2
+ websocket_interactions:
3
+ - - operation: read
4
+ type: text
5
+ data: WelcomeResponse={"sessionId":"g-YqmCVcqkDqG7KkgzSzhd0qbeoM0fsVheOJ5jx8"}
data/spec/vcr_spec.rb CHANGED
@@ -7,7 +7,7 @@ require 'json'
7
7
  # alias real_sleep sleep
8
8
  #
9
9
  # def sleep(*args)
10
- # real_sleep(*args) if !VCR::WebSocket.cassette || VCR::WebSocket.cassette.recording?
10
+ # real_sleep(*args) if !WebSocketVCR.cassette || WebSocketVCR.cassette.recording?
11
11
  # end
12
12
  # end
13
13
 
@@ -19,18 +19,18 @@ describe 'VCR for WS' do
19
19
  end
20
20
 
21
21
  let(:should_sleep) do |_|
22
- !VCR::WebSocket.cassette || VCR::WebSocket.cassette.recording?
22
+ !WebSocketVCR.cassette || WebSocketVCR.cassette.recording?
23
23
  end
24
24
 
25
25
  before(:each) do
26
- VCR::WebSocket.configuration.reset_defaults!
26
+ WebSocketVCR.configuration.reset_defaults!
27
27
  end
28
28
 
29
29
  it 'should record the very first message caught on the client yielded by the connect method' do
30
- VCR::WebSocket.configure do |c|
30
+ WebSocketVCR.configure do |c|
31
31
  c.hook_uris = [HOST]
32
32
  end
33
- VCR::WebSocket.record(example, self) do
33
+ WebSocketVCR.record(example, self) do
34
34
  url = "ws://#{HOST}/hawkular/command-gateway/ui/ws"
35
35
  c = WebSocket::Client::Simple.connect url do |client|
36
36
  client.on(:message, once: true, &:data)
@@ -43,10 +43,10 @@ describe 'VCR for WS' do
43
43
  end
44
44
 
45
45
  it 'should record also the outgoing communication' do
46
- VCR::WebSocket.configure do |c|
46
+ WebSocketVCR.configure do |c|
47
47
  c.hook_uris = [HOST]
48
48
  end
49
- VCR::WebSocket.record(example, self) do
49
+ WebSocketVCR.record(example, self) do
50
50
  url = "ws://#{HOST}/hawkular/command-gateway/ui/ws"
51
51
  c = WebSocket::Client::Simple.connect url do |client|
52
52
  client.on(:message, once: true, &:data)
@@ -61,53 +61,72 @@ describe 'VCR for WS' do
61
61
  end
62
62
  end
63
63
 
64
- it 'should record the closing event' do
65
- VCR::WebSocket.configure do |c|
66
- c.hook_uris = [HOST]
64
+ def test_closing
65
+ url = "ws://#{HOST}/hawkular/command-gateway/ui/ws"
66
+ c = WebSocket::Client::Simple.connect url do |client|
67
+ client.on(:message, once: true, &:data)
67
68
  end
68
- VCR::WebSocket.record(example, self) do
69
- url = "ws://#{HOST}/hawkular/command-gateway/ui/ws"
70
- c = WebSocket::Client::Simple.connect url do |client|
71
- client.on(:message, once: true, &:data)
72
- end
73
- sleep 1 if should_sleep
69
+ sleep 1 if should_sleep
74
70
 
75
- expect(c).not_to be nil
76
- expect(c.open?).to be true
77
- sleep 1 if should_sleep
78
- c.close
79
- expect(c.open?).to be false
71
+ expect(c).not_to be nil
72
+ expect(c.open?).to be true
73
+ sleep 1 if should_sleep
74
+ c.close
75
+ expect(c.open?).to be false
76
+ end
77
+
78
+ it 'should record the closing event(json)' do
79
+ WebSocketVCR.configure do |c|
80
+ c.hook_uris = [HOST]
81
+ c.json_cassettes = true
82
+ end
83
+ WebSocketVCR.record(example, self) do
84
+ test_closing
80
85
  end
81
86
  end
82
87
 
83
- it 'should record complex communications' do
84
- VCR::WebSocket.configure do |c|
88
+ it 'should record the closing event(yaml)' do
89
+ WebSocketVCR.configure do |c|
85
90
  c.hook_uris = [HOST]
86
91
  end
87
- cassette_path = '/EXPLICIT/some_explicitly_specified_cassette.json'
88
- VCR::WebSocket.use_cassette(cassette_path) do
89
- url = "ws://#{HOST}/hawkular/command-gateway/ui/ws"
90
- c = WebSocket::Client::Simple.connect url do |client|
91
- client.on(:message, once: true, &:data)
92
- end
93
- sleep 1 if should_sleep
94
- c.send('something_1')
95
- c.on(:message, once: true, &:data)
96
- sleep 1 if should_sleep
92
+ WebSocketVCR.record(example, self) do
93
+ test_closing
94
+ end
95
+ end
97
96
 
98
- c.send('something_2')
99
- c.on(:message, once: true, &:data)
100
- sleep 1 if should_sleep
97
+ def test_complex
98
+ url = "ws://#{HOST}/hawkular/command-gateway/ui/ws"
99
+ c = WebSocket::Client::Simple.connect url do |client|
100
+ client.on(:message, once: true, &:data)
101
+ end
102
+ sleep 1 if should_sleep
103
+ c.send('something_1')
104
+ c.on(:message, once: true, &:data)
105
+ sleep 1 if should_sleep
101
106
 
102
- expect(c).not_to be nil
103
- expect(c.open?).to be true
104
- c.close
105
- expect(c.open?).to be false
106
- sleep 1 if should_sleep
107
+ c.send('something_2')
108
+ c.on(:message, once: true, &:data)
109
+ sleep 1 if should_sleep
110
+
111
+ expect(c).not_to be nil
112
+ expect(c.open?).to be true
113
+ c.close
114
+ expect(c.open?).to be false
115
+ sleep 1 if should_sleep
116
+ end
117
+
118
+ it 'should record complex communications for json' do
119
+ WebSocketVCR.configure do |c|
120
+ c.hook_uris = [HOST]
121
+ c.json_cassettes = true
122
+ end
123
+ cassette_path = '/EXPLICIT/some_explicitly_specified_json_cassette'
124
+ WebSocketVCR.use_cassette(cassette_path) do
125
+ test_complex
107
126
  end
108
127
 
109
128
  # check that everything was recorded in the json file
110
- file_path = VCR::WebSocket.configuration.cassette_library_dir + cassette_path
129
+ file_path = "#{WebSocketVCR.configuration.cassette_library_dir}#{cassette_path}.json"
111
130
  expect(File.readlines(file_path).grep(/WelcomeResponse/).size).to eq(1)
112
131
  # once in the client message and once in the GenericErrorResponse from the server
113
132
  expect(File.readlines(file_path).grep(/something_1/).size).to eq(2)
@@ -115,60 +134,144 @@ describe 'VCR for WS' do
115
134
  expect(File.readlines(file_path).grep(/close/).size).to eq(1)
116
135
  end
117
136
 
137
+ it 'should record complex communications for yaml' do
138
+ WebSocketVCR.configure do |c|
139
+ c.hook_uris = [HOST]
140
+ end
141
+ cassette_path = '/EXPLICIT/some_explicitly_specified_yaml_cassette'
142
+ WebSocketVCR.use_cassette(cassette_path) do
143
+ test_complex
144
+ end
145
+
146
+ # check that everything was recorded in the yaml file
147
+ file_path = "#{WebSocketVCR.configuration.cassette_library_dir}#{cassette_path}.yml"
148
+ expect(File.readlines(file_path).grep(/WelcomeResponse/).size).to eq(1)
149
+ expect(File.readlines(file_path).grep(/something_1/).size).to eq(2)
150
+ expect(File.readlines(file_path).grep(/something_2/).size).to eq(2)
151
+ expect(File.readlines(file_path).grep(/close/).size).to eq(1)
152
+ end
153
+
118
154
  context 'automatically picked cassette name is ok, when using context foo' do
119
155
  it 'and example bar' do
120
- VCR::WebSocket.record(example, self) do
156
+ WebSocketVCR.record(example, self) do
121
157
  # nothing
122
158
  end
123
- prefix = VCR::WebSocket.configuration.cassette_library_dir
124
- name = 'automatically_picked_cassette_name_is_ok,_when_using_context_foo_and_example_bar.json'
159
+ prefix = WebSocketVCR.configuration.cassette_library_dir
160
+ name = 'automatically_picked_cassette_name_is_ok,_when_using_context_foo_and_example_bar.yml'
125
161
  expect(File.exist?(prefix + '/VCR_for_WS/' + name)).to be true
126
162
  end
127
163
  end
128
164
 
129
165
  describe 'automatically picked cassette name is ok, when describing parent' do
130
166
  it 'and example child1' do
131
- VCR::WebSocket.record(example, self) do
167
+ WebSocketVCR.record(example, self) do
132
168
  # nothing
133
169
  end
134
- prefix = VCR::WebSocket.configuration.cassette_library_dir
135
- name = 'automatically_picked_cassette_name_is_ok,_when_describing_parent_and_example_child1.json'
170
+ prefix = WebSocketVCR.configuration.cassette_library_dir
171
+ name = 'automatically_picked_cassette_name_is_ok,_when_describing_parent_and_example_child1.yml'
136
172
  expect(File.exist?(prefix + '/VCR_for_WS/' + name)).to be true
137
173
  end
138
174
 
139
175
  it 'and example child2' do
140
- VCR::WebSocket.record(example, self) do
176
+ WebSocketVCR.record(example, self) do
141
177
  # nothing
142
178
  end
143
- prefix = VCR::WebSocket.configuration.cassette_library_dir
144
- name = 'automatically_picked_cassette_name_is_ok,_when_describing_parent_and_example_child2.json'
179
+ prefix = WebSocketVCR.configuration.cassette_library_dir
180
+ name = 'automatically_picked_cassette_name_is_ok,_when_describing_parent_and_example_child2.yml'
181
+ expect(File.exist?(prefix + '/VCR_for_WS/' + name)).to be true
182
+ end
183
+
184
+ it 'and example child2 for json' do
185
+ WebSocketVCR.configure do |c|
186
+ c.json_cassettes = true
187
+ end
188
+ WebSocketVCR.record(example, self) do
189
+ # nothing
190
+ end
191
+ prefix = WebSocketVCR.configuration.cassette_library_dir
192
+ name = 'automatically_picked_cassette_name_is_ok,_when_describing_parent_and_example_child2_for_json.json'
145
193
  expect(File.exist?(prefix + '/VCR_for_WS/' + name)).to be true
146
194
  end
147
195
  end
148
196
 
149
197
  describe '.configuration' do
150
198
  it 'has a default cassette location configured' do
151
- expect(VCR::WebSocket.configuration.cassette_library_dir).to eq('spec/fixtures/vcr_cassettes')
199
+ expect(WebSocketVCR.configuration.cassette_library_dir).to eq('spec/fixtures/vcr_cassettes')
152
200
  end
153
201
 
154
202
  it 'has an empty list of hook ports by default' do
155
- expect(VCR::WebSocket.configuration.hook_uris).to eq([])
203
+ expect(WebSocketVCR.configuration.hook_uris).to eq([])
156
204
  end
157
205
  end
158
206
 
159
207
  describe '.configure' do
160
208
  it 'configures cassette location' do
161
209
  expect do
162
- VCR::WebSocket.configure { |c| c.cassette_library_dir = 'foo/bar' }
163
- end.to change { VCR::WebSocket.configuration.cassette_library_dir }
210
+ WebSocketVCR.configure { |c| c.cassette_library_dir = 'foo/bar' }
211
+ end.to change { WebSocketVCR.configuration.cassette_library_dir }
164
212
  .from('spec/fixtures/vcr_cassettes')
165
213
  .to('foo/bar')
166
214
  end
167
215
 
168
216
  it 'configures URIs to hook' do
169
217
  expect do
170
- VCR::WebSocket.configure { |c| c.hook_uris = ['127.0.0.1:1337'] }
171
- end.to change { VCR::WebSocket.configuration.hook_uris }.from([]).to(['127.0.0.1:1337'])
218
+ WebSocketVCR.configure { |c| c.hook_uris = ['127.0.0.1:1337'] }
219
+ end.to change { WebSocketVCR.configuration.hook_uris }.from([]).to(['127.0.0.1:1337'])
220
+ end
221
+
222
+ it 'has an empty list of hook ports by default' do
223
+ expect(WebSocketVCR.configuration.hook_uris).to eq([])
224
+ end
225
+ end
226
+
227
+ context 'with cassette options' do
228
+ it 'with :record set to :none and no cassette, it should fail' do
229
+ prefix = WebSocketVCR.configuration.cassette_library_dir
230
+ cassette_path = '/EXPLICIT/something_nonexistent'
231
+ expect do
232
+ WebSocketVCR.use_cassette(cassette_path, record: :none) do
233
+ fail 'this code should not be reachable'
234
+ end
235
+ end.to raise_error(RuntimeError)
236
+ expect(File.exist?(prefix + cassette_path + '.yml')).to be false
237
+ end
238
+
239
+ def test_substitution(text1, text2 = nil)
240
+ url = "ws://#{HOST}/hawkular/command-gateway/ui/ws"
241
+ c = WebSocket::Client::Simple.connect url do |client|
242
+ client.on(:message, once: true) do |msg|
243
+ expect(msg.data).to include(text1)
244
+ end
245
+ end
246
+ sleep 1 if should_sleep
247
+ text2 ||= 'something_1'
248
+ c.send(text2)
249
+ c.on(:message, once: true) do |msg|
250
+ expect(msg.data).to include("Cannot deserialize: [#{text2}]")
251
+ end
252
+ end
253
+
254
+ it 'with :erb set to {something: 11223344}, it should replace the variable in yaml cassette' do
255
+ cassette_path = '/EXPLICIT/some_template'
256
+ WebSocketVCR.configure do |c|
257
+ c.hook_uris = [HOST]
258
+ end
259
+ WebSocketVCR.use_cassette(cassette_path, erb: { something: 11_223_344 }) do
260
+ test_substitution '11223344'
261
+ end
262
+ file_path = "#{WebSocketVCR.configuration.cassette_library_dir}#{cassette_path}.yml"
263
+ expect(File.readlines(file_path).grep(/<%= something %>/).size).to eq(1)
264
+ end
265
+
266
+ it 'with :erb set to {something: world, bar: hello}, it should replace the variables in json cassette' do
267
+ cassette_path = '/EXPLICIT/some_template'
268
+ WebSocketVCR.configure do |c|
269
+ c.hook_uris = [HOST]
270
+ c.json_cassettes = true
271
+ end
272
+ WebSocketVCR.use_cassette(cassette_path, erb: { something: 'world', bar: 'hello' }) do
273
+ test_substitution 'world', 'hello'
274
+ end
172
275
  end
173
276
  end
174
277
  end
metadata CHANGED
@@ -1,127 +1,127 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-websocket-vcr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jirka Kremser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-24 00:00:00.000000000 Z
11
+ date: 2016-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: shoulda
14
+ name: websocket-client-simple
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :development
19
+ version: 0.3.0
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
- version: '0'
26
+ version: 0.3.0
27
27
  - !ruby/object:Gem::Dependency
28
- name: rspec-rails
28
+ name: coveralls
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '3.0'
33
+ version: '0.8'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '3.0'
40
+ version: '0.8'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rake
42
+ name: rspec-rails
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '11'
47
+ version: '3.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
- version: '11'
54
+ version: '3.0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: vcr
56
+ name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '11'
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
- version: '0'
68
+ version: '11'
69
69
  - !ruby/object:Gem::Dependency
70
- name: webmock
70
+ name: rubocop
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: '1.7'
75
+ version: 0.34.2
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
- version: '1.7'
82
+ version: 0.34.2
83
83
  - !ruby/object:Gem::Dependency
84
- name: rubocop
84
+ name: shoulda
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '='
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.34.2
89
+ version: '3.5'
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
- version: 0.34.2
96
+ version: '3.5'
97
97
  - !ruby/object:Gem::Dependency
98
- name: websocket-client-simple
98
+ name: vcr
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0.3'
103
+ version: '2.9'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0.3'
110
+ version: '2.9'
111
111
  - !ruby/object:Gem::Dependency
112
- name: coveralls
112
+ name: webmock
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0'
117
+ version: '1.7'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '0'
124
+ version: '1.7'
125
125
  description: Websocket VCR add-on
126
126
  email:
127
127
  - jkremser@redhat.com
@@ -143,16 +143,22 @@ files:
143
143
  - lib/simple_websocket_vcr/cassette.rb
144
144
  - lib/simple_websocket_vcr/configuration.rb
145
145
  - lib/simple_websocket_vcr/errors.rb
146
+ - lib/simple_websocket_vcr/monkey_patch.rb
146
147
  - lib/simple_websocket_vcr/recordable_websocket_client.rb
147
148
  - lib/simple_websocket_vcr/version.rb
148
149
  - simple-websocket-vcr.gemspec
149
- - spec/fixtures/vcr_cassettes/EXPLICIT/some_explicitly_specified_cassette.json
150
- - spec/fixtures/vcr_cassettes/VCR_for_WS/automatically_picked_cassette_name_is_ok,_when_describing_parent_and_example_child1.json
151
- - spec/fixtures/vcr_cassettes/VCR_for_WS/automatically_picked_cassette_name_is_ok,_when_describing_parent_and_example_child2.json
152
- - spec/fixtures/vcr_cassettes/VCR_for_WS/automatically_picked_cassette_name_is_ok,_when_using_context_foo_and_example_bar.json
153
- - spec/fixtures/vcr_cassettes/VCR_for_WS/should_record_also_the_outgoing_communication.json
154
- - spec/fixtures/vcr_cassettes/VCR_for_WS/should_record_the_closing_event.json
155
- - spec/fixtures/vcr_cassettes/VCR_for_WS/should_record_the_very_first_message_caught_on_the_client_yielded_by_the_connect_method.json
150
+ - spec/fixtures/vcr_cassettes/EXPLICIT/some_explicitly_specified_json_cassette.json
151
+ - spec/fixtures/vcr_cassettes/EXPLICIT/some_explicitly_specified_yaml_cassette.yml
152
+ - spec/fixtures/vcr_cassettes/EXPLICIT/some_template.json
153
+ - spec/fixtures/vcr_cassettes/EXPLICIT/some_template.yml
154
+ - spec/fixtures/vcr_cassettes/VCR_for_WS/automatically_picked_cassette_name_is_ok,_when_describing_parent_and_example_child1.yml
155
+ - spec/fixtures/vcr_cassettes/VCR_for_WS/automatically_picked_cassette_name_is_ok,_when_describing_parent_and_example_child2.yml
156
+ - spec/fixtures/vcr_cassettes/VCR_for_WS/automatically_picked_cassette_name_is_ok,_when_describing_parent_and_example_child2_for_json.json
157
+ - spec/fixtures/vcr_cassettes/VCR_for_WS/automatically_picked_cassette_name_is_ok,_when_using_context_foo_and_example_bar.yml
158
+ - spec/fixtures/vcr_cassettes/VCR_for_WS/should_record_also_the_outgoing_communication.yml
159
+ - spec/fixtures/vcr_cassettes/VCR_for_WS/should_record_the_closing_event(json).json
160
+ - spec/fixtures/vcr_cassettes/VCR_for_WS/should_record_the_closing_event(yaml).yml
161
+ - spec/fixtures/vcr_cassettes/VCR_for_WS/should_record_the_very_first_message_caught_on_the_client_yielded_by_the_connect_method.yml
156
162
  - spec/spec_helper.rb
157
163
  - spec/vcr_spec.rb
158
164
  homepage: https://github.com/Jiri-Kremser/simple-websocket-vcr
@@ -180,13 +186,18 @@ signing_key:
180
186
  specification_version: 4
181
187
  summary: simple_websocket_vcr is VCR add-on for websockets.
182
188
  test_files:
183
- - spec/fixtures/vcr_cassettes/EXPLICIT/some_explicitly_specified_cassette.json
184
- - spec/fixtures/vcr_cassettes/VCR_for_WS/automatically_picked_cassette_name_is_ok,_when_describing_parent_and_example_child1.json
185
- - spec/fixtures/vcr_cassettes/VCR_for_WS/automatically_picked_cassette_name_is_ok,_when_describing_parent_and_example_child2.json
186
- - spec/fixtures/vcr_cassettes/VCR_for_WS/automatically_picked_cassette_name_is_ok,_when_using_context_foo_and_example_bar.json
187
- - spec/fixtures/vcr_cassettes/VCR_for_WS/should_record_also_the_outgoing_communication.json
188
- - spec/fixtures/vcr_cassettes/VCR_for_WS/should_record_the_closing_event.json
189
- - spec/fixtures/vcr_cassettes/VCR_for_WS/should_record_the_very_first_message_caught_on_the_client_yielded_by_the_connect_method.json
189
+ - spec/fixtures/vcr_cassettes/EXPLICIT/some_explicitly_specified_json_cassette.json
190
+ - spec/fixtures/vcr_cassettes/EXPLICIT/some_explicitly_specified_yaml_cassette.yml
191
+ - spec/fixtures/vcr_cassettes/EXPLICIT/some_template.json
192
+ - spec/fixtures/vcr_cassettes/EXPLICIT/some_template.yml
193
+ - spec/fixtures/vcr_cassettes/VCR_for_WS/automatically_picked_cassette_name_is_ok,_when_describing_parent_and_example_child1.yml
194
+ - spec/fixtures/vcr_cassettes/VCR_for_WS/automatically_picked_cassette_name_is_ok,_when_describing_parent_and_example_child2.yml
195
+ - spec/fixtures/vcr_cassettes/VCR_for_WS/automatically_picked_cassette_name_is_ok,_when_describing_parent_and_example_child2_for_json.json
196
+ - spec/fixtures/vcr_cassettes/VCR_for_WS/automatically_picked_cassette_name_is_ok,_when_using_context_foo_and_example_bar.yml
197
+ - spec/fixtures/vcr_cassettes/VCR_for_WS/should_record_also_the_outgoing_communication.yml
198
+ - spec/fixtures/vcr_cassettes/VCR_for_WS/should_record_the_closing_event(json).json
199
+ - spec/fixtures/vcr_cassettes/VCR_for_WS/should_record_the_closing_event(yaml).yml
200
+ - spec/fixtures/vcr_cassettes/VCR_for_WS/should_record_the_very_first_message_caught_on_the_client_yielded_by_the_connect_method.yml
190
201
  - spec/spec_helper.rb
191
202
  - spec/vcr_spec.rb
192
203
  has_rdoc: