daptiv-chef-ci 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -43,7 +43,7 @@ Gem::Specification.new do |gem|
43
43
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
44
44
  gem.name = "daptiv-chef-ci"
45
45
  gem.require_paths = ["lib"]
46
- gem.version = '0.0.12'
46
+ gem.version = '0.0.13'
47
47
 
48
48
  gem.add_runtime_dependency "log4r", "~> 1.1.10"
49
49
  gem.add_runtime_dependency "mixlib-shellout", "~> 1.2.0"
@@ -21,6 +21,7 @@ module DaptivChefCI
21
21
  def exec_cmd(command, timeout = nil, environment = {})
22
22
  timeout ||= 600
23
23
  environment = Hash[ environment.map{ |k, v| [k.to_s, v.to_s] } ]
24
+ environment['LC_ALL'] = ENV['LC_ALL'] if !environment.has_key?('LC_ALL')
24
25
  path_at_start = ENV['PATH']
25
26
  begin
26
27
  ENV['PATH'] = path_without_gem_dir()
@@ -36,6 +36,24 @@ describe DaptivChefCI::Shell, :unit => true do
36
36
  out = shell.exec_cmd('echo $ENV_VAR1', 600, { :ENV_VAR1 => 'val1' })
37
37
  expect(out[0]).to eq('val1')
38
38
  end
39
+
40
+ it 'should default LC_ALL environment var to nil' do
41
+ # On TravisCI (Linux) this ENV var is set to en_US.UTF-8, on OS X it is nil
42
+ original_lc_all = ENV['LC_ALL']
43
+ ENV.delete('LC_ALL') if original_lc_all
44
+
45
+ shell = DaptivChefCI::Shell.new()
46
+ out = shell.exec_cmd('echo $LC_ALL', 600)
47
+ expect(out[0]).to be nil
48
+
49
+ ENV['LC_ALL'] = original_lc_all if original_lc_all
50
+ end
51
+
52
+ it 'should allow override of LC_ALL environment var' do
53
+ shell = DaptivChefCI::Shell.new()
54
+ out = shell.exec_cmd('echo $LC_ALL', 600, { :LC_ALL => 'en_US.UTF-8' })
55
+ expect(out[0]).to eq('en_US.UTF-8')
56
+ end
39
57
 
40
58
  end
41
59
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daptiv-chef-ci
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-16 00:00:00.000000000 Z
12
+ date: 2014-03-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: log4r
@@ -128,6 +128,7 @@ files:
128
128
  - lib/daptiv-chef-ci/virtualbox_basebox_builder.rb
129
129
  - lib/daptiv-chef-ci/virtualbox_driver.rb
130
130
  - lib/daptiv-chef-ci/vmware_basebox_builder.rb
131
+ - pkg/daptiv-chef-ci-0.0.12.gem
131
132
  - Rakefile
132
133
  - README.md
133
134
  - spec/daptiv-chef-ci/basebox_builder_factory_spec.rb
@@ -157,7 +158,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
157
158
  version: '0'
158
159
  segments:
159
160
  - 0
160
- hash: 2136130204737791091
161
+ hash: -3236749440056173059
161
162
  required_rubygems_version: !ruby/object:Gem::Requirement
162
163
  none: false
163
164
  requirements:
@@ -166,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
166
167
  version: '0'
167
168
  segments:
168
169
  - 0
169
- hash: 2136130204737791091
170
+ hash: -3236749440056173059
170
171
  requirements: []
171
172
  rubyforge_project:
172
173
  rubygems_version: 1.8.23