r-train 0.11.2 → 0.11.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: fea828c9a4659f824ffd3f156f7f2445743202aa
4
- data.tar.gz: 902f6a222d4df27318cee696098a2cba59e142c6
3
+ metadata.gz: 25ae706efd7e9f84207d633ab61c5d73ea2101eb
4
+ data.tar.gz: 3e20d84d3c015686578dc9d463ca7f6e723267fd
5
5
  SHA512:
6
- metadata.gz: 1e05a66c60a4d3777b1743df52ce92564810d779a3e1f9ecedf4ace1b16337b1ddf9ff5d848893c523e9e762845a2d050468c938e778f49c9618852640f89d75
7
- data.tar.gz: 3d58d092f13a565cd1d6a56b4b7dcf979b22e592596dd1c1d9f7a3c968a4bb0694991ffebdaec7b9752bff23d46ee8ee03f8cdfbae1afe436e37a35957014a49
6
+ metadata.gz: 78854edff4a0765ed4a89f0b43afd0ae17a602ce63002df329bc35d2f27943f5443690d2d9b48e7d28d975ab90dc44c5964c80739a187f03f4068fe018f509b4
7
+ data.tar.gz: 4dcecbbdcf1343d03287b3356155766756fcc19e7c3f301d9ff4c2e1636bb92c3a92cb472419da31ef34547bf443995cf2ba4e8f9a68492ec1ad7ca9aaa6273c
@@ -1,12 +1,28 @@
1
1
  # Change Log
2
2
 
3
- ## [0.11.2](https://github.com/chef/train/tree/0.11.2) (2016-04-29)
4
- [Full Changelog](https://github.com/chef/train/compare/v0.11.1...0.11.2)
3
+ ## [0.11.3](https://github.com/chef/train/tree/0.11.3) (2016-05-10)
4
+ [Full Changelog](https://github.com/chef/train/compare/v0.11.2...0.11.3)
5
+
6
+ **Fixed bugs:**
7
+
8
+ - appveyor fixing... [\#98](https://github.com/chef/train/pull/98) ([arlimus](https://github.com/arlimus))
9
+
10
+ **Merged pull requests:**
11
+
12
+ - fix: winrm https listener is not configured anymore in appveyor [\#100](https://github.com/chef/train/pull/100) ([chris-rock](https://github.com/chris-rock))
13
+ - use aix stats implementation for hpux as well [\#99](https://github.com/chef/train/pull/99) ([Anirudh-Gupta](https://github.com/Anirudh-Gupta))
14
+
15
+ ## [v0.11.2](https://github.com/chef/train/tree/v0.11.2) (2016-04-29)
16
+ [Full Changelog](https://github.com/chef/train/compare/v0.11.1...v0.11.2)
5
17
 
6
18
  **Fixed bugs:**
7
19
 
8
20
  - bugfix: windows file failed to initialize with new symlink handler [\#96](https://github.com/chef/train/pull/96) ([arlimus](https://github.com/arlimus))
9
21
 
22
+ **Merged pull requests:**
23
+
24
+ - 0.11.2 [\#97](https://github.com/chef/train/pull/97) ([alexpop](https://github.com/alexpop))
25
+
10
26
  ## [v0.11.1](https://github.com/chef/train/tree/v0.11.1) (2016-04-28)
11
27
  [Full Changelog](https://github.com/chef/train/compare/v0.11.0...v0.11.1)
12
28
 
data/Gemfile CHANGED
@@ -2,8 +2,14 @@
2
2
  source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
+ # pin dependency for Ruby 1.9.3 since bundler is not
6
+ # detecting that net-ssh 3 does not work with 1.9.3
7
+ if Gem::Version.new(RUBY_VERSION) <= Gem::Version.new('1.9.3')
8
+ gem 'net-ssh', '~> 2.9'
9
+ end
10
+
5
11
  group :test do
6
- gem 'bundler', '~> 1.5'
12
+ gem 'bundler', '~> 1.11'
7
13
  gem 'minitest', '~> 5.8'
8
14
  gem 'rake', '~> 10'
9
15
  gem 'rubocop', '~> 0.36.0'
@@ -21,7 +21,7 @@ module Train::Extras
21
21
 
22
22
  def self.stat(shell_escaped_path, backend, follow_symlink)
23
23
  # use perl scripts for aix and solaris 10
24
- if backend.os.aix? || (backend.os.solaris? && backend.os[:release].to_i < 11)
24
+ if backend.os.aix? || (backend.os.solaris? && backend.os[:release].to_i < 11) || backend.os.hpux?
25
25
  return aix_stat(shell_escaped_path, backend, follow_symlink)
26
26
  end
27
27
  return bsd_stat(shell_escaped_path, backend, follow_symlink) if backend.os.bsd?
@@ -114,10 +114,9 @@ module Train::Extras
114
114
 
115
115
  res = backend.run_command(stat_cmd)
116
116
  return {} if res.exit_status != 0
117
-
118
117
  fields = res.stdout.split("\n")
118
+ return {} if fields.length != 7
119
119
  tmask = fields[0].to_i(8)
120
-
121
120
  {
122
121
  type: find_type(tmask),
123
122
  mode: tmask & 07777,
@@ -3,5 +3,5 @@
3
3
  # Author:: Dominik Richter (<dominik.richter@gmail.com>)
4
4
 
5
5
  module Train
6
- VERSION = '0.11.2'.freeze
6
+ VERSION = '0.11.3'.freeze
7
7
  end
@@ -107,4 +107,42 @@ describe 'stat' do
107
107
  })
108
108
  end
109
109
  end
110
+
111
+ describe 'aix stat' do
112
+ let(:backend) { Minitest::Mock.new }
113
+
114
+ it 'ignores failed stat results' do
115
+ res = Minitest::Mock.new
116
+ res.expect :stdout, '.....'
117
+ res.expect :exit_status, 1
118
+ backend.expect :run_command, res, [String]
119
+ cls.aix_stat('/path', backend, false).must_equal({})
120
+ end
121
+
122
+ it 'ignores wrong stat results' do
123
+ res = Minitest::Mock.new
124
+ res.expect :stdout, ''
125
+ res.expect :exit_status, 0
126
+ backend.expect :run_command, res, [String]
127
+ cls.aix_stat('/path', backend, false).must_equal({})
128
+ end
129
+
130
+ it 'reads correct stat results' do
131
+ res = Minitest::Mock.new
132
+ res.expect :stdout, "41777\nroot\n0\nrootz\n1\n1444522445\n360\n"
133
+ res.expect :exit_status, 0
134
+ backend.expect :run_command, res, [String]
135
+ cls.aix_stat('/path', backend, false).must_equal({
136
+ type: :directory,
137
+ mode: 01777,
138
+ owner: 'root',
139
+ uid: 0,
140
+ group: 'rootz',
141
+ gid: 1,
142
+ mtime: 1444522445,
143
+ size: 360,
144
+ selinux_label: nil,
145
+ })
146
+ end
147
+ end
110
148
  end
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.11.2
4
+ version: 0.11.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-04-29 00:00:00.000000000 Z
11
+ date: 2016-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -239,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
239
239
  version: '0'
240
240
  requirements: []
241
241
  rubyforge_project:
242
- rubygems_version: 2.5.1
242
+ rubygems_version: 2.4.6
243
243
  signing_key:
244
244
  specification_version: 4
245
245
  summary: Transport interface to talk to different backends.