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 +4 -4
- data/lib/mdt/commands/simple.rb +4 -29
- data/lib/mdt/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41b88495aecceaf3a5334df32a298778dd6527ee8e6d5ef58fa32d0d08645c45
|
4
|
+
data.tar.gz: 4a48b16f4ca9d5a748af2c22e8db85d508f15606839b0c58194ffee81d4ca03d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d0aea7c06733163966c5c9e6e40b1d64feff2f27a319248433d89cea7fd5d6223c68606cef3641ac4f2cdf2492e3a595768533875bce02c5b9dbff3f3983ad1
|
7
|
+
data.tar.gz: 2cb4eef4c55d32a8df15cb0ff9422234b3dc96dbd5baeab5e98410822e9532e308a35fdcd94177575cce7c2500c9ac1500ceb8d6785dcd279cf6bbbfeba0347f
|
data/lib/mdt/commands/simple.rb
CHANGED
@@ -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
|
-
(
|
40
|
-
|
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
|
-
(
|
61
|
-
|
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
|
data/lib/mdt/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2018-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mdt-core
|