stream_capture 1.0.0 → 1.0.1
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/README.md +2 -2
- data/lib/stream_capture.rb +12 -12
- data/lib/stream_capture/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7288b2e8ecbe4d2be704abcfeada7a5d730345e5b0c22b5d3ae8d5a13181f11
|
4
|
+
data.tar.gz: c59032f622c88510167db34da86b6a3bff4c3f86ffb6a88f11d4ea5e84ac00e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98417ac5419ab24b20e6e219abf82801767cbfcbafda7c0ee4d134c8e954c85a465bfcb479504891d652b92f8c710158fb2f6c01a4e2610131c0cc6668264e69
|
7
|
+
data.tar.gz: 5d28fa93fe941013c97ea0cf4e19af6f95b9ba3cce205bc15f48caa4f7a5178a593a5e7c1be047fcd3bd8a120ea278cd5bb9629d33a0a6bd295ad702b15f8709
|
data/README.md
CHANGED
@@ -31,7 +31,7 @@ end
|
|
31
31
|
|
32
32
|
klass = YourClass.new
|
33
33
|
|
34
|
-
result = klass.
|
34
|
+
result = klass.capture_std_both do
|
35
35
|
puts "result stdout"
|
36
36
|
warn "result stderr"
|
37
37
|
exit 0
|
@@ -44,7 +44,7 @@ p result
|
|
44
44
|
```
|
45
45
|
### as Module method
|
46
46
|
```
|
47
|
-
result = StreamCapture.
|
47
|
+
result = StreamCapture.std_both do
|
48
48
|
puts "result stdout"
|
49
49
|
warn "result stderr"
|
50
50
|
exit 0
|
data/lib/stream_capture.rb
CHANGED
@@ -29,29 +29,29 @@ require 'stream_capture/version'
|
|
29
29
|
module StreamCapture
|
30
30
|
class NoBlockExistsError < StandardError; end
|
31
31
|
|
32
|
-
def capture_stdout(
|
33
|
-
StreamCapture.stdout(
|
32
|
+
def capture_stdout(...)
|
33
|
+
StreamCapture.stdout(...)
|
34
34
|
end
|
35
35
|
|
36
|
-
def capture_stderr(
|
37
|
-
StreamCapture.stderr(
|
36
|
+
def capture_stderr(...)
|
37
|
+
StreamCapture.stderr(...)
|
38
38
|
end
|
39
39
|
|
40
|
-
def capture_std_both(
|
41
|
-
StreamCapture.std_both(
|
40
|
+
def capture_std_both(...)
|
41
|
+
StreamCapture.std_both(...)
|
42
42
|
end
|
43
43
|
|
44
44
|
class << self
|
45
|
-
def stdout(
|
46
|
-
StreamCapture::Core.new.stdout(
|
45
|
+
def stdout(...)
|
46
|
+
StreamCapture::Core.new.stdout(...)
|
47
47
|
end
|
48
48
|
|
49
|
-
def stderr(
|
50
|
-
StreamCapture::Core.new.stderr(
|
49
|
+
def stderr(...)
|
50
|
+
StreamCapture::Core.new.stderr(...)
|
51
51
|
end
|
52
52
|
|
53
|
-
def std_both(
|
54
|
-
StreamCapture::Core.new.std_both(
|
53
|
+
def std_both(...)
|
54
|
+
StreamCapture::Core.new.std_both(...)
|
55
55
|
end
|
56
56
|
end
|
57
57
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stream_capture
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toshiki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|