backticks 1.0.3 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +28 -6
- data/backticks.gemspec +2 -2
- data/lib/backticks/command.rb +11 -0
- data/lib/backticks/version.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 181001de3a7f0d5f8242a3cab24970dca6f4719b0fe59cfaa44a26d82470284f
|
4
|
+
data.tar.gz: b23613f42604cbe77f24bbc8565b4d2d3f6fe67ee15f87a10b17e5da84e0c2e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df4ab691a55a64032c96c5707573d670fd3152f06bd588d4adda41def01e73fb822ed31c5dce6d5336b03130f574fa53f0279a9d0b3cad4430dd917b63056cc9
|
7
|
+
data.tar.gz: f6ea169a9445e9521107813a96e959f0b9eb8dd36c0b213c58f35282146ca27617e2b957c50e04c503a7de241d7446084e5a8e16815f7e098ed7864453166854
|
data/.travis.yml
CHANGED
@@ -1,10 +1,32 @@
|
|
1
1
|
sudo: false
|
2
2
|
language: ruby
|
3
3
|
rvm:
|
4
|
-
- 2.0
|
5
|
-
- 2.1
|
6
|
-
- 2.2
|
7
|
-
- 2.3
|
8
|
-
- 2.4
|
9
|
-
|
4
|
+
- 2.0
|
5
|
+
- 2.1
|
6
|
+
- 2.2
|
7
|
+
- 2.3
|
8
|
+
- 2.4
|
9
|
+
- 2.7.1
|
10
|
+
- 3.0.0
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
include:
|
14
|
+
- rvm: 2.0
|
15
|
+
before_install: gem install bundler -v 1.17.3
|
16
|
+
- rvm: 2.1
|
17
|
+
before_install: gem install bundler -v 1.17.3
|
18
|
+
- rvm: 2.2
|
19
|
+
before_install: gem install bundler -v 1.17.3
|
20
|
+
- rvm: 2.3
|
21
|
+
before_install: gem install bundler
|
22
|
+
- rvm: 2.4
|
23
|
+
before_install: gem install bundler
|
24
|
+
- rvm: 2.6
|
25
|
+
before_install: gem install bundler
|
26
|
+
- rvm: 2.7
|
27
|
+
before_install: gem install bundler
|
28
|
+
- rvm: 3.0
|
29
|
+
before_install: gem install bundler
|
30
|
+
dist: focal # Workaround for: https://github.com/rvm/rvm/issues/5133
|
31
|
+
|
10
32
|
script: bundle exec rake spec
|
data/backticks.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
|
22
22
|
spec.required_ruby_version = Gem::Requirement.new('>= 2.0', '< 4.0')
|
23
23
|
|
24
|
-
spec.add_development_dependency 'bundler'
|
25
|
-
spec.add_development_dependency 'rake'
|
24
|
+
spec.add_development_dependency 'bundler'
|
25
|
+
spec.add_development_dependency 'rake'
|
26
26
|
spec.add_development_dependency 'rspec'
|
27
27
|
end
|
data/lib/backticks/command.rb
CHANGED
@@ -70,6 +70,16 @@ module Backticks
|
|
70
70
|
status.success?
|
71
71
|
end
|
72
72
|
|
73
|
+
# Determine whether output has been exhausted.
|
74
|
+
def eof?
|
75
|
+
@stdout.eof? && @stderr.eof?
|
76
|
+
rescue Errno::EIO
|
77
|
+
# The result of read operation when pty slave is closed is platform
|
78
|
+
# dependent.
|
79
|
+
# @see https://stackoverflow.com/questions/10238298/ruby-on-linux-pty-goes-away-without-eof-raises-errnoeio
|
80
|
+
true
|
81
|
+
end
|
82
|
+
|
73
83
|
# Provide a callback to monitor input and output in real time. This method
|
74
84
|
# saves a reference to block for later use; whenever the command generates
|
75
85
|
# output or receives input, the block is called back with the name of the
|
@@ -100,6 +110,7 @@ module Backticks
|
|
100
110
|
res = Process.waitpid(@pid, Process::WNOHANG)
|
101
111
|
if res
|
102
112
|
@status = $?
|
113
|
+
capture(nil) until eof?
|
103
114
|
return self
|
104
115
|
end
|
105
116
|
end
|
data/lib/backticks/version.rb
CHANGED
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backticks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Spataro
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
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: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
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: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|