train 0.26.1 → 0.26.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: 1e61f6374de6b644c41978abf11492d5b5376e5d
4
- data.tar.gz: df8ef0b55d6683ca3a254e3698e06443f45aa15f
3
+ metadata.gz: ca495125a4ab27808033e05bc65eac50e6a3f542
4
+ data.tar.gz: e812f42b9fed58e548efb742fd55e90b4e36874b
5
5
  SHA512:
6
- metadata.gz: 9244312aeeaa68c704e7703b9fe5996647a76f3b2e4dbe56bbda30fe3a27eccbe2b5644f1cdcdee903afd17f2c60e617252d1fbc0ad12dacf28059e3d506d8dc
7
- data.tar.gz: 8f1d8411299a327d7f55d84aeb0a8374751ae1b1eb1ca5221740dd8a179018f38f60a3e6c28af5525137b30540ae6445a5957161be3681d45d14692ac92f3cda
6
+ metadata.gz: 32261df0cd90ebbb6221393158948b5ab9e97658e4ffb5a5ff57adcf0d23f38c9d0ea2e6af908e52d4dab6f9797ce9f4294b26bf0259c7d4902b9d69ecd2bcd8
7
+ data.tar.gz: acaecd10c56a1a6ccc4829b70c800e488bbbcc00acdb6c197f600d64df37d7f7e76a20f0c1b972048067513e1effd352080232710a69b6992936f08dce8b429e
data/CHANGELOG.md CHANGED
@@ -1,10 +1,18 @@
1
1
  # Change Log
2
2
 
3
- ## [0.26.1](https://github.com/chef/train/tree/0.26.1) (2017-08-14)
4
- [Full Changelog](https://github.com/chef/train/compare/v0.26.0...0.26.1)
3
+ ## [0.26.2](https://github.com/chef/train/tree/0.26.2) (2017-09-05)
4
+ [Full Changelog](https://github.com/chef/train/compare/v0.26.1...0.26.2)
5
5
 
6
6
  **Merged pull requests:**
7
7
 
8
+ - Fix inconsistent link\_path behavior [\#194](https://github.com/chef/train/pull/194) ([adamleff](https://github.com/adamleff))
9
+
10
+ ## [v0.26.1](https://github.com/chef/train/tree/v0.26.1) (2017-08-14)
11
+ [Full Changelog](https://github.com/chef/train/compare/v0.26.0...v0.26.1)
12
+
13
+ **Merged pull requests:**
14
+
15
+ - Release 0.26.1 [\#188](https://github.com/chef/train/pull/188) ([adamleff](https://github.com/adamleff))
8
16
  - Return non-zero exit code for unknown mock command [\#187](https://github.com/chef/train/pull/187) ([chris-rock](https://github.com/chris-rock))
9
17
 
10
18
  ## [v0.26.0](https://github.com/chef/train/tree/v0.26.0) (2017-08-10)
@@ -21,6 +21,14 @@ class Train::Transports::Local::Connection
21
21
  end
22
22
  end
23
23
 
24
+ def path
25
+ if symlink? && @follow_symlink
26
+ link_path
27
+ else
28
+ @path
29
+ end
30
+ end
31
+
24
32
  def link_path
25
33
  return nil unless symlink?
26
34
  begin
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.26.1'.freeze
6
+ VERSION = '0.26.2'.freeze
7
7
  end
@@ -49,6 +49,24 @@ describe 'local file transport' do
49
49
  end
50
50
  end
51
51
 
52
+ describe '#path' do
53
+ it 'returns the path if it is not a symlink' do
54
+ File.stub :symlink?, false do
55
+ filename = rand.to_s
56
+ connection.file(filename).path.must_equal filename
57
+ end
58
+ end
59
+
60
+ it 'returns the link_path if it is a symlink' do
61
+ File.stub :symlink?, true do
62
+ file_obj = connection.file(rand.to_s)
63
+ file_obj.stub :link_path, '/path/to/resolved_link' do
64
+ file_obj.path.must_equal '/path/to/resolved_link'
65
+ end
66
+ end
67
+ end
68
+ end
69
+
52
70
  describe 'file metadata' do
53
71
  let(:stat) { Struct.new(:mode, :size, :mtime, :uid, :gid) }
54
72
  let(:uid) { rand }
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.26.1
4
+ version: 0.26.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: 2017-08-14 00:00:00.000000000 Z
11
+ date: 2017-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -253,7 +253,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
253
253
  version: '0'
254
254
  requirements: []
255
255
  rubyforge_project:
256
- rubygems_version: 2.5.2
256
+ rubygems_version: 2.6.11
257
257
  signing_key:
258
258
  specification_version: 4
259
259
  summary: Transport interface to talk to different backends.