serverspec 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/serverspec/type/file.rb +7 -3
- data/lib/serverspec/version.rb +1 -1
- data/serverspec.gemspec +1 -1
- data/spec/arch/service_spec.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 016ff2d79899cdf9a52322da3f4ea6d7bf2cfb4d
|
4
|
+
data.tar.gz: c89a989e829bc70de0d8a476d0bae6dfd08e9207
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9fc7f6fef6d5cb5f2959e5a1d3bd719b3a5f95a37ef440b19b33b055c60772b3c138f49c847f804ff3e2792213c7f180114169ec6069543668a9dfe68c1f02d9
|
7
|
+
data.tar.gz: 55d001bcabdcd2f5b4b3f6380b6b69955fa21252e43d9848c09d963b18629d4d3611b3f16b0bbc62a347cdc7fb2905ad03b3b5d4cd042c5330967ee10e87bd03
|
data/lib/serverspec/type/file.rb
CHANGED
@@ -16,10 +16,14 @@ module Serverspec
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def contain(pattern, from, to)
|
19
|
-
if (
|
20
|
-
backend.
|
19
|
+
if pattern.is_a?(Array)
|
20
|
+
backend.check_file_contain_lines(@name, pattern, from, to)
|
21
21
|
else
|
22
|
-
|
22
|
+
if (from || to).nil?
|
23
|
+
backend.check_file_contain(@name, pattern)
|
24
|
+
else
|
25
|
+
backend.check_file_contain_within(@name, pattern, from, to)
|
26
|
+
end
|
23
27
|
end
|
24
28
|
end
|
25
29
|
|
data/lib/serverspec/version.rb
CHANGED
data/serverspec.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_runtime_dependency "net-ssh"
|
22
22
|
spec.add_runtime_dependency "rspec", "~> 2.13"
|
23
23
|
spec.add_runtime_dependency "highline"
|
24
|
-
spec.add_runtime_dependency "specinfra", ">= 1.
|
24
|
+
spec.add_runtime_dependency "specinfra", ">= 1.2.0"
|
25
25
|
spec.add_development_dependency "bundler", "~> 1.3"
|
26
26
|
spec.add_development_dependency "rake", "~> 10.1.1"
|
27
27
|
spec.add_development_dependency "octokit", "~> 2.7.2"
|
data/spec/arch/service_spec.rb
CHANGED
@@ -4,7 +4,7 @@ include SpecInfra::Helper::Arch
|
|
4
4
|
|
5
5
|
describe service('sshd') do
|
6
6
|
it { should be_enabled }
|
7
|
-
its(:command) { should eq "systemctl --plain list-dependencies
|
7
|
+
its(:command) { should eq "systemctl --plain list-dependencies multi-user.target | grep '^sshd.service$'" }
|
8
8
|
end
|
9
9
|
|
10
10
|
describe service('invalid-service') do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serverspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
61
|
+
version: 1.2.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.
|
68
|
+
version: 1.2.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: bundler
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|