serverspec 2.0.0.beta17 → 2.0.0.beta18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/serverspec/matcher.rb +0 -2
- data/lib/serverspec/type/file.rb +4 -8
- data/lib/serverspec/version.rb +1 -1
- data/serverspec.gemspec +1 -1
- data/spec/type/base/file_spec.rb +6 -4
- data/spec/type/darwin/file_spec.rb +4 -2
- data/spec/type/openbsd/file_spec.rb +4 -10
- data/spec/type/solaris10/file_spec.rb +4 -10
- metadata +3 -5
- data/lib/serverspec/matcher/match_md5checksum.rb +0 -5
- data/lib/serverspec/matcher/match_sha256checksum.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57528c35adf6105e153b7dbe26c0a1db093a7b6a
|
4
|
+
data.tar.gz: d3ede874674a3ca5a4abb4d830aa7c64f90014ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8546b8a206c0fb3d516f77dc9b73a29e0ede2b532b40bdb544820776d8fbe17439192a02628a95b78b3b626658e53bc2c3e16b9d7c2203bb194aee55289bf07
|
7
|
+
data.tar.gz: b8ead4874e92c031eab156534eb309a301ac4e9b999d35b2e7062d01c650c7e8e0c5408693367edfdb6599fb34f2fb9e66a758d8923b192fcbac8bcb0bd2bbc7
|
data/lib/serverspec/matcher.rb
CHANGED
@@ -4,8 +4,6 @@ require 'serverspec/matcher/contain'
|
|
4
4
|
require 'serverspec/matcher/be_readable'
|
5
5
|
require 'serverspec/matcher/be_writable'
|
6
6
|
require 'serverspec/matcher/be_executable'
|
7
|
-
require 'serverspec/matcher/match_md5checksum'
|
8
|
-
require 'serverspec/matcher/match_sha256checksum'
|
9
7
|
|
10
8
|
# port
|
11
9
|
require 'serverspec/matcher/be_listening'
|
data/lib/serverspec/type/file.rb
CHANGED
@@ -77,16 +77,12 @@ module Serverspec
|
|
77
77
|
@runner.check_file_is_immutable(@name)
|
78
78
|
end
|
79
79
|
|
80
|
-
def
|
81
|
-
@runner.
|
80
|
+
def md5sum
|
81
|
+
@runner.get_file_md5sum(@name).stdout.strip
|
82
82
|
end
|
83
83
|
|
84
|
-
def
|
85
|
-
@runner.
|
86
|
-
end
|
87
|
-
|
88
|
-
def match_sha256checksum(sha256sum)
|
89
|
-
@runner.check_file_has_sha256checksum(@name, sha256sum)
|
84
|
+
def sha256sum
|
85
|
+
@runner.get_file_sha256sum(@name).stdout.strip
|
90
86
|
end
|
91
87
|
|
92
88
|
def content
|
data/lib/serverspec/version.rb
CHANGED
data/serverspec.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_runtime_dependency "rspec", "~> 3.0.0"
|
22
22
|
spec.add_runtime_dependency "rspec-its"
|
23
|
-
spec.add_runtime_dependency "specinfra", "~> 2.0.0.
|
23
|
+
spec.add_runtime_dependency "specinfra", "~> 2.0.0.beta30"
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.3"
|
25
25
|
spec.add_development_dependency "rake", "~> 10.1.1"
|
26
26
|
end
|
data/spec/type/base/file_spec.rb
CHANGED
@@ -335,19 +335,21 @@ describe file('/etc/invalid-mount') do
|
|
335
335
|
end
|
336
336
|
|
337
337
|
describe file('/etc/services') do
|
338
|
-
|
338
|
+
let(:stdout) { "35435ea447c19f0ea5ef971837ab9ced\n" }
|
339
|
+
its(:md5sum) { should eq '35435ea447c19f0ea5ef971837ab9ced' }
|
339
340
|
end
|
340
341
|
|
341
342
|
describe file('invalid-file') do
|
342
|
-
|
343
|
+
its(:md5sum) { should_not eq 'INVALIDMD5CHECKSUM' }
|
343
344
|
end
|
344
345
|
|
345
346
|
describe file('/etc/services') do
|
346
|
-
|
347
|
+
let(:stdout) {"0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a" }
|
348
|
+
its(:sha256sum) { should eq '0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a' }
|
347
349
|
end
|
348
350
|
|
349
351
|
describe file('invalid-file') do
|
350
|
-
|
352
|
+
its(:sha256sum) { should_not eq 'INVALIDSHA256CHECKSUM' }
|
351
353
|
end
|
352
354
|
|
353
355
|
describe file('/etc/passwd') do
|
@@ -15,11 +15,13 @@ describe file('/tmp') do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
describe file('/etc/services') do
|
18
|
-
|
18
|
+
let(:stdout) { "35435ea447c19f0ea5ef971837ab9ced\n" }
|
19
|
+
its(:md5sum) { should eq '35435ea447c19f0ea5ef971837ab9ced' }
|
19
20
|
end
|
20
21
|
|
21
22
|
describe file('/etc/services') do
|
22
|
-
|
23
|
+
let(:stdout) {"0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a" }
|
24
|
+
its(:sha256sum) { should eq '0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a' }
|
23
25
|
end
|
24
26
|
|
25
27
|
describe file('/etc/pam.d/system-auth') do
|
@@ -154,17 +154,11 @@ describe file('/etc/invalid-mount') do
|
|
154
154
|
end
|
155
155
|
|
156
156
|
describe file('/etc/services') do
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
describe file('invalid-file') do
|
161
|
-
it { should_not match_md5checksum 'INVALIDMD5CHECKSUM' }
|
157
|
+
let(:stdout) { "35435ea447c19f0ea5ef971837ab9ced\n" }
|
158
|
+
its(:md5sum) { should eq '35435ea447c19f0ea5ef971837ab9ced' }
|
162
159
|
end
|
163
160
|
|
164
161
|
describe file('/etc/services') do
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
describe file('invalid-file') do
|
169
|
-
it { should_not match_sha256checksum 'INVALIDSHA256CHECKSUM' }
|
162
|
+
let(:stdout) {"0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a" }
|
163
|
+
its(:sha256sum) { should eq '0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a' }
|
170
164
|
end
|
@@ -335,19 +335,13 @@ describe file('/etc/invalid-mount') do
|
|
335
335
|
end
|
336
336
|
|
337
337
|
describe file('/etc/services') do
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
describe file('invalid-file') do
|
342
|
-
it { should_not match_md5checksum 'INVALIDMD5CHECKSUM' }
|
338
|
+
let(:stdout) { "35435ea447c19f0ea5ef971837ab9ced\n" }
|
339
|
+
its(:md5sum) { should eq '35435ea447c19f0ea5ef971837ab9ced' }
|
343
340
|
end
|
344
341
|
|
345
342
|
describe file('/etc/services') do
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
describe file('invalid-file') do
|
350
|
-
it { should_not match_sha256checksum 'INVALIDSHA256CHECKSUM' }
|
343
|
+
let(:stdout) {"0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a" }
|
344
|
+
its(:md5sum) { should eq '0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a' }
|
351
345
|
end
|
352
346
|
|
353
347
|
describe file('/etc/passwd') do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serverspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.beta18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 2.0.0.
|
47
|
+
version: 2.0.0.beta30
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 2.0.0.
|
54
|
+
version: 2.0.0.beta30
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,8 +122,6 @@ files:
|
|
122
122
|
- lib/serverspec/matcher/have_site_application.rb
|
123
123
|
- lib/serverspec/matcher/have_site_bindings.rb
|
124
124
|
- lib/serverspec/matcher/have_virtual_dir.rb
|
125
|
-
- lib/serverspec/matcher/match_md5checksum.rb
|
126
|
-
- lib/serverspec/matcher/match_sha256checksum.rb
|
127
125
|
- lib/serverspec/matcher/return_exit_status.rb
|
128
126
|
- lib/serverspec/matcher/return_stderr.rb
|
129
127
|
- lib/serverspec/matcher/return_stdout.rb
|