mixlib-shellout 1.6.1 → 2.0.0.rc.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mixlib/shellout.rb +4 -15
- data/lib/mixlib/shellout/version.rb +1 -1
- data/lib/mixlib/shellout/windows.rb +0 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c7f86dabbc8eb901fd99b2b108d6a982f215634
|
4
|
+
data.tar.gz: 5cb4cf1f5bf05a59e4c04a56d96c8824ae5f8181
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65907c5565d8ee66d5ddbfbb83c90b172c71776acbc72f912162cd6d73c8e36523342e7072cfba1638e51bafd8e974ccef4c7d9b9794118eded7b38535a6afc6
|
7
|
+
data.tar.gz: cce9aae67fe8bb31372759f6fd64a78dd4166d2a150dd7d79f95ed41b942393af654f3f8f9e52498664100b2190e68ef0d675fa47856107995e301ccd0329aa0
|
data/lib/mixlib/shellout.rb
CHANGED
@@ -27,7 +27,6 @@ module Mixlib
|
|
27
27
|
READ_WAIT_TIME = 0.01
|
28
28
|
READ_SIZE = 4096
|
29
29
|
DEFAULT_READ_TIMEOUT = 600
|
30
|
-
DEFAULT_ENVIRONMENT = {'LC_ALL' => 'C'}
|
31
30
|
|
32
31
|
if RUBY_PLATFORM =~ /mswin|mingw32|windows/
|
33
32
|
require 'mixlib/shellout/windows'
|
@@ -84,7 +83,7 @@ module Mixlib
|
|
84
83
|
|
85
84
|
# Environment variables that will be set for the subcommand. Refer to the
|
86
85
|
# documentation of new to understand how ShellOut interprets this.
|
87
|
-
|
86
|
+
attr_accessor :environment
|
88
87
|
|
89
88
|
# The maximum time this command is allowed to run. Usually set via options
|
90
89
|
# to new
|
@@ -125,11 +124,7 @@ module Mixlib
|
|
125
124
|
# subprocess. This only has an effect if you call +error!+ after
|
126
125
|
# +run_command+.
|
127
126
|
# * +environment+: a Hash of environment variables to set before the command
|
128
|
-
# is run.
|
129
|
-
# to prevent issues with multibyte characters in Ruby 1.8. To avoid this,
|
130
|
-
# use :environment => nil for *no* extra environment settings, or
|
131
|
-
# :environment => {'LC_ALL'=>nil, ...} to set other environment settings
|
132
|
-
# without changing the locale.
|
127
|
+
# is run.
|
133
128
|
# * +timeout+: a Numeric value for the number of seconds to wait on the
|
134
129
|
# child process before raising an Exception. This is calculated as the
|
135
130
|
# total amount of time that ShellOut waited on the child process without
|
@@ -154,7 +149,7 @@ module Mixlib
|
|
154
149
|
@input = nil
|
155
150
|
@log_level = :debug
|
156
151
|
@log_tag = nil
|
157
|
-
@environment =
|
152
|
+
@environment = {}
|
158
153
|
@cwd = nil
|
159
154
|
@valid_exit_codes = [0]
|
160
155
|
@terminate_reason = nil
|
@@ -315,13 +310,7 @@ module Mixlib
|
|
315
310
|
when 'log_tag'
|
316
311
|
self.log_tag = setting
|
317
312
|
when 'environment', 'env'
|
318
|
-
|
319
|
-
# to use the default.
|
320
|
-
if setting && setting.has_key?("LC_ALL") && setting['LC_ALL'].nil?
|
321
|
-
setting['LC_ALL'] = ENV['LC_ALL']
|
322
|
-
end
|
323
|
-
# passing :environment => nil means don't set any new ENV vars
|
324
|
-
@environment = setting.nil? ? {} : @environment.dup.merge!(setting)
|
313
|
+
self.environment = setting || {}
|
325
314
|
|
326
315
|
else
|
327
316
|
raise InvalidCommandOption, "option '#{option.inspect}' is not a valid option for #{self.class.name}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mixlib-shellout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0.rc.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Opscode
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -54,12 +54,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
54
54
|
version: 1.9.3
|
55
55
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
|
-
- - "
|
57
|
+
- - ">"
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version:
|
59
|
+
version: 1.3.1
|
60
60
|
requirements: []
|
61
61
|
rubyforge_project:
|
62
|
-
rubygems_version: 2.
|
62
|
+
rubygems_version: 2.2.2
|
63
63
|
signing_key:
|
64
64
|
specification_version: 4
|
65
65
|
summary: Run external commands on Unix or Windows
|