train 0.17.0 → 0.18.0
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/CHANGELOG.md +14 -2
- data/Gemfile +7 -2
- data/README.md +4 -0
- data/lib/train/extras/command_wrapper.rb +1 -1
- data/lib/train/extras/os_common.rb +3 -0
- data/lib/train/version.rb +1 -1
- data/test/integration/cookbooks/test/recipes/prep_files.rb +1 -3
- data/test/unit/extras/command_wrapper_test.rb +2 -2
- data/test/unit/extras/os_common_test.rb +10 -0
- data/train.gemspec +1 -1
- metadata +11 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bef12aa9d490abb7a8b9e33416f0073bbc4fe3f
|
4
|
+
data.tar.gz: b66c3e02c956534b72cc9b7b4b3026203abf2f77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 803a0fdf661f82aefb707e3fe8f6aeba968cf04571ed58b851198a79d2a169ea58a70cc806e06fa7d025eab6e48e56b57192f16865fa83e6cd839933ac9280e6
|
7
|
+
data.tar.gz: d37fa6a60ce6dc33a12d3d5972a8341b2ee52667c9a4cbd1d733ed7e00504572842d722ac7ae70e344e5e81888489d789731660faafd45944db753137effa3e8
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,19 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## [0.
|
4
|
-
[Full Changelog](https://github.com/chef/train/compare/v0.
|
3
|
+
## [0.18.0](https://github.com/chef/train/tree/0.18.0) (2016-08-26)
|
4
|
+
[Full Changelog](https://github.com/chef/train/compare/v0.17.0...0.18.0)
|
5
|
+
|
6
|
+
**Merged pull requests:**
|
7
|
+
|
8
|
+
- Allow JSON 2.0 on Ruby 2.2 and above [\#144](https://github.com/chef/train/pull/144) ([jkeiser](https://github.com/jkeiser))
|
9
|
+
- Enable Ruby 2.3 in Travis, make it default suite [\#143](https://github.com/chef/train/pull/143) ([jkeiser](https://github.com/jkeiser))
|
10
|
+
- Add the darwin platform family [\#141](https://github.com/chef/train/pull/141) ([tas50](https://github.com/tas50))
|
11
|
+
- update integration test dependencies [\#139](https://github.com/chef/train/pull/139) ([tas50](https://github.com/tas50))
|
12
|
+
- Add badges to the readme [\#138](https://github.com/chef/train/pull/138) ([tas50](https://github.com/tas50))
|
13
|
+
- use --decode on base64 command to maintain compatibility with Darwin. [\#137](https://github.com/chef/train/pull/137) ([thomascate](https://github.com/thomascate))
|
14
|
+
|
15
|
+
## [v0.17.0](https://github.com/chef/train/tree/v0.17.0) (2016-08-19)
|
16
|
+
[Full Changelog](https://github.com/chef/train/compare/v0.16.0...v0.17.0)
|
5
17
|
|
6
18
|
**Implemented enhancements:**
|
7
19
|
|
data/Gemfile
CHANGED
@@ -8,6 +8,11 @@ if Gem::Version.new(RUBY_VERSION) <= Gem::Version.new('1.9.3')
|
|
8
8
|
gem 'net-ssh', '~> 2.9'
|
9
9
|
end
|
10
10
|
|
11
|
+
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.2')
|
12
|
+
gem 'json', '< 2.0'
|
13
|
+
gem 'rack', '< 2.0'
|
14
|
+
end
|
15
|
+
|
11
16
|
group :test do
|
12
17
|
gem 'bundler', '~> 1.11'
|
13
18
|
gem 'minitest', '~> 5.8'
|
@@ -18,8 +23,8 @@ group :test do
|
|
18
23
|
end
|
19
24
|
|
20
25
|
group :integration do
|
21
|
-
gem 'berkshelf', '~> 4.
|
22
|
-
gem 'test-kitchen', '~> 1.
|
26
|
+
gem 'berkshelf', '~> 4.3'
|
27
|
+
gem 'test-kitchen', '~> 1.11'
|
23
28
|
gem 'kitchen-vagrant'
|
24
29
|
end
|
25
30
|
|
data/README.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Train - Transport Interface
|
2
2
|
|
3
|
+
[](https://travis-ci.org/chef/train)
|
4
|
+
[](https://ci.appveyor.com/project/Chef/train/branch/master)
|
5
|
+
[](https://badge.fury.io/rb/train)
|
6
|
+
|
3
7
|
Train lets you talk to your local or remote operating systems with a unified interface.
|
4
8
|
|
5
9
|
It allows you to:
|
@@ -89,7 +89,7 @@ module Train::Extras
|
|
89
89
|
|
90
90
|
unless @sudo_password.nil?
|
91
91
|
b64pw = Base64.strict_encode64(@sudo_password + "\n")
|
92
|
-
res = "echo #{b64pw} | base64
|
92
|
+
res = "echo #{b64pw} | base64 --decode | #{res}-S "
|
93
93
|
end
|
94
94
|
|
95
95
|
res << @sudo_options.to_s + ' ' unless @sudo_options.nil?
|
data/lib/train/version.rb
CHANGED
@@ -5,9 +5,7 @@
|
|
5
5
|
# Helper recipe to create create a few files in the operating
|
6
6
|
# systems, which the runner will test against.
|
7
7
|
|
8
|
-
gid = '
|
9
|
-
gid = 'wheel' if node['platform_family'] == 'freebsd'
|
10
|
-
gid = 'system' if node['platform_family'] == 'aix'
|
8
|
+
gid = node['platform_family'] == 'aix' ? 'system' : node['root_group']
|
11
9
|
|
12
10
|
file '/tmp/file' do
|
13
11
|
mode '0765'
|
@@ -36,7 +36,7 @@ describe 'linux command' do
|
|
36
36
|
pw = rand.to_s
|
37
37
|
lc = cls.new(backend, { sudo: true, sudo_password: pw })
|
38
38
|
bpw = Base64.strict_encode64(pw + "\n")
|
39
|
-
lc.run(cmd).must_equal "echo #{bpw} | base64
|
39
|
+
lc.run(cmd).must_equal "echo #{bpw} | base64 --decode | sudo -S #{cmd}"
|
40
40
|
end
|
41
41
|
|
42
42
|
it 'wraps commands in sudo_command instead of sudo' do
|
@@ -57,7 +57,7 @@ describe 'linux command' do
|
|
57
57
|
sudo_command = rand.to_s
|
58
58
|
lc = cls.new(backend, { sudo: true, sudo_command: sudo_command, sudo_password: pw })
|
59
59
|
bpw = Base64.strict_encode64(pw + "\n")
|
60
|
-
lc.run(cmd).must_equal "echo #{bpw} | base64
|
60
|
+
lc.run(cmd).must_equal "echo #{bpw} | base64 --decode | #{sudo_command} -S #{cmd}"
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
@@ -286,4 +286,14 @@ describe 'os common plugin' do
|
|
286
286
|
it { os.esx?.must_equal(true) }
|
287
287
|
end
|
288
288
|
|
289
|
+
describe 'with platform set to darwin' do
|
290
|
+
let(:os) { mock_platform('darwin') }
|
291
|
+
it { os.solaris?.must_equal(false) }
|
292
|
+
it { os.linux?.must_equal(false) }
|
293
|
+
it {os[:family].must_equal('darwin')}
|
294
|
+
it { os.unix?.must_equal(true) }
|
295
|
+
it { os.bsd?.must_equal(true) }
|
296
|
+
it { os.esx?.must_equal(false) }
|
297
|
+
end
|
298
|
+
|
289
299
|
end
|
data/train.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
24
24
|
spec.require_paths = ['lib']
|
25
25
|
|
26
|
-
spec.add_dependency 'json', '
|
26
|
+
spec.add_dependency 'json', '>= 1.8', '< 3.0'
|
27
27
|
# chef-client < 12.4.1 require mixlib-shellout-2.0.1
|
28
28
|
spec.add_dependency 'mixlib-shellout', '~> 2.0'
|
29
29
|
# net-ssh 3.x drops Ruby 1.9 support, so this constraint could be raised when
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: train
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dominik Richter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.8'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '3.0'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '1.8'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '3.0'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: mixlib-shellout
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -245,7 +251,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
245
251
|
version: '0'
|
246
252
|
requirements: []
|
247
253
|
rubyforge_project:
|
248
|
-
rubygems_version: 2.4.
|
254
|
+
rubygems_version: 2.4.6
|
249
255
|
signing_key:
|
250
256
|
specification_version: 4
|
251
257
|
summary: Transport interface to talk to different backends.
|