train 0.17.0 → 0.18.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: ea754f958e2bab35ca522e56f923380b7a9f5935
4
- data.tar.gz: 6491c524a67fd53b3002c248c5fe147a7dc2ff2c
3
+ metadata.gz: 1bef12aa9d490abb7a8b9e33416f0073bbc4fe3f
4
+ data.tar.gz: b66c3e02c956534b72cc9b7b4b3026203abf2f77
5
5
  SHA512:
6
- metadata.gz: c0a535c4afb9e2369f91c25637e713dd2b8e5b20ca45ac77d97ea4e759e20224a45eadc09e013f6c376f5149f455bf12799a650f554f19745c581e9745a553f2
7
- data.tar.gz: 629cf69e0aabb71976651f513fd42fd1e42cb844f3d9313d3662faa7b0b7c8fc8b1bef5df3b6e80f2fa7ec7fba3ef8fbea79fde814376a1048885daff8a6d64b
6
+ metadata.gz: 803a0fdf661f82aefb707e3fe8f6aeba968cf04571ed58b851198a79d2a169ea58a70cc806e06fa7d025eab6e48e56b57192f16865fa83e6cd839933ac9280e6
7
+ data.tar.gz: d37fa6a60ce6dc33a12d3d5972a8341b2ee52667c9a4cbd1d733ed7e00504572842d722ac7ae70e344e5e81888489d789731660faafd45944db753137effa3e8
@@ -1,7 +1,19 @@
1
1
  # Change Log
2
2
 
3
- ## [0.17.0](https://github.com/chef/train/tree/0.17.0) (2016-08-19)
4
- [Full Changelog](https://github.com/chef/train/compare/v0.16.0...0.17.0)
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.0'
22
- gem 'test-kitchen', '~> 1.4'
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
+ [![Build Status](https://travis-ci.org/chef/train.svg?branch=master)](https://travis-ci.org/chef/train)
4
+ [![Build Status Master](https://ci.appveyor.com/api/projects/status/github/chef/train?branch=master&svg=true&passingText=master%20-%20Ok&pendingText=master%20-%20Pending&failingText=master%20-%20Failing)](https://ci.appveyor.com/project/Chef/train/branch/master)
5
+ [![Gem Version](https://badge.fury.io/rb/train.svg)](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 -d | #{res}-S "
92
+ res = "echo #{b64pw} | base64 --decode | #{res}-S "
93
93
  end
94
94
 
95
95
  res << @sudo_options.to_s + ' ' unless @sudo_options.nil?
@@ -60,6 +60,9 @@ module Train::Extras
60
60
  'esx' => %w{
61
61
  esx
62
62
  },
63
+ 'darwin' => %w{
64
+ darwin
65
+ },
63
66
  }
64
67
 
65
68
  OS['linux'] = %w{linux alpine arch coreos exherbo gentoo slackware fedora amazon} + OS['redhat'] + OS['debian'] + OS['suse']
@@ -3,5 +3,5 @@
3
3
  # Author:: Dominik Richter (<dominik.richter@gmail.com>)
4
4
 
5
5
  module Train
6
- VERSION = '0.17.0'.freeze
6
+ VERSION = '0.18.0'.freeze
7
7
  end
@@ -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 = 'root'
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 -d | sudo -S #{cmd}"
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 -d | #{sudo_command} -S #{cmd}"
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
@@ -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', '~> 1.8'
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.17.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-19 00:00:00.000000000 Z
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.8
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.