tcr 0.1.3 → 0.1.4
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 +4 -4
- data/lib/tcr/recordable_tcp_socket.rb +1 -1
- data/lib/tcr/version.rb +1 -1
- data/spec/tcr_spec.rb +12 -0
- 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: fefcbc3629fb40e1de900a369921440783e9640b
|
4
|
+
data.tar.gz: ff7b6ab916e2c94f44036b5d984606d3acac0941
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0848a1a7a8fb7088db93e61e5f0fda53a391768773a7dc8591b35ceb2e71270aa17d8347997b0594ca61eaf234600c26cf58d8274a971d6c18b54b03e9d7e4d4
|
7
|
+
data.tar.gz: 835f96abc00e39d5dff708d51a654a7f736826ffc265a3ec35ecfe27a82ef18681ee578e901a243978a4165b17c54b4beab674ffa3dd2a506bb63fbeb00d3436
|
@@ -87,7 +87,7 @@ module TCR
|
|
87
87
|
def _write(method, data)
|
88
88
|
if live
|
89
89
|
@socket.__send__(method, data)
|
90
|
-
recording << ["write", data.to_s.force_encoding("UTF-8")]
|
90
|
+
recording << ["write", data.dup.to_s.force_encoding("UTF-8")]
|
91
91
|
else
|
92
92
|
direction, data = recording.shift
|
93
93
|
_ensure_direction("write", direction)
|
data/lib/tcr/version.rb
CHANGED
data/spec/tcr_spec.rb
CHANGED
@@ -364,4 +364,16 @@ describe TCR do
|
|
364
364
|
expect(sock).to be_a(TCR::RecordableTCPSocket)
|
365
365
|
end
|
366
366
|
end
|
367
|
+
|
368
|
+
it "handles frozen Strings" do
|
369
|
+
TCR.configure { |c|
|
370
|
+
c.hook_tcp_ports = [443]
|
371
|
+
c.cassette_library_dir = "."
|
372
|
+
}
|
373
|
+
|
374
|
+
TCR.use_cassette("test") do
|
375
|
+
sock = TCPSocket.open("google.com", 443)
|
376
|
+
sock.print("hello\n".freeze)
|
377
|
+
end
|
378
|
+
end
|
367
379
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tcr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Forman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|