mdt-simple 0.0.1 → 0.0.2

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: f4e78e6ddc552236caaff39e45a695acaee2ad682ba422a380104494865f9c67
4
- data.tar.gz: 5f61316be089655e08c25353a03314547f94a718baf058d6c63763d2c093c0c3
3
+ metadata.gz: 41b88495aecceaf3a5334df32a298778dd6527ee8e6d5ef58fa32d0d08645c45
4
+ data.tar.gz: 4a48b16f4ca9d5a748af2c22e8db85d508f15606839b0c58194ffee81d4ca03d
5
5
  SHA512:
6
- metadata.gz: cd13c303849453679616a4c24b65857c217e92cba17ff79e9caf429478ed47d0adb07b5707d5398fb1d5d17379ff894d21ac9babd7d61d97995a0b7557ec594f
7
- data.tar.gz: 796baf435a671a735cdd8e13d15c0113ad765e4ba2b4a4c2427b089cbc2e86ee40280d1bdc45477bdde7eb0586b1dcfb56fe9d5b24fdecdcc38aa5b374e1b080
6
+ metadata.gz: 0d0aea7c06733163966c5c9e6e40b1d64feff2f27a319248433d89cea7fd5d6223c68606cef3641ac4f2cdf2492e3a595768533875bce02c5b9dbff3f3983ad1
7
+ data.tar.gz: 2cb4eef4c55d32a8df15cb0ff9422234b3dc96dbd5baeab5e98410822e9532e308a35fdcd94177575cce7c2500c9ac1500ceb8d6785dcd279cf6bbbfeba0347f
@@ -1,6 +1,5 @@
1
1
  require 'mdt-core'
2
2
  require 'fileutils'
3
- require 'open3'
4
3
  module MDT
5
4
  # A module containing all commands
6
5
  module Commands
@@ -36,20 +35,8 @@ module MDT
36
35
  options['shell'] ||= '/bin/bash'
37
36
  cmd = MDT::Helpers::Command.apply_command_modifiers(options['command'], modifiers)
38
37
  puts "Running shell command: #{options['shell']} #{options['args']} -c \"#{cmd}\""
39
- (cmd_stdout, cmd_stderr, status) = Open3.popen3("#{options['shell']} #{options['args']} -c \"#{cmd}\"") do |stdin, stdout, stderr, wait_thr|
40
- exit_status = wait_thr.value
41
- cmd_stdout = stdout.read
42
- cmd_stderr = stderr.read
43
- [cmd_stdout, cmd_stderr, exit_status]
44
- end
45
- puts
46
- puts 'STDOUT:'
47
- puts cmd_stdout
48
- puts
49
- puts 'STDERR:'
50
- puts cmd_stderr
51
- puts
52
- status.exitstatus
38
+ system("#{options['shell']} #{options['args']} -c \"#{cmd}\"")
39
+ $?.exitstatus
53
40
  else
54
41
  1
55
42
  end
@@ -57,20 +44,8 @@ module MDT
57
44
  if options['command_string']
58
45
  cmd = MDT::Helpers::Command.apply_command_modifiers(options['command_string'], modifiers)
59
46
  puts "Running command: #{cmd}"
60
- (cmd_stdout, cmd_stderr, status) = Open3.popen3(cmd) do |stdin, stdout, stderr, wait_thr|
61
- exit_status = wait_thr.value
62
- cmd_stdout = stdout.read
63
- cmd_stderr = stderr.read
64
- [cmd_stdout, cmd_stderr, exit_status]
65
- end
66
- puts
67
- puts 'STDOUT:'
68
- puts cmd_stdout
69
- puts
70
- puts 'STDERR:'
71
- puts cmd_stderr
72
- puts
73
- status.exitstatus
47
+ system(cmd)
48
+ $?.exitstatus
74
49
  else
75
50
  1
76
51
  end
@@ -3,6 +3,6 @@ module MDT
3
3
  # A module referring specifically to mdt-simple
4
4
  module Simple
5
5
  # mdt-simple gem version
6
- VERSION = '0.0.1'
6
+ VERSION = '0.0.2'
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mdt-simple
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phitherek_
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-02 00:00:00.000000000 Z
11
+ date: 2018-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mdt-core