tracetool 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c3c0c06ce37f4009396b0bb3256d49d67e37225fc065df12015c0598e02d6cc7
4
- data.tar.gz: a64ccc18d5efbeb7618b5b7c4e0a8724cf88404786b7612307b18bdf36753e79
3
+ metadata.gz: afbd4e779196959227fce1f14d17eb630f614ac8d8381917ce6856d20afe8965
4
+ data.tar.gz: 83631e87b47888b320a67e4a7b565426f6ed9f00ce577eef769ee4b7809baa29
5
5
  SHA512:
6
- metadata.gz: 9ca5c6e9fe0bd39683e8ed5a1cfa6ca7e158377ca3336e9e264ecc29544e7ffe0c991efe605a4f59c293e2342bcadfdfc1098ffc83adc09df99bbb3c7bfb2099
7
- data.tar.gz: 562e32d32a00737c75030a7765bc46892aa80094c0feb720ce8d8bc08fb45cf759bbbbae63c80d02f5bc0b285ac60ede17d38f7a9d4de35f80601f3c90e0189a
6
+ metadata.gz: b32f99eff59b5365612ddb8ffe245d915a6b38867b7a933199b227ad6fb456f2a9fa00d25b4c13fb935dc5e167fdac63a4ecb395be9ac44af0740e7bae4026c5
7
+ data.tar.gz: 4a1e752a9e5f9a0eb3ad3b00c2dc62fe7af0640e1de9ec7a9de817180fb0c976159f3da3ee8d962e99b648a1a55294e925114320871037bfd9d23ed4afd97d43
@@ -1,6 +1,7 @@
1
1
  require 'open3'
2
+
2
3
  module Tracetool
3
- # helper module for launching commands
4
+ # Helper module for launching commands
4
5
  module Pipe
5
6
  # Executes shell command
6
7
  class Executor
@@ -14,12 +15,10 @@ module Tracetool
14
15
  end
15
16
 
16
17
  def <<(args)
17
- args = args.join("\n") if args.is_a? Array
18
- IO.popen(cmd, 'r+') do |io|
19
- io.write(args)
20
- io.close_write
21
- io.read.chomp
22
- end
18
+ out, err, status = Open3.capture3({}, *cmd, stdin_data: args)
19
+ raise "#{cmd.join(' ')} (exit: #{status.exitstatus}) #{err.chomp}" unless status.success?
20
+
21
+ out.chomp
23
22
  end
24
23
  end
25
24
 
data/lib/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Tracetool
2
2
  # Version constant
3
3
  module Version
4
- VERSION = [0, 5, 0].freeze
4
+ VERSION = [0, 5, 1].freeze
5
5
 
6
6
  class << self
7
7
  # @return [String] version string
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tracetool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ilya.arkhanhelsky
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-30 00:00:00.000000000 Z
11
+ date: 2019-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: powerpack