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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e33ca47a0fc901359a0863ad44a1472cc6776259
4
- data.tar.gz: 7f52fb2b9da01fa14879dfe904a47f5f585e1203
3
+ metadata.gz: 016ff2d79899cdf9a52322da3f4ea6d7bf2cfb4d
4
+ data.tar.gz: c89a989e829bc70de0d8a476d0bae6dfd08e9207
5
5
  SHA512:
6
- metadata.gz: 0bcd8d57689bae9e6b78508701f93e77d52f4e194c838d01af4651043934545bf317f806ece0bc742aa6151126c64d805eb9e0dc853764d58484f025e21d3e3a
7
- data.tar.gz: 38ed26a879641a12add9054c8ad2bb19b9df561fa58eb0de9509fc1f40a3c2b58342dd9a0a2164af74638ae18d68e2b78dafe7abc55801b4cb5d43d11b8d353a
6
+ metadata.gz: 9fc7f6fef6d5cb5f2959e5a1d3bd719b3a5f95a37ef440b19b33b055c60772b3c138f49c847f804ff3e2792213c7f180114169ec6069543668a9dfe68c1f02d9
7
+ data.tar.gz: 55d001bcabdcd2f5b4b3f6380b6b69955fa21252e43d9848c09d963b18629d4d3611b3f16b0bbc62a347cdc7fb2905ad03b3b5d4cd042c5330967ee10e87bd03
@@ -16,10 +16,14 @@ module Serverspec
16
16
  end
17
17
 
18
18
  def contain(pattern, from, to)
19
- if (from || to).nil?
20
- backend.check_file_contain(@name, pattern)
19
+ if pattern.is_a?(Array)
20
+ backend.check_file_contain_lines(@name, pattern, from, to)
21
21
  else
22
- backend.check_file_contain_within(@name, pattern, from, to)
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
 
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "1.2.0"
2
+ VERSION = "1.3.0"
3
3
  end
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.0.0"
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"
@@ -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 multiuser.target | grep '^sshd.service$'" }
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.2.0
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-12 00:00:00.000000000 Z
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.0.0
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.0.0
68
+ version: 1.2.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bundler
71
71
  requirement: !ruby/object:Gem::Requirement