long-command-runner 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6a0f0720edcf533cc372e6df63ed8d683f9af818a7963bd7a0ae04ac0b7735ad
4
- data.tar.gz: 1d809b6c49943c810450ec8fc2ecf8d6683f76db84002037d04173b5b7a4d999
3
+ metadata.gz: 3f6d2038cb89e937c4338cb47e4e3cbbd63e6df288ce146c56cdedaf9cd4e669
4
+ data.tar.gz: 12dae9fedb930a911813dd69aa06efc30d6beda0f70c3a5ed902afd657818923
5
5
  SHA512:
6
- metadata.gz: 355e533388d84c0edce34249117243d67fa7bb5fa36af211b31670ba98bf9d3c16de5937382c25eec23f9a29863376cf54d4a02e6c116c7d58bf3f748ff2eba7
7
- data.tar.gz: 378e5338c867708804c3708dad2a58c160fc7422b4bd80fb6cd0f3aa56a20738d62d21d205d333cc2f780a112d74cc7a573e93430dba2dc3e2545da6ec6a9f5b
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+\.\d\d)\z/.freeze
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
@@ -2,5 +2,5 @@
2
2
 
3
3
  module LCR
4
4
  # Version of the library.
5
- VERSION = '0.1.3'
5
+ VERSION = '0.1.4'
6
6
  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.3
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-01-24 00:00:00.000000000 Z
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.1
151
+ rubygems_version: 3.0.3
152
152
  signing_key:
153
153
  specification_version: 4
154
154
  summary: Long Command Runner