train 0.14.1 → 0.14.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d2865a5d40c9667e2265f443b730066ddd6357c0
4
- data.tar.gz: 6dc89468235414f6213c7e1798fb371b0f3af923
3
+ metadata.gz: 9d60ce40a522d7af91a59bdb5f15941acf9f82eb
4
+ data.tar.gz: 552f32a77ec6bcdad57b357f971e15f45ee0ec5e
5
5
  SHA512:
6
- metadata.gz: f38a9a6c3b0246ce8965956c67649e788c4a20abce3545380ee37d8f607d856fff1113e736dc49e62816d55781aed7c87a96fc8810a658d078acf1ca2699ac55
7
- data.tar.gz: d9d479807beee1ac63dbcc50cefb4580c3586c96cd2422d0ac3a0cfd5d70d14cc4e6457483f10ba4a869fa8adb090a53ef654948b19343058388fb6e43af0e37
6
+ metadata.gz: ef95521317b7e46c62634ac127b88a6ca9269eefa812af6ecf43c57605c33df8e7e4c3cf96a32b43150c43f2bf7789f45ed0f5eab25ebd9689fe3bc6c8871d70
7
+ data.tar.gz: 29ca1962b80a976439dada139cc604bedbad1cda2bd01bfd68a64ad7cc00602fc365d778f58391ec62a4897d918d4cd7f816fc6175e1133c23f1d99f8e957eb6
@@ -1,7 +1,14 @@
1
1
  # Change Log
2
2
 
3
- ## [0.14.1](https://github.com/chef/train/tree/0.14.1) (2016-06-27)
4
- [Full Changelog](https://github.com/chef/train/compare/v0.14.0...0.14.1)
3
+ ## [0.14.2](https://github.com/chef/train/tree/0.14.2) (2016-06-28)
4
+ [Full Changelog](https://github.com/chef/train/compare/v0.14.1...0.14.2)
5
+
6
+ **Merged pull requests:**
7
+
8
+ - do not log password in ssh connection output [\#120](https://github.com/chef/train/pull/120) ([marcparadise](https://github.com/marcparadise))
9
+
10
+ ## [v0.14.1](https://github.com/chef/train/tree/v0.14.1) (2016-06-27)
11
+ [Full Changelog](https://github.com/chef/train/compare/v0.14.0...v0.14.1)
5
12
 
6
13
  **Fixed bugs:**
7
14
 
@@ -216,7 +216,9 @@ class Train::Transports::SSH
216
216
  #
217
217
  # @api private
218
218
  def to_s
219
- "#{@username}@#{@hostname}<#{@options.inspect}>"
219
+ options_to_print = @options.clone
220
+ options_to_print[:password] = '<hidden>' if options_to_print.key?(:password)
221
+ "#{@username}@#{@hostname}<#{options_to_print.inspect}>"
220
222
  end
221
223
 
222
224
  class OS < OSCommon
@@ -3,5 +3,5 @@
3
3
  # Author:: Dominik Richter (<dominik.richter@gmail.com>)
4
4
 
5
5
  module Train
6
- VERSION = '0.14.1'.freeze
6
+ VERSION = '0.14.2'.freeze
7
7
  end
@@ -82,6 +82,15 @@ describe 'ssh transport' do
82
82
  end
83
83
  end
84
84
 
85
+ describe 'converting connection to string for logging' do
86
+ it "masks passwords" do
87
+ assert_output(/.*:password=>"<hidden>".*/) do
88
+ connection = cls.new(conf).connection
89
+ puts "#{connection}"
90
+ end
91
+ end
92
+ end
93
+
85
94
  describe 'failed configuration' do
86
95
  it 'works with a minimum valid config' do
87
96
  cls.new(conf).connection
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.14.1
4
+ version: 0.14.2
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-06-27 00:00:00.000000000 Z
11
+ date: 2016-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -162,7 +162,6 @@ files:
162
162
  - lib/train/plugins.rb
163
163
  - lib/train/plugins/base_connection.rb
164
164
  - lib/train/plugins/transport.rb
165
- - lib/train/transports/.mock.rb.swp
166
165
  - lib/train/transports/docker.rb
167
166
  - lib/train/transports/local.rb
168
167
  - lib/train/transports/local_file.rb