train 0.23.0 → 0.24.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: fd9cdd9efab412e16697f043d77d0fd1934a948d
4
- data.tar.gz: 05cd1753d73b569548fd689d415835b2db5787ed
3
+ metadata.gz: 380cb81ba3b1d72ce15736240e1f24ee21b2c44f
4
+ data.tar.gz: 1905fe211a29868e810a9bd07c736817b262cee7
5
5
  SHA512:
6
- metadata.gz: ccf6fd031f7b62af351ff1372721e7f29b4606e0be295a6fb18afbd062d0bdfadc16ff35a9c7cbf1357f0fe28ddcdce54fad7671d8564a9a93f26f20e4c915ca
7
- data.tar.gz: 62d9e60558674b4e09e6f92dbcce2acdc0592f8adb41c779a0547e5c45af4cf36510f76154275e417ff4ef89591f73ff21858d610c7872fcd84443be7e374a57
6
+ metadata.gz: d2b4b3d6d9373376766c691629201f922e39699dc1e3c2fa5962235b851110c55901040b491c18fbf472d3acf6616159be2aa2c8f310ca3935f7f92f916b7109
7
+ data.tar.gz: aece6b8119d0d5aa9a4c8a8ae6846009b0105a5724b03f70b3e6fc6ba09d9a21461826405bc54e6e72d8f2a02db9d449e72056e59ea319df32279ca01a689a89
@@ -1,10 +1,18 @@
1
1
  # Change Log
2
2
 
3
+ ## [0.24.0](https://github.com/chef/train/tree/0.24.0) (2017-05-30)
4
+ [Full Changelog](https://github.com/chef/train/compare/v0.23.0...0.24.0)
5
+
6
+ **Merged pull requests:**
7
+
8
+ - prevent sudo on localhost targets [\#179](https://github.com/chef/train/pull/179) ([arlimus](https://github.com/arlimus))
9
+
3
10
  ## [v0.23.0](https://github.com/chef/train/tree/v0.23.0) (2017-03-29)
4
11
  [Full Changelog](https://github.com/chef/train/compare/v0.22.1...v0.23.0)
5
12
 
6
13
  **Merged pull requests:**
7
14
 
15
+ - Release 0.23.0 [\#173](https://github.com/chef/train/pull/173) ([adamleff](https://github.com/adamleff))
8
16
  - Fix Net::SSH warning when passing nil option values [\#172](https://github.com/chef/train/pull/172) ([tylercloke](https://github.com/tylercloke))
9
17
  - winrm: hide password [\#171](https://github.com/chef/train/pull/171) ([crepetl](https://github.com/crepetl))
10
18
 
@@ -116,6 +116,12 @@ module Train
116
116
  def self.validate_backend(conf, default = :local)
117
117
  return default if conf.nil?
118
118
  res = conf[:backend]
119
+
120
+ if (res.nil? || res == 'localhost') && conf[:sudo]
121
+ fail Train::UserError, 'Sudo is only valid when running against a remote host. '\
122
+ 'To run this locally with elevated privileges, run the command with `sudo ...`.'
123
+ end
124
+
119
125
  return res if !res.nil?
120
126
 
121
127
  if !conf[:target].nil?
@@ -3,5 +3,5 @@
3
3
  # Author:: Dominik Richter (<dominik.richter@gmail.com>)
4
4
 
5
5
  module Train
6
- VERSION = '0.23.0'.freeze
6
+ VERSION = '0.24.0'.freeze
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: train
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.0
4
+ version: 0.24.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: 2017-03-29 00:00:00.000000000 Z
11
+ date: 2017-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json