long-command-runner 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/long-command-runner/runner.rb +4 -2
- data/lib/long-command-runner/version.rb +1 -1
- 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: 3f6d2038cb89e937c4338cb47e4e3cbbd63e6df288ce146c56cdedaf9cd4e669
|
4
|
+
data.tar.gz: 12dae9fedb930a911813dd69aa06efc30d6beda0f70c3a5ed902afd657818923
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66a47ff6f6de3d987b5192aad839b2dccf44c5f132c6066e9430e0b0ea8ef8598bb84644936bf7b7c61c166367493a6b06d8a17ae020104a8c2d85168df24a1c
|
7
|
+
data.tar.gz: 230c0b1ad2803be4f3b267f6724482715bf4bc8403dbe45d3731aa156289c26dff61e73df93c62913e6aa38a106150c45bf9723773c0ef467c53c2ba1b417294
|
@@ -15,7 +15,9 @@ module LCR
|
|
15
15
|
# The constant used to get the percetange of completion of the command.
|
16
16
|
PERCENT_INDICATOR = /(.*\s|^)((\d+)([,.]\d*)?)%.*/.freeze
|
17
17
|
# The constant to match a `time -p` output:
|
18
|
-
TIMES_INDICATORS = /\A(real|user|sys)\s+(\d
|
18
|
+
TIMES_INDICATORS = /\A(real|user|sys)\s+(\d+[\.,]\d\d)\z/.freeze
|
19
|
+
# The expected Language environment:
|
20
|
+
ENVIRONMENT = 'LC_ALL=C.UTF-8 LANGUAGE=en'
|
19
21
|
|
20
22
|
# Get the mesured progress in percentage.
|
21
23
|
# This is just the result of parsing stdout lines with {PERCENT_INDICATOR}.
|
@@ -55,7 +57,7 @@ module LCR
|
|
55
57
|
# Actually launch the process.
|
56
58
|
def launch
|
57
59
|
stderr, stderr_in = IO.pipe
|
58
|
-
@container = Container.new("bash -c 'time -p #{@command} 2>&3'", 3 => stderr_in)
|
60
|
+
@container = Container.new("#{ENVIRONMENT} bash -c 'time -p #{@command} 2>&3'", 3 => stderr_in)
|
59
61
|
@line_reader = LineReader.new([@container.stdout, stderr, @container.stderr]) do |*new_lines|
|
60
62
|
on_newline(*new_lines)
|
61
63
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: long-command-runner
|
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
|
- Roland Laurès
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -148,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
148
|
version: '0'
|
149
149
|
requirements:
|
150
150
|
- bash (to use `time`)
|
151
|
-
rubygems_version: 3.0.
|
151
|
+
rubygems_version: 3.0.3
|
152
152
|
signing_key:
|
153
153
|
specification_version: 4
|
154
154
|
summary: Long Command Runner
|