r-train 0.11.0 → 0.11.1

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: 32041a577502de9c77d37eb40ff8fc7110693b7f
4
- data.tar.gz: 8202709105de66980ebd1901ec4106ab32d9899e
3
+ metadata.gz: 1355c07d0a3f0d3a2a66a77f292a589ffe6226f4
4
+ data.tar.gz: 463eca86d15a4561cd2dea687eddb9a4a0f75358
5
5
  SHA512:
6
- metadata.gz: f19534cf0741a0c400eff0c151f9f056bdb1df3f6043ed9c61e968c7ff0a99c8f07b5a24376f95e52d321dc27619fe72476b66657ea3d6a29b7ec0e83fb03c9e
7
- data.tar.gz: d758c0e2af5abbad797f94d93f7c0ada74dea5ab070d785fea79ac72ee53d0c67cd7013d98107e11625cf411c0572a13b1dfa01be45f681ffa29a254bb426c9e
6
+ metadata.gz: 8e82c2c66a620b6b89b31fbc78e5c0ada0456f70894aaa886fa3056851c4fa5e2efcc518cc71e8e7563fdc116983d844d7213c383a5a4a763e30a5a8605d39d5
7
+ data.tar.gz: f4a3e253b38d9d7985311fd9ab30054dde379933289a608e9fad5e95bc95d284d2fc470b3482f4ad9dfa1825d815f5062cfb154eeab3daf3f221be695795b90c
data/CHANGELOG.md CHANGED
@@ -1,7 +1,19 @@
1
1
  # Change Log
2
2
 
3
- ## [0.11.0](https://github.com/chef/train/tree/0.11.0) (2016-04-28)
4
- [Full Changelog](https://github.com/chef/train/compare/v0.10.8...0.11.0)
3
+ ## [0.11.1](https://github.com/chef/train/tree/0.11.1) (2016-04-28)
4
+ [Full Changelog](https://github.com/chef/train/compare/v0.11.0...0.11.1)
5
+
6
+ **Fixed bugs:**
7
+
8
+ - fix nil file paths [\#94](https://github.com/chef/train/pull/94) ([arlimus](https://github.com/arlimus))
9
+
10
+ **Merged pull requests:**
11
+
12
+ - provide a source path for filecommon [\#95](https://github.com/chef/train/pull/95) ([arlimus](https://github.com/arlimus))
13
+ - restructure docker tests to balance load between 2 runs [\#93](https://github.com/chef/train/pull/93) ([arlimus](https://github.com/arlimus))
14
+
15
+ ## [v0.11.0](https://github.com/chef/train/tree/v0.11.0) (2016-04-28)
16
+ [Full Changelog](https://github.com/chef/train/compare/v0.10.8...v0.11.0)
5
17
 
6
18
  **Implemented enhancements:**
7
19
 
data/Rakefile CHANGED
@@ -30,7 +30,7 @@ end
30
30
  namespace :test do
31
31
  task :docker do
32
32
  path = File.join(File.dirname(__FILE__), 'test', 'integration')
33
- sh('sh', '-c', "cd #{path} && config=test-runner.yaml ruby -I ../../lib docker_test.rb tests/*")
33
+ sh('sh', '-c', "cd #{path} && ruby -I ../../lib docker_test.rb tests/*")
34
34
  end
35
35
 
36
36
  task :windows do
@@ -20,7 +20,7 @@ module Train::Extras
20
20
 
21
21
  def initialize(backend, path, follow_symlink = true)
22
22
  @backend = backend
23
- @path = path
23
+ @path = path || ''
24
24
  @follow_symlink = follow_symlink
25
25
  end
26
26
 
@@ -73,6 +73,10 @@ module Train::Extras
73
73
  source.type == :symlink
74
74
  end
75
75
 
76
+ def source_path
77
+ @path
78
+ end
79
+
76
80
  def source
77
81
  if @follow_symlink
78
82
  self.class.new(@backend, @path, false)
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.11.0'.freeze
6
+ VERSION = '0.11.1'.freeze
7
7
  end
@@ -0,0 +1,13 @@
1
+ images:
2
+ - centos:6.6
3
+ - centos:6.7
4
+ - centos:7.1.1503
5
+ - debian:7.9
6
+ - debian:8.2
7
+ - fedora:21
8
+ - fedora:22
9
+ - ubuntu:12.04
10
+ - ubuntu:14.04
11
+ - ubuntu:15.04
12
+ provision:
13
+ - script: bootstrap.sh
@@ -1,15 +1,4 @@
1
1
  images:
2
- - centos:6.6
3
- - centos:6.7
4
- - centos:7.1.1503
5
- - debian:7.9
6
- - debian:8.2
7
- - fedora:21
8
- - fedora:22
9
- - ubuntu:12.04
10
- - ubuntu:14.04
11
- - ubuntu:15.04
12
- # extra
13
2
  - centos:5.11
14
3
  - centos:7.0.1406
15
4
  - debian:6.0.10
@@ -18,6 +18,10 @@ describe 'file common' do
18
18
  )
19
19
  end
20
20
 
21
+ it 'works on nil path' do
22
+ cls.new(backend, nil).path.must_equal ''
23
+ end
24
+
21
25
  it 'provides the full path' do
22
26
  cls.new(backend, '/dir/file').path.must_equal '/dir/file'
23
27
  end
@@ -48,6 +52,13 @@ describe 'file common' do
48
52
  cls.new(backend, 'path').exist?.must_equal false
49
53
  end
50
54
 
55
+ it 'retrieves the link path via #path()' do
56
+ out = rand.to_s
57
+ mock_stat('path', "13\na1ff\nz\n1001\nz\n1001\n1444573475\n1444573475\n?")
58
+ backend.mock_command('readlink -n path -f', out)
59
+ cls.new(backend, 'path').path.must_equal File.join(Dir.pwd, out)
60
+ end
61
+
51
62
  it 'retrieves the link path' do
52
63
  out = rand.to_s
53
64
  mock_stat('path', "13\na1ff\nz\n1001\nz\n1001\n1444573475\n1444573475\n?")
@@ -55,6 +66,10 @@ describe 'file common' do
55
66
  cls.new(backend, 'path').link_path.must_equal File.join(Dir.pwd, out)
56
67
  end
57
68
 
69
+ it 'provide the source path' do
70
+ cls.new(backend, 'path').source_path.must_equal 'path'
71
+ end
72
+
58
73
  it 'checks a mounted path' do
59
74
  backend.mock_command("mount | grep -- ' on path'", rand.to_s)
60
75
  cls.new(backend, 'path').mounted?.must_equal true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: r-train
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominik Richter
@@ -186,7 +186,8 @@ files:
186
186
  - test/integration/sudo/passwd.rb
187
187
  - test/integration/sudo/reqtty.rb
188
188
  - test/integration/sudo/run_as.rb
189
- - test/integration/test-runner.yaml
189
+ - test/integration/test-travis-1.yaml
190
+ - test/integration/test-travis-2.yaml
190
191
  - test/integration/test_local.rb
191
192
  - test/integration/test_ssh.rb
192
193
  - test/integration/tests/path_block_device_test.rb
@@ -258,7 +259,8 @@ test_files:
258
259
  - test/integration/sudo/passwd.rb
259
260
  - test/integration/sudo/reqtty.rb
260
261
  - test/integration/sudo/run_as.rb
261
- - test/integration/test-runner.yaml
262
+ - test/integration/test-travis-1.yaml
263
+ - test/integration/test-travis-2.yaml
262
264
  - test/integration/test_local.rb
263
265
  - test/integration/test_ssh.rb
264
266
  - test/integration/tests/path_block_device_test.rb