serverspec 0.6.4 → 0.6.5
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.
- data/lib/serverspec/commands/base.rb +4 -0
- data/lib/serverspec/type/file.rb +4 -0
- data/lib/serverspec/version.rb +1 -1
- data/spec/darwin/commands_spec.rb +1 -0
- data/spec/darwin/file_spec.rb +1 -0
- data/spec/debian/commands_spec.rb +1 -0
- data/spec/debian/file_spec.rb +1 -0
- data/spec/gentoo/commands_spec.rb +1 -0
- data/spec/gentoo/file_spec.rb +1 -0
- data/spec/redhat/commands_spec.rb +1 -0
- data/spec/redhat/file_spec.rb +1 -0
- data/spec/solaris/commands_spec.rb +1 -0
- data/spec/solaris/file_spec.rb +1 -0
- data/spec/support/shared_commands_examples.rb +5 -0
- data/spec/support/shared_file_examples.rb +12 -0
- metadata +2 -2
data/lib/serverspec/type/file.rb
CHANGED
data/lib/serverspec/version.rb
CHANGED
@@ -5,6 +5,7 @@ include Serverspec::Helper::Darwin
|
|
5
5
|
describe 'Serverspec commands of Darwin family' do
|
6
6
|
it_behaves_like 'support command check_file', '/etc/passwd'
|
7
7
|
it_behaves_like 'support command check_directory', '/var/log'
|
8
|
+
it_behaves_like 'support command check_socket', '/var/run/unicorn.sock'
|
8
9
|
|
9
10
|
it_behaves_like 'support command check_installed_by_gem', 'jekyll'
|
10
11
|
it_behaves_like 'support command check_installed_by_gem with_version', 'jekyll', '1.0.2'
|
data/spec/darwin/file_spec.rb
CHANGED
@@ -5,6 +5,7 @@ include Serverspec::Helper::Darwin
|
|
5
5
|
describe 'Serverspec file matchers of Darwin family' do
|
6
6
|
it_behaves_like 'support file be_file matcher', '/etc/ssh/sshd_config'
|
7
7
|
it_behaves_like 'support file be_directory matcher', '/etc/ssh'
|
8
|
+
it_behaves_like 'support file be_socket matcher', '/var/run/unicorn.sock'
|
8
9
|
it_behaves_like 'support file contain matcher', '/etc/ssh/sshd_config', 'This is the sshd server system-wide configuration file'
|
9
10
|
it_behaves_like 'support file contain from to matcher', 'Gemfile', 'rspec', /^group :test do/, /^end/
|
10
11
|
it_behaves_like 'support file contain after matcher', 'Gemfile', 'rspec', /^group :test do/
|
@@ -5,6 +5,7 @@ include Serverspec::Helper::Debian
|
|
5
5
|
describe 'Serverspec commands of Debian family' do
|
6
6
|
it_behaves_like 'support command check_file', '/etc/passwd'
|
7
7
|
it_behaves_like 'support command check_directory', '/var/log'
|
8
|
+
it_behaves_like 'support command check_socket', '/var/run/unicorn.sock'
|
8
9
|
|
9
10
|
it_behaves_like 'support command check_installed_by_gem', 'jekyll'
|
10
11
|
it_behaves_like 'support command check_installed_by_gem with_version', 'jekyll', '1.0.2'
|
data/spec/debian/file_spec.rb
CHANGED
@@ -5,6 +5,7 @@ include Serverspec::Helper::Debian
|
|
5
5
|
describe 'Serverspec file matchers of Debian family' do
|
6
6
|
it_behaves_like 'support file be_file matcher', '/etc/ssh/sshd_config'
|
7
7
|
it_behaves_like 'support file be_directory matcher', '/etc/ssh'
|
8
|
+
it_behaves_like 'support file be_socket matcher', '/var/run/unicorn.sock'
|
8
9
|
it_behaves_like 'support file contain matcher', '/etc/ssh/sshd_config', 'This is the sshd server system-wide configuration file'
|
9
10
|
it_behaves_like 'support file contain from to matcher', 'Gemfile', 'rspec', /^group :test do/, /^end/
|
10
11
|
it_behaves_like 'support file contain after matcher', 'Gemfile', 'rspec', /^group :test do/
|
@@ -5,6 +5,7 @@ include Serverspec::Helper::Gentoo
|
|
5
5
|
describe 'Serverspec commands of Gentoo family' do
|
6
6
|
it_behaves_like 'support command check_file', '/etc/passwd'
|
7
7
|
it_behaves_like 'support command check_directory', '/var/log'
|
8
|
+
it_behaves_like 'support command check_socket', '/var/run/unicorn.sock'
|
8
9
|
|
9
10
|
it_behaves_like 'support command check_installed_by_gem', 'jekyll'
|
10
11
|
it_behaves_like 'support command check_installed_by_gem with_version', 'jekyll', '1.0.2'
|
data/spec/gentoo/file_spec.rb
CHANGED
@@ -5,6 +5,7 @@ include Serverspec::Helper::Gentoo
|
|
5
5
|
describe 'Serverspec file matchers of Gentoo family' do
|
6
6
|
it_behaves_like 'support file be_file matcher', '/etc/ssh/sshd_config'
|
7
7
|
it_behaves_like 'support file be_directory matcher', '/etc/ssh'
|
8
|
+
it_behaves_like 'support file be_socket matcher', '/var/run/unicorn.sock'
|
8
9
|
it_behaves_like 'support file contain matcher', '/etc/ssh/sshd_config', 'This is the sshd server system-wide configuration file'
|
9
10
|
it_behaves_like 'support file contain from to matcher', 'Gemfile', 'rspec', /^group :test do/, /^end/
|
10
11
|
it_behaves_like 'support file contain after matcher', 'Gemfile', 'rspec', /^group :test do/
|
@@ -5,6 +5,7 @@ include Serverspec::Helper::RedHat
|
|
5
5
|
describe 'Serverspec commands of Red Hat' do
|
6
6
|
it_behaves_like 'support command check_file', '/etc/passwd'
|
7
7
|
it_behaves_like 'support command check_directory', '/var/log'
|
8
|
+
it_behaves_like 'support command check_socket', '/var/run/unicorn.sock'
|
8
9
|
|
9
10
|
it_behaves_like 'support command check_installed_by_gem', 'jekyll'
|
10
11
|
it_behaves_like 'support command check_installed_by_gem with_version', 'jekyll', '1.0.2'
|
data/spec/redhat/file_spec.rb
CHANGED
@@ -5,6 +5,7 @@ include Serverspec::Helper::RedHat
|
|
5
5
|
describe 'Serverspec file matchers of Red Hat family' do
|
6
6
|
it_behaves_like 'support file be_file matcher', '/etc/ssh/sshd_config'
|
7
7
|
it_behaves_like 'support file be_directory matcher', '/etc/ssh'
|
8
|
+
it_behaves_like 'support file be_socket matcher', '/var/run/unicorn.sock'
|
8
9
|
it_behaves_like 'support file contain matcher', '/etc/ssh/sshd_config', 'This is the sshd server system-wide configuration file'
|
9
10
|
it_behaves_like 'support file contain from to matcher', 'Gemfile', 'rspec', /^group :test do/, /^end/
|
10
11
|
it_behaves_like 'support file contain after matcher', 'Gemfile', 'rspec', /^group :test do/
|
@@ -5,6 +5,7 @@ include Serverspec::Helper::Solaris
|
|
5
5
|
describe 'Serverspec commands of Solaris family' do
|
6
6
|
it_behaves_like 'support command check_file', '/etc/passwd'
|
7
7
|
it_behaves_like 'support command check_directory', '/var/log'
|
8
|
+
it_behaves_like 'support command check_socket', '/var/run/unicorn.sock'
|
8
9
|
|
9
10
|
it_behaves_like 'support command check_installed_by_gem', 'jekyll'
|
10
11
|
it_behaves_like 'support command check_installed_by_gem with_version', 'jekyll', '1.0.2'
|
data/spec/solaris/file_spec.rb
CHANGED
@@ -5,6 +5,7 @@ include Serverspec::Helper::Solaris
|
|
5
5
|
describe 'Serverspec file matchers of Solaris family' do
|
6
6
|
it_behaves_like 'support file be_file matcher', '/etc/ssh/sshd_config'
|
7
7
|
it_behaves_like 'support file be_directory matcher', '/etc/ssh'
|
8
|
+
it_behaves_like 'support file be_socket matcher', '/var/run/unicorn.sock'
|
8
9
|
it_behaves_like 'support file contain matcher', '/etc/ssh/sshd_config', 'This is the sshd server system-wide configuration file'
|
9
10
|
it_behaves_like 'support file contain from to matcher', 'Gemfile', 'rspec', /^group :test do/, /^end/
|
10
11
|
it_behaves_like 'support file contain after matcher', 'Gemfile', 'rspec', /^group :test do/
|
@@ -28,6 +28,11 @@ shared_examples_for 'support command check_directory' do |dir|
|
|
28
28
|
it { should eq "test -d #{dir}" }
|
29
29
|
end
|
30
30
|
|
31
|
+
shared_examples_for 'support command check_socket' do |socket|
|
32
|
+
subject { commands.check_socket(socket) }
|
33
|
+
it { should eq "test -S #{socket}" }
|
34
|
+
end
|
35
|
+
|
31
36
|
shared_examples_for 'support command check_mounted' do |path|
|
32
37
|
subject { commands.check_mounted('/') }
|
33
38
|
it { should eq "mount | grep -w -- on\\ #{path}" }
|
@@ -22,6 +22,18 @@ shared_examples_for 'support file be_directory matcher' do |name|
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
+
shared_examples_for 'support file be_socket matcher' do |name|
|
26
|
+
describe 'be_socket' do
|
27
|
+
describe file(name) do
|
28
|
+
it { should be_socket }
|
29
|
+
end
|
30
|
+
|
31
|
+
describe file('/etc/invalid_socket') do
|
32
|
+
it { should_not be_socket }
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
25
37
|
shared_examples_for 'support file contain matcher' do |name, pattern|
|
26
38
|
describe 'contain' do
|
27
39
|
describe file(name) 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: 0.6.
|
4
|
+
version: 0.6.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-06-
|
12
|
+
date: 2013-06-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: net-ssh
|