serverspec 0.14.3 → 0.14.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/serverspec/setup.rb +1 -1
- data/lib/serverspec/version.rb +1 -1
- data/spec/debian/iptables_spec.rb +2 -2
- data/spec/gentoo/iptables_spec.rb +2 -2
- data/spec/plamo/iptables_spec.rb +2 -2
- data/spec/redhat/iptables_spec.rb +2 -2
- metadata +94 -121
- data/spec/backend/exec/build_command_spec.rb +0 -32
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d0aa6233f171389a2eb290151b5e8e788f58def0
|
4
|
+
data.tar.gz: 747b9ef75c761e72c0cf5640bb6be9976f7879e2
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 70c31af75bc88fae10615394c152ac5ca1e353cab34dd3a2026dbfbc704409437184280f48b0d1bb0fa2211372988321de385cd729707b6759b87f475149a34d
|
7
|
+
data.tar.gz: 7ab52436a7093e421177bf3986a4f783a558d1657bcdbcf9d07c440e927179e02ab02117c617e89ca4b22252c0667bd52b6e13390c4c3e92cc363cf813ae39a7
|
data/lib/serverspec/setup.rb
CHANGED
@@ -189,7 +189,7 @@ EOF
|
|
189
189
|
list_of_vms = []
|
190
190
|
if vagrant_list != ''
|
191
191
|
vagrant_list.each_line do |line|
|
192
|
-
if match = /([
|
192
|
+
if match = /([\w-]+[\s]+)(created|not created|poweroff|running|saved)[\s](\(virtualbox\)|\(vmware\))/.match(line)
|
193
193
|
list_of_vms << match[1].strip!
|
194
194
|
end
|
195
195
|
end
|
data/lib/serverspec/version.rb
CHANGED
@@ -4,7 +4,7 @@ include SpecInfra::Helper::Debian
|
|
4
4
|
|
5
5
|
describe iptables do
|
6
6
|
it { should have_rule '-P INPUT ACCEPT' }
|
7
|
-
its(:command) { should eq "iptables -S | grep -- -P\\ INPUT\\ ACCEPT" }
|
7
|
+
its(:command) { should eq "iptables -S | grep -- -P\\ INPUT\\ ACCEPT || iptables-save | grep -- -P\\ INPUT\\ ACCEPT" }
|
8
8
|
end
|
9
9
|
|
10
10
|
describe iptables do
|
@@ -13,7 +13,7 @@ end
|
|
13
13
|
|
14
14
|
describe iptables do
|
15
15
|
it { should have_rule('-P INPUT ACCEPT').with_table('mangle').with_chain('INPUT') }
|
16
|
-
its(:command) { should eq "iptables -t mangle -S INPUT | grep -- -P\\ INPUT\\ ACCEPT" }
|
16
|
+
its(:command) { should eq "iptables -t mangle -S INPUT | grep -- -P\\ INPUT\\ ACCEPT || iptables-save -t mangle | grep -- -P\\ INPUT\\ ACCEPT" }
|
17
17
|
end
|
18
18
|
|
19
19
|
describe iptables do
|
@@ -4,7 +4,7 @@ include SpecInfra::Helper::Gentoo
|
|
4
4
|
|
5
5
|
describe iptables do
|
6
6
|
it { should have_rule '-P INPUT ACCEPT' }
|
7
|
-
its(:command) { should eq "iptables -S | grep -- -P\\ INPUT\\ ACCEPT" }
|
7
|
+
its(:command) { should eq "iptables -S | grep -- -P\\ INPUT\\ ACCEPT || iptables-save | grep -- -P\\ INPUT\\ ACCEPT" }
|
8
8
|
end
|
9
9
|
|
10
10
|
describe iptables do
|
@@ -13,7 +13,7 @@ end
|
|
13
13
|
|
14
14
|
describe iptables do
|
15
15
|
it { should have_rule('-P INPUT ACCEPT').with_table('mangle').with_chain('INPUT') }
|
16
|
-
its(:command) { should eq "iptables -t mangle -S INPUT | grep -- -P\\ INPUT\\ ACCEPT" }
|
16
|
+
its(:command) { should eq "iptables -t mangle -S INPUT | grep -- -P\\ INPUT\\ ACCEPT || iptables-save -t mangle | grep -- -P\\ INPUT\\ ACCEPT" }
|
17
17
|
end
|
18
18
|
|
19
19
|
describe iptables do
|
data/spec/plamo/iptables_spec.rb
CHANGED
@@ -4,7 +4,7 @@ include SpecInfra::Helper::Plamo
|
|
4
4
|
|
5
5
|
describe iptables do
|
6
6
|
it { should have_rule '-P INPUT ACCEPT' }
|
7
|
-
its(:command) { should eq "iptables -S | grep -- -P\\ INPUT\\ ACCEPT" }
|
7
|
+
its(:command) { should eq "iptables -S | grep -- -P\\ INPUT\\ ACCEPT || iptables-save | grep -- -P\\ INPUT\\ ACCEPT" }
|
8
8
|
end
|
9
9
|
|
10
10
|
describe iptables do
|
@@ -13,7 +13,7 @@ end
|
|
13
13
|
|
14
14
|
describe iptables do
|
15
15
|
it { should have_rule('-P INPUT ACCEPT').with_table('mangle').with_chain('INPUT') }
|
16
|
-
its(:command) { should eq "iptables -t mangle -S INPUT | grep -- -P\\ INPUT\\ ACCEPT" }
|
16
|
+
its(:command) { should eq "iptables -t mangle -S INPUT | grep -- -P\\ INPUT\\ ACCEPT || iptables-save -t mangle | grep -- -P\\ INPUT\\ ACCEPT" }
|
17
17
|
end
|
18
18
|
|
19
19
|
describe iptables do
|
@@ -4,7 +4,7 @@ include SpecInfra::Helper::RedHat
|
|
4
4
|
|
5
5
|
describe iptables do
|
6
6
|
it { should have_rule '-P INPUT ACCEPT' }
|
7
|
-
its(:command) { should eq "iptables -S | grep -- -P\\ INPUT\\ ACCEPT" }
|
7
|
+
its(:command) { should eq "iptables -S | grep -- -P\\ INPUT\\ ACCEPT || iptables-save | grep -- -P\\ INPUT\\ ACCEPT" }
|
8
8
|
end
|
9
9
|
|
10
10
|
describe iptables do
|
@@ -13,7 +13,7 @@ end
|
|
13
13
|
|
14
14
|
describe iptables do
|
15
15
|
it { should have_rule('-P INPUT ACCEPT').with_table('mangle').with_chain('INPUT') }
|
16
|
-
its(:command) { should eq "iptables -t mangle -S INPUT | grep -- -P\\ INPUT\\ ACCEPT" }
|
16
|
+
its(:command) { should eq "iptables -t mangle -S INPUT | grep -- -P\\ INPUT\\ ACCEPT || iptables-save -t mangle | grep -- -P\\ INPUT\\ ACCEPT" }
|
17
17
|
end
|
18
18
|
|
19
19
|
describe iptables do
|
metadata
CHANGED
@@ -1,122 +1,107 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: serverspec
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 14
|
9
|
-
- 3
|
10
|
-
version: 0.14.3
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.14.4
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Gosuke Miyashita
|
14
8
|
autorequire:
|
15
9
|
bindir: bin
|
16
10
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2014-01-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
22
14
|
name: net-ssh
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
hash: 3
|
30
|
-
segments:
|
31
|
-
- 0
|
32
|
-
version: "0"
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
33
20
|
type: :runtime
|
34
|
-
version_requirements: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: rspec
|
37
21
|
prerelease: false
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
48
33
|
version: 2.13.0
|
49
34
|
type: :runtime
|
50
|
-
version_requirements: *id002
|
51
|
-
- !ruby/object:Gem::Dependency
|
52
|
-
name: highline
|
53
35
|
prerelease: false
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 2.13.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: highline
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
63
48
|
type: :runtime
|
64
|
-
version_requirements: *id003
|
65
|
-
- !ruby/object:Gem::Dependency
|
66
|
-
name: specinfra
|
67
49
|
prerelease: false
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: specinfra
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
78
61
|
version: 0.1.0
|
79
62
|
type: :runtime
|
80
|
-
version_requirements: *id004
|
81
|
-
- !ruby/object:Gem::Dependency
|
82
|
-
name: bundler
|
83
63
|
prerelease: false
|
84
|
-
|
85
|
-
|
86
|
-
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.1.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: bundler
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
87
73
|
- - ~>
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
|
90
|
-
segments:
|
91
|
-
- 1
|
92
|
-
- 3
|
93
|
-
version: "1.3"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.3'
|
94
76
|
type: :development
|
95
|
-
version_requirements: *id005
|
96
|
-
- !ruby/object:Gem::Dependency
|
97
|
-
name: rake
|
98
77
|
prerelease: false
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.3'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
108
90
|
type: :development
|
109
|
-
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
110
97
|
description: RSpec tests for your servers configured by Puppet, Chef or anything else
|
111
|
-
email:
|
98
|
+
email:
|
112
99
|
- gosukenator@gmail.com
|
113
|
-
executables:
|
100
|
+
executables:
|
114
101
|
- serverspec-init
|
115
102
|
extensions: []
|
116
|
-
|
117
103
|
extra_rdoc_files: []
|
118
|
-
|
119
|
-
files:
|
104
|
+
files:
|
120
105
|
- .gitignore
|
121
106
|
- .travis.yml
|
122
107
|
- Gemfile
|
@@ -198,7 +183,6 @@ files:
|
|
198
183
|
- spec/aix/service_spec.rb
|
199
184
|
- spec/aix/user_spec.rb
|
200
185
|
- spec/backend/cmd/configuration_spec.rb
|
201
|
-
- spec/backend/exec/build_command_spec.rb
|
202
186
|
- spec/backend/exec/configuration_spec.rb
|
203
187
|
- spec/backend/powershell/script_helper_spec.rb
|
204
188
|
- spec/backend/ssh/configuration_spec.rb
|
@@ -371,41 +355,31 @@ files:
|
|
371
355
|
- spec/windows/service_spec.rb
|
372
356
|
- spec/windows/user_spec.rb
|
373
357
|
- spec/windows/windows_registry_key_spec.rb
|
374
|
-
has_rdoc: true
|
375
358
|
homepage: http://serverspec.org/
|
376
|
-
licenses:
|
359
|
+
licenses:
|
377
360
|
- MIT
|
361
|
+
metadata: {}
|
378
362
|
post_install_message:
|
379
363
|
rdoc_options: []
|
380
|
-
|
381
|
-
require_paths:
|
364
|
+
require_paths:
|
382
365
|
- lib
|
383
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
none: false
|
394
|
-
requirements:
|
395
|
-
- - ">="
|
396
|
-
- !ruby/object:Gem::Version
|
397
|
-
hash: 3
|
398
|
-
segments:
|
399
|
-
- 0
|
400
|
-
version: "0"
|
366
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
367
|
+
requirements:
|
368
|
+
- - '>='
|
369
|
+
- !ruby/object:Gem::Version
|
370
|
+
version: '0'
|
371
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
372
|
+
requirements:
|
373
|
+
- - '>='
|
374
|
+
- !ruby/object:Gem::Version
|
375
|
+
version: '0'
|
401
376
|
requirements: []
|
402
|
-
|
403
377
|
rubyforge_project:
|
404
|
-
rubygems_version:
|
378
|
+
rubygems_version: 2.0.3
|
405
379
|
signing_key:
|
406
|
-
specification_version:
|
380
|
+
specification_version: 4
|
407
381
|
summary: RSpec tests for your servers configured by Puppet, Chef or anything else
|
408
|
-
test_files:
|
382
|
+
test_files:
|
409
383
|
- spec/aix/command_spec.rb
|
410
384
|
- spec/aix/cron_spec.rb
|
411
385
|
- spec/aix/default_gateway_spec.rb
|
@@ -420,7 +394,6 @@ test_files:
|
|
420
394
|
- spec/aix/service_spec.rb
|
421
395
|
- spec/aix/user_spec.rb
|
422
396
|
- spec/backend/cmd/configuration_spec.rb
|
423
|
-
- spec/backend/exec/build_command_spec.rb
|
424
397
|
- spec/backend/exec/configuration_spec.rb
|
425
398
|
- spec/backend/powershell/script_helper_spec.rb
|
426
399
|
- spec/backend/ssh/configuration_spec.rb
|
@@ -1,32 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
include SpecInfra::Helper::Exec
|
4
|
-
|
5
|
-
describe 'build command with path' do
|
6
|
-
before :each do
|
7
|
-
RSpec.configure do |c|
|
8
|
-
c.path = '/sbin:/usr/sbin'
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
context 'command pattern 1' do
|
13
|
-
subject { backend.build_command('test -f /etc/passwd') }
|
14
|
-
it { should eq 'env PATH=/sbin:/usr/sbin:$PATH test -f /etc/passwd' }
|
15
|
-
end
|
16
|
-
|
17
|
-
context 'command pattern 2' do
|
18
|
-
subject { backend.build_command('test ! -f /etc/selinux/config || (getenforce | grep -i -- disabled && grep -i -- ^SELINUX=disabled$ /etc/selinux/config)') }
|
19
|
-
it { should eq 'env PATH=/sbin:/usr/sbin:$PATH test ! -f /etc/selinux/config || (env PATH=/sbin:/usr/sbin:$PATH getenforce | grep -i -- disabled && env PATH=/sbin:/usr/sbin:$PATH grep -i -- ^SELINUX=disabled$ /etc/selinux/config)' }
|
20
|
-
end
|
21
|
-
|
22
|
-
context 'command pattern 3' do
|
23
|
-
subject { backend.build_command("dpkg -s apache2 && ! dpkg -s apache2 | grep -E '^Status: .+ not-installed$'") }
|
24
|
-
it { should eq "env PATH=/sbin:/usr/sbin:$PATH dpkg -s apache2 && ! env PATH=/sbin:/usr/sbin:$PATH dpkg -s apache2 | grep -E '^Status: .+ not-installed$'" }
|
25
|
-
end
|
26
|
-
|
27
|
-
after :each do
|
28
|
-
RSpec.configure do |c|
|
29
|
-
c.path = nil
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|