maestro_shell 0.0.4 → 0.0.5
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/.gitignore +1 -0
- data/lib/util/shell.rb +3 -2
- data/lib/util/version.rb +1 -1
- data/spec/shell_spec.rb +3 -3
- metadata +2 -3
- data/Gemfile.lock +0 -41
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 88171ef0a700d5b2c309660e5e5aeff781480e84
|
|
4
|
+
data.tar.gz: d62a916f0f7d61eee252491dfbc032fc9442b93b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 15924167ec09f21f4698fc5ddd67414fcedfdbfb3090c862e7dcb90095f7f7362cdcdc5900d5345a2ec69492d225b454b83d7a35979674f94055a69722402bde
|
|
7
|
+
data.tar.gz: d4fb0dfeefaa76cbe32bd034277634c437bd42f7d8606c2d4c3a1c72c02ee8fd041cdb3ed5ef726a91a8a3743514d775f759082404b3d6e4909ce3dd096bbef7
|
data/.gitignore
CHANGED
data/lib/util/shell.rb
CHANGED
|
@@ -32,6 +32,7 @@ module Maestro
|
|
|
32
32
|
COMMAND_SEPARATOR = '&&' # IS_WINDOWS ? '&&' : '&&'
|
|
33
33
|
SCRIPT_EXTENSION = IS_WINDOWS ? '.bat' : '.shell'
|
|
34
34
|
SHELL_EXECUTABLE = IS_WINDOWS ? '' : 'bash '
|
|
35
|
+
COMMAND_SUFFIX = IS_WINDOWS ? '' : ' 2>&1 | tee'
|
|
35
36
|
|
|
36
37
|
def Shell.unset_env_variable(var)
|
|
37
38
|
IS_WINDOWS ? "set #{var}=" : "unset #{var}"
|
|
@@ -91,7 +92,7 @@ module Maestro
|
|
|
91
92
|
out_file.write(text)
|
|
92
93
|
|
|
93
94
|
if delegate && on_output
|
|
94
|
-
delegate.send(on_output, text
|
|
95
|
+
delegate.send(on_output, text)
|
|
95
96
|
end
|
|
96
97
|
end
|
|
97
98
|
end
|
|
@@ -116,7 +117,7 @@ module Maestro
|
|
|
116
117
|
private
|
|
117
118
|
|
|
118
119
|
def get_command(path)
|
|
119
|
-
@command_line = "#{SHELL_EXECUTABLE}#{path}"
|
|
120
|
+
@command_line = "#{SHELL_EXECUTABLE}#{path}#{COMMAND_SUFFIX}"
|
|
120
121
|
@command_line
|
|
121
122
|
end
|
|
122
123
|
|
data/lib/util/version.rb
CHANGED
data/spec/shell_spec.rb
CHANGED
|
@@ -68,7 +68,7 @@ describe Maestro::Util::Shell do
|
|
|
68
68
|
it 'should run with with export inline' do
|
|
69
69
|
command =<<-CMD
|
|
70
70
|
#{Maestro::Util::Shell::ENV_EXPORT_COMMAND} BLAH=blah; echo $BLAH
|
|
71
|
-
|
|
71
|
+
CMD
|
|
72
72
|
|
|
73
73
|
path = subject.create_script command
|
|
74
74
|
|
|
@@ -80,8 +80,8 @@ describe Maestro::Util::Shell do
|
|
|
80
80
|
it 'should run multiline command' do
|
|
81
81
|
command =<<-CMD
|
|
82
82
|
echo hello\r\n
|
|
83
|
-
echo goodbye
|
|
84
|
-
|
|
83
|
+
echo goodbye
|
|
84
|
+
CMD
|
|
85
85
|
|
|
86
86
|
path = subject.create_script command
|
|
87
87
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: maestro_shell
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Doug Henderson
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-07-
|
|
11
|
+
date: 2013-07-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: logging
|
|
@@ -118,7 +118,6 @@ files:
|
|
|
118
118
|
- .gitignore
|
|
119
119
|
- .ruby-version
|
|
120
120
|
- Gemfile
|
|
121
|
-
- Gemfile.lock
|
|
122
121
|
- LICENSE.txt
|
|
123
122
|
- README.md
|
|
124
123
|
- Rakefile
|
data/Gemfile.lock
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
maestro_shell (0.0.4)
|
|
5
|
-
json (>= 1.4.6)
|
|
6
|
-
logging (= 1.8.0)
|
|
7
|
-
rubyzip (= 0.9.8)
|
|
8
|
-
|
|
9
|
-
GEM
|
|
10
|
-
remote: https://rubygems.org/
|
|
11
|
-
specs:
|
|
12
|
-
diff-lcs (1.2.4)
|
|
13
|
-
json (1.8.0-java)
|
|
14
|
-
little-plugger (1.1.3)
|
|
15
|
-
logging (1.8.0)
|
|
16
|
-
little-plugger (>= 1.1.3)
|
|
17
|
-
multi_json (>= 1.3.6)
|
|
18
|
-
metaclass (0.0.1)
|
|
19
|
-
mocha (0.14.0)
|
|
20
|
-
metaclass (~> 0.0.1)
|
|
21
|
-
multi_json (1.7.7)
|
|
22
|
-
rake (10.1.0)
|
|
23
|
-
rspec (2.13.0)
|
|
24
|
-
rspec-core (~> 2.13.0)
|
|
25
|
-
rspec-expectations (~> 2.13.0)
|
|
26
|
-
rspec-mocks (~> 2.13.0)
|
|
27
|
-
rspec-core (2.13.1)
|
|
28
|
-
rspec-expectations (2.13.0)
|
|
29
|
-
diff-lcs (>= 1.1.3, < 2.0)
|
|
30
|
-
rspec-mocks (2.13.1)
|
|
31
|
-
rubyzip (0.9.8)
|
|
32
|
-
|
|
33
|
-
PLATFORMS
|
|
34
|
-
java
|
|
35
|
-
|
|
36
|
-
DEPENDENCIES
|
|
37
|
-
bundler (~> 1.3)
|
|
38
|
-
maestro_shell!
|
|
39
|
-
mocha (>= 0.10.0)
|
|
40
|
-
rake
|
|
41
|
-
rspec (~> 2.13.0)
|