maestro_shell 0.0.4 → 0.0.5

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
  SHA1:
3
- metadata.gz: 7202e558e1c7bc226196fa6580f929837523680a
4
- data.tar.gz: 2c56889dba049af09e23c1ad5fd9c888d3658df8
3
+ metadata.gz: 88171ef0a700d5b2c309660e5e5aeff781480e84
4
+ data.tar.gz: d62a916f0f7d61eee252491dfbc032fc9442b93b
5
5
  SHA512:
6
- metadata.gz: 1671da72da032d007631ba2e9761f5ad2914e6aae54c334ecce0b4694e7f54660fda8cdfb93130d0761bc4814292e63f884aca5705d5a706d7ef73e4cbb39f93
7
- data.tar.gz: 6c820aadf68fd69a0e0c98862584226e0c4fa398686e5b08f68c445de08bd62f5b0bc5e4beec3e0bed78a697886873a8416840dbd007a1ffff6410e4fac2be18
6
+ metadata.gz: 15924167ec09f21f4698fc5ddd67414fcedfdbfb3090c862e7dcb90095f7f7362cdcdc5900d5345a2ec69492d225b454b83d7a35979674f94055a69722402bde
7
+ data.tar.gz: d4fb0dfeefaa76cbe32bd034277634c437bd42f7d8606c2d4c3a1c72c02ee8fd041cdb3ed5ef726a91a8a3743514d775f759082404b3d6e4909ce3dd096bbef7
data/.gitignore CHANGED
@@ -11,6 +11,7 @@ spec/reports
11
11
  test/tmp
12
12
  test/version_tmp
13
13
  tmp
14
+ Gemfile.lock
14
15
 
15
16
  # YARD artifacts
16
17
  .yardoc
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, fd == stderr)
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
@@ -1,7 +1,7 @@
1
1
  module Maestro
2
2
  module Util
3
3
  class Shell
4
- VERSION = '0.0.4'
4
+ VERSION = '0.0.5'
5
5
  end
6
6
  end
7
7
  end
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
- CMD
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
- CMD
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
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-15 00:00:00.000000000 Z
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)