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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1c5438feb4cca570fca5c9a9e1566ae6df1696d7
4
- data.tar.gz: 42219e3a8e1a6300d72aeb63924dab765bbc5f0b
3
+ metadata.gz: 7c7f86dabbc8eb901fd99b2b108d6a982f215634
4
+ data.tar.gz: 5cb4cf1f5bf05a59e4c04a56d96c8824ae5f8181
5
5
  SHA512:
6
- metadata.gz: 31a81beb7022501bff7f57ff17eb91f97fc472f1b86199260d06910b8d1a05d68ac04d4908da39b7ecf5b8170f79402f0702a21d06ac044f4ae11b340a7545f6
7
- data.tar.gz: 393c9b543d50e6c03f00b478a4903ea42cb4edb9fb9e93a9eabfbef9e2a541a837403ea77dff1d6dda8808dd64a1e0a5ce71545e551ed158b17d4fe85dedde91
6
+ metadata.gz: 65907c5565d8ee66d5ddbfbb83c90b172c71776acbc72f912162cd6d73c8e36523342e7072cfba1638e51bafd8e974ccef4c7d9b9794118eded7b38535a6afc6
7
+ data.tar.gz: cce9aae67fe8bb31372759f6fd64a78dd4166d2a150dd7d79f95ed41b942393af654f3f8f9e52498664100b2190e68ef0d675fa47856107995e301ccd0329aa0
@@ -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
- attr_reader :environment
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. By default, the environment will *always* be set to 'LC_ALL' => 'C'
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 = DEFAULT_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
- # Set the LC_ALL from the parent process if the user wanted
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}"
@@ -1,5 +1,5 @@
1
1
  module Mixlib
2
2
  class ShellOut
3
- VERSION = "1.6.1"
3
+ VERSION = "2.0.0.rc.0"
4
4
  end
5
5
  end
@@ -200,7 +200,6 @@ module Mixlib
200
200
  end
201
201
  end
202
202
 
203
-
204
203
  # cmd does not parse multiple quotes well unless the whole thing is wrapped up in quotes.
205
204
  # https://github.com/opscode/mixlib-shellout/pull/2#issuecomment-4837859
206
205
  # http://ss64.com/nt/syntax-esc.html
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: 1.6.1
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-12-01 00:00:00.000000000 Z
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: '0'
59
+ version: 1.3.1
60
60
  requirements: []
61
61
  rubyforge_project:
62
- rubygems_version: 2.4.4
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