r-train 0.10.1 → 0.10.3

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: 9e5d7343b4e769adeff16bd119d877f7439f5cb9
4
- data.tar.gz: 98d6e8c0187a77fd281ce46ff9e199a734e402c2
3
+ metadata.gz: 6916554d58ef01bd5484721a401f17bad17cfb4d
4
+ data.tar.gz: 954215659b584ce9e2c7bdcf9be79afd73f83916
5
5
  SHA512:
6
- metadata.gz: 587f8e829176455c19d4cb359f4309a87d3b74855548852e77b31421808cd02393a9843913c89095e53271708c5093be51324d5f270379da2ad4038652b9b811
7
- data.tar.gz: 84121d41300c2c7608d0a3e3640d449cca98e9816e9af7c208ca69364f3035d04b70d12ca5bcb30f6f9db49c4e1d69c2e9eaf08beadaedc1dd93395b28fd480b
6
+ metadata.gz: df35a74c3535cdb75ecb1d8e525e5ba56e0430d46b67021fdca3b55e7b3263ce06251f6eebd5d7c3c2924637452c74373de645382aa1bebaa35e5461235b3f68
7
+ data.tar.gz: 784104525a498146eb28cfa23a2e04e67028255f9391970335698cd3501775b32c5179ec4826fc2edc7c4892aef9fa1934f0e73e3db245f9da4c631aed692817
data/CHANGELOG.md CHANGED
@@ -1,10 +1,23 @@
1
1
  # Change Log
2
2
 
3
- ## [0.10.0](https://github.com/chef/train/tree/0.10.0) (2016-02-29)
4
- [Full Changelog](https://github.com/chef/train/compare/v0.10.0...0.10.0)
3
+ ## [0.10.3](https://github.com/chef/train/tree/0.10.3) (2016-03-07)
4
+ [Full Changelog](https://github.com/chef/train/compare/v0.10.1...0.10.3)
5
+
6
+ **Fixed bugs:**
7
+
8
+ - set default value for ssh compression to false [\#77](https://github.com/chef/train/pull/77) ([chris-rock](https://github.com/chris-rock))
9
+ - avoid mock backend error on nil commands [\#75](https://github.com/chef/train/pull/75) ([arlimus](https://github.com/arlimus))
10
+
11
+ **Merged pull requests:**
12
+
13
+ - 0.10.2 [\#76](https://github.com/chef/train/pull/76) ([arlimus](https://github.com/arlimus))
14
+
15
+ ## [v0.10.1](https://github.com/chef/train/tree/v0.10.1) (2016-02-29)
16
+ [Full Changelog](https://github.com/chef/train/compare/v0.10.0...v0.10.1)
5
17
 
6
18
  **Merged pull requests:**
7
19
 
20
+ - 0.10.1 [\#74](https://github.com/chef/train/pull/74) ([chris-rock](https://github.com/chris-rock))
8
21
  - fix gem build license warning [\#73](https://github.com/chef/train/pull/73) ([chris-rock](https://github.com/chris-rock))
9
22
  - depend on docker-api 1.26.2 [\#72](https://github.com/chef/train/pull/72) ([someara](https://github.com/someara))
10
23
 
data/Rakefile CHANGED
@@ -88,17 +88,6 @@ def train_version(target = nil)
88
88
  end
89
89
  end
90
90
 
91
- # Automatically generate a changelog for this project. Only loaded if
92
- # the necessary gem is installed.
93
- begin
94
- require 'github_changelog_generator/task'
95
- GitHubChangelogGenerator::RakeTask.new :changelog do |config|
96
- require_relative 'lib/train/version'
97
- config.future_release = Train::VERSION
98
- end
99
- rescue LoadError
100
- end
101
-
102
91
  # Check if a command is available
103
92
  #
104
93
  # @param [Type] x the command you are interested in
@@ -140,6 +129,12 @@ task :version do
140
129
  train_version
141
130
  end
142
131
 
132
+ desc 'Generate the changelog'
133
+ task :changelog do
134
+ require_relative 'lib/train/version'
135
+ system "github_changelog_generator -u chef -p train --future-release #{Train::VERSION}"
136
+ end
137
+
143
138
  # Update the version of this gem and create an updated
144
139
  # changelog. It covers everything short of actually releasing
145
140
  # the gem.
@@ -81,15 +81,15 @@ class Train::Transports::Mock
81
81
  def command_not_found(cmd)
82
82
  if @conf[:verbose]
83
83
  STDERR.puts('Command not mocked:')
84
- STDERR.puts(' '+cmd.split("\n").join("\n "))
85
- STDERR.puts(' SHA: ' + Digest::SHA256.hexdigest(cmd))
84
+ STDERR.puts(' '+cmd.to_s.split("\n").join("\n "))
85
+ STDERR.puts(' SHA: ' + Digest::SHA256.hexdigest(cmd.to_s))
86
86
  end
87
87
  mock_command(cmd)
88
88
  end
89
89
 
90
90
  def run_command(cmd)
91
91
  @commands[cmd] ||
92
- @commands[Digest::SHA256.hexdigest cmd] ||
92
+ @commands[Digest::SHA256.hexdigest cmd.to_s] ||
93
93
  command_not_found(cmd)
94
94
  end
95
95
 
@@ -54,7 +54,7 @@ module Train::Transports
54
54
  option :connection_retries, default: 5
55
55
  option :connection_retry_sleep, default: 1
56
56
  option :max_wait_until_ready, default: 600
57
- option :compression, default: true
57
+ option :compression, default: false
58
58
 
59
59
  option :compression_level do |opts|
60
60
  # on nil or false: set compression level to 0
data/lib/train/version.rb CHANGED
@@ -3,5 +3,5 @@
3
3
  # Author:: Dominik Richter (<dominik.richter@gmail.com>)
4
4
 
5
5
  module Train
6
- VERSION = '0.10.1'.freeze
6
+ VERSION = '0.10.3'.freeze
7
7
  end
@@ -4,7 +4,7 @@ require 'train/transports/mock'
4
4
  require 'digest/sha2'
5
5
 
6
6
  describe 'mock transport' do
7
- let(:transport) { Train::Transports::Mock.new }
7
+ let(:transport) { Train::Transports::Mock.new(verbose: true) }
8
8
  let(:connection) { transport.connection }
9
9
 
10
10
  it 'can be instantiated' do
@@ -25,6 +25,17 @@ describe 'mock transport' do
25
25
  connection.mock_command('test', out).must_equal res
26
26
  end
27
27
 
28
+ it 'handles nil commands' do
29
+ connection.run_command(nil).stdout.must_equal('')
30
+ end
31
+
32
+ it 'can mock up nil commands' do
33
+ out = rand
34
+ connection.mock_command('', rand) # don't pull this result! always mock the input
35
+ connection.mock_command(nil, out) # pull this result
36
+ connection.run_command(nil).stdout.must_equal(out)
37
+ end
38
+
28
39
  it 'gets results for stdout' do
29
40
  out = rand
30
41
  cmd = rand
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: r-train
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.10.3
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-02-29 00:00:00.000000000 Z
11
+ date: 2016-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json