central 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/central +1 -1
- data/lib/central.rb +6 -20
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81f6417d161a53c2d5b0b2785a1e45cb4af4cc5f8f7b18fd8d24fbb18d1d0410
|
4
|
+
data.tar.gz: 706d8b11e4d38effa588a5fe9c5b7baada931a3de3b5973cea7f1ac6c05e8dfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e36f5d6f5c9730c95240fc674020af1d557f57054cb9d4ff1eb15ccaae14776c54060ea662759766bc899ef6f4a85a901e0eec34141742d83707e61a8c65f3c
|
7
|
+
data.tar.gz: cbfb6d079499dfcdadbb767f5f676292e43e933083f6d13d7008ceb07c31da0c8cc8995931219fac16a1d19a71ea9a39611c4e10f0ce82dc7b6f6db8a6358c88
|
data/bin/central
CHANGED
data/lib/central.rb
CHANGED
@@ -105,24 +105,16 @@ def shell(command, verbose: false, silent: true)
|
|
105
105
|
info 'Executing', command if verbose
|
106
106
|
exit_code = nil
|
107
107
|
stdout = String.new
|
108
|
-
stdout_line = String.new
|
109
108
|
stderr = String.new
|
110
|
-
stderr_line = String.new
|
111
109
|
Open3.popen3(command) do |_, o, e, t|
|
112
110
|
stdout_open = true
|
113
111
|
stderr_open = true
|
114
112
|
while stdout_open || stderr_open
|
115
113
|
if stdout_open
|
116
114
|
begin
|
117
|
-
|
118
|
-
stdout
|
119
|
-
unless silent
|
120
|
-
stdout_line += ch
|
121
|
-
if ch == "\n"
|
122
|
-
STDOUT.puts stdout_line
|
123
|
-
stdout_line = ''
|
124
|
-
end
|
125
|
-
end
|
115
|
+
buffer = o.read_nonblock(4096)
|
116
|
+
stdout << buffer
|
117
|
+
STDOUT.write(buffer) unless silent
|
126
118
|
rescue IO::WaitReadable
|
127
119
|
IO.select([o], nil, nil, 0.01) unless stderr_open
|
128
120
|
rescue EOFError
|
@@ -132,15 +124,9 @@ def shell(command, verbose: false, silent: true)
|
|
132
124
|
next unless stderr_open
|
133
125
|
|
134
126
|
begin
|
135
|
-
|
136
|
-
stderr
|
137
|
-
unless silent
|
138
|
-
stderr_line += ch
|
139
|
-
if ch == "\n"
|
140
|
-
STDERR.puts stderr_line
|
141
|
-
stderr_line = ''
|
142
|
-
end
|
143
|
-
end
|
127
|
+
buffer = e.read_nonblock(4096)
|
128
|
+
stderr << buffer
|
129
|
+
STDERR.write(buffer) unless silent
|
144
130
|
rescue IO::WaitReadable
|
145
131
|
IO.select([e], nil, nil, 0.01) unless stdout_open
|
146
132
|
rescue EOFError
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: central
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Geurkov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: central dotfile management system
|
14
14
|
email: d.geurkov@gmail.com
|
@@ -38,7 +38,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
version: '0'
|
40
40
|
requirements: []
|
41
|
-
rubygems_version: 3.2.
|
41
|
+
rubygems_version: 3.2.22
|
42
42
|
signing_key:
|
43
43
|
specification_version: 4
|
44
44
|
summary: central dotfile management
|