r-train 0.11.0 → 0.11.1
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 +4 -4
- data/CHANGELOG.md +14 -2
- data/Rakefile +1 -1
- data/lib/train/extras/file_common.rb +5 -1
- data/lib/train/version.rb +1 -1
- data/test/integration/test-travis-1.yaml +13 -0
- data/test/integration/{test-runner.yaml → test-travis-2.yaml} +0 -11
- data/test/unit/extras/linux_file_test.rb +15 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1355c07d0a3f0d3a2a66a77f292a589ffe6226f4
|
4
|
+
data.tar.gz: 463eca86d15a4561cd2dea687eddb9a4a0f75358
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
4
|
-
[Full Changelog](https://github.com/chef/train/compare/v0.
|
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} &&
|
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
@@ -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.
|
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-
|
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-
|
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
|