serverspec 1.14.0 → 1.15.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: da3525e9160c788ed5777a236493ca7738080551
4
- data.tar.gz: 0b2f699a4e38a269233f4f024629b509aab2fa4d
3
+ metadata.gz: 64e83a8af2f88bd8cecf1aa15e554277041c8182
4
+ data.tar.gz: 4da38d7a40d696e45efdfbfa2e6ab8649d45f3fc
5
5
  SHA512:
6
- metadata.gz: a6ef8f1ab5337dd03dfd4e5b5974bc92fe51804bcf9638ffc048cdbb8bcbbfe89c0b6d5aefcf1f4b391bbd31d1494d192dbb2d5a44bc5d692f428b7651e325c9
7
- data.tar.gz: 939edb54183b55d98f2268883165c6ea468a94693f2a4ab25940639729643e42abaf075e5aa1329d00d8b7d8d73377f6201038867603d95b59217b27191482e8
6
+ metadata.gz: a0ad8ad16b4bdfd9daa5a01840402559be0fd35e5b0fb496ae796ece2cc283eb699bd1eeab8bda2f2565ab53ae46ce91388547e2775c7dbba5f4ce807d17dab0
7
+ data.tar.gz: c7ec968683d46d22df50f85feda73a2594bbaeff16bb9ac40fa49ddbf9ee64014816ff97600c4443d993b199d113686ac908b414c1dc5828f4bfe87d917068a6
@@ -3,7 +3,7 @@ module Serverspec
3
3
  module Type
4
4
  types = %w(
5
5
  base cgroup command cron default_gateway file group host iis_website iis_app_pool interface
6
- ipfilter ipnat iptables kernel_module linux_kernel_parameter lxc mail_alias
6
+ ipfilter ipnat iptables ip6tables kernel_module linux_kernel_parameter lxc mail_alias
7
7
  package php_config port ppa process routing_table selinux service user yumrepo
8
8
  windows_feature windows_hot_fix windows_registry_key windows_scheduled_task zfs
9
9
  )
@@ -1,6 +1,6 @@
1
1
  RSpec::Matchers.define :have_rule do |rule|
2
2
  match do |subject|
3
- if subject.class.name == 'Serverspec::Type::Iptables'
3
+ if subject.class.name == 'Serverspec::Type::Iptables' || subject.class.name == 'Serverspec::Type::Ip6tables'
4
4
  subject.has_rule?(rule, @table, @chain)
5
5
  else
6
6
  subject.has_rule?(rule)
@@ -29,7 +29,7 @@ require 'serverspec/matchers/return_exit_status'
29
29
  require 'serverspec/matchers/return_stdout'
30
30
  require 'serverspec/matchers/return_stderr'
31
31
 
32
- # ipfiter, ipnat, iptables
32
+ # ipfiter, ipnat, iptables, ip6tables
33
33
  require 'serverspec/matchers/have_rule'
34
34
 
35
35
  # cron, routing_table
@@ -38,4 +38,4 @@ require 'serverspec/matchers/have_entry'
38
38
  # iis_website
39
39
  require 'serverspec/matchers/have_site_application'
40
40
  require 'serverspec/matchers/have_site_bindings'
41
- require 'serverspec/matchers/have_virtual_dir'
41
+ require 'serverspec/matchers/have_virtual_dir'
@@ -0,0 +1,13 @@
1
+ module Serverspec
2
+ module Type
3
+ class Ip6tables < Base
4
+ def has_rule?(rule, table, chain)
5
+ backend.check_ip6tables_rule(rule, table, chain)
6
+ end
7
+
8
+ def to_s
9
+ 'ip6tables'
10
+ end
11
+ end
12
+ end
13
+ end
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "1.14.0"
2
+ VERSION = "1.15.0"
3
3
  end
data/serverspec.gemspec CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.add_runtime_dependency "rspec", "~> 2.99"
23
23
  spec.add_runtime_dependency "rspec-its"
24
24
  spec.add_runtime_dependency "highline"
25
- spec.add_runtime_dependency "specinfra", "~> 1.25"
25
+ spec.add_runtime_dependency "specinfra", "~> 1.26"
26
26
  spec.add_development_dependency "bundler", "~> 1.3"
27
27
  spec.add_development_dependency "rake", "~> 10.1.1"
28
28
  end
@@ -0,0 +1,21 @@
1
+ require 'spec_helper'
2
+
3
+ include SpecInfra::Helper::Debian
4
+
5
+ describe ip6tables do
6
+ it { should have_rule '-P INPUT ACCEPT' }
7
+ its(:command) { should eq "ip6tables -S | grep -- -P\\ INPUT\\ ACCEPT || ip6tables-save | grep -- -P\\ INPUT\\ ACCEPT" }
8
+ end
9
+
10
+ describe ip6tables do
11
+ it { should_not have_rule 'invalid-rule' }
12
+ end
13
+
14
+ describe ip6tables do
15
+ it { should have_rule('-P INPUT ACCEPT').with_table('mangle').with_chain('INPUT') }
16
+ its(:command) { should eq "ip6tables -t mangle -S INPUT | grep -- -P\\ INPUT\\ ACCEPT || ip6tables-save -t mangle | grep -- -P\\ INPUT\\ ACCEPT" }
17
+ end
18
+
19
+ describe ip6tables do
20
+ it { should_not have_rule('invalid-rule').with_table('mangle').with_chain('INPUT') }
21
+ end
@@ -0,0 +1,21 @@
1
+ require 'spec_helper'
2
+
3
+ include SpecInfra::Helper::Fedora
4
+
5
+ describe ip6tables do
6
+ it { should have_rule '-P INPUT ACCEPT' }
7
+ its(:command) { should eq "ip6tables -S | grep -- -P\\ INPUT\\ ACCEPT || ip6tables-save | grep -- -P\\ INPUT\\ ACCEPT" }
8
+ end
9
+
10
+ describe ip6tables do
11
+ it { should_not have_rule 'invalid-rule' }
12
+ end
13
+
14
+ describe ip6tables do
15
+ it { should have_rule('-P INPUT ACCEPT').with_table('mangle').with_chain('INPUT') }
16
+ its(:command) { should eq "ip6tables -t mangle -S INPUT | grep -- -P\\ INPUT\\ ACCEPT || ip6tables-save -t mangle | grep -- -P\\ INPUT\\ ACCEPT" }
17
+ end
18
+
19
+ describe ip6tables do
20
+ it { should_not have_rule('invalid-rule').with_table('mangle').with_chain('INPUT') }
21
+ end
@@ -0,0 +1,21 @@
1
+ require 'spec_helper'
2
+
3
+ include SpecInfra::Helper::Gentoo
4
+
5
+ describe ip6tables do
6
+ it { should have_rule '-P INPUT ACCEPT' }
7
+ its(:command) { should eq "ip6tables -S | grep -- -P\\ INPUT\\ ACCEPT || ip6tables-save | grep -- -P\\ INPUT\\ ACCEPT" }
8
+ end
9
+
10
+ describe ip6tables do
11
+ it { should_not have_rule 'invalid-rule' }
12
+ end
13
+
14
+ describe ip6tables do
15
+ it { should have_rule('-P INPUT ACCEPT').with_table('mangle').with_chain('INPUT') }
16
+ its(:command) { should eq "ip6tables -t mangle -S INPUT | grep -- -P\\ INPUT\\ ACCEPT || ip6tables-save -t mangle | grep -- -P\\ INPUT\\ ACCEPT" }
17
+ end
18
+
19
+ describe ip6tables do
20
+ it { should_not have_rule('invalid-rule').with_table('mangle').with_chain('INPUT') }
21
+ end
@@ -0,0 +1,21 @@
1
+ require 'spec_helper'
2
+
3
+ include SpecInfra::Helper::Plamo
4
+
5
+ describe ip6tables do
6
+ it { should have_rule '-P INPUT ACCEPT' }
7
+ its(:command) { should eq "ip6tables -S | grep -- -P\\ INPUT\\ ACCEPT || ip6tables-save | grep -- -P\\ INPUT\\ ACCEPT" }
8
+ end
9
+
10
+ describe ip6tables do
11
+ it { should_not have_rule 'invalid-rule' }
12
+ end
13
+
14
+ describe ip6tables do
15
+ it { should have_rule('-P INPUT ACCEPT').with_table('mangle').with_chain('INPUT') }
16
+ its(:command) { should eq "ip6tables -t mangle -S INPUT | grep -- -P\\ INPUT\\ ACCEPT || ip6tables-save -t mangle | grep -- -P\\ INPUT\\ ACCEPT" }
17
+ end
18
+
19
+ describe ip6tables do
20
+ it { should_not have_rule('invalid-rule').with_table('mangle').with_chain('INPUT') }
21
+ end
@@ -0,0 +1,21 @@
1
+ require 'spec_helper'
2
+
3
+ include SpecInfra::Helper::RedHat
4
+
5
+ describe ip6tables do
6
+ it { should have_rule '-P INPUT ACCEPT' }
7
+ its(:command) { should eq "ip6tables -S | grep -- -P\\ INPUT\\ ACCEPT || ip6tables-save | grep -- -P\\ INPUT\\ ACCEPT" }
8
+ end
9
+
10
+ describe ip6tables do
11
+ it { should_not have_rule 'invalid-rule' }
12
+ end
13
+
14
+ describe ip6tables do
15
+ it { should have_rule('-P INPUT ACCEPT').with_table('mangle').with_chain('INPUT') }
16
+ its(:command) { should eq "ip6tables -t mangle -S INPUT | grep -- -P\\ INPUT\\ ACCEPT || ip6tables-save -t mangle | grep -- -P\\ INPUT\\ ACCEPT" }
17
+ end
18
+
19
+ describe ip6tables do
20
+ it { should_not have_rule('invalid-rule').with_table('mangle').with_chain('INPUT') }
21
+ end
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.14.0
4
+ version: 1.15.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-08-08 00:00:00.000000000 Z
11
+ date: 2014-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '1.25'
75
+ version: '1.26'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '1.25'
82
+ version: '1.26'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -170,6 +170,7 @@ files:
170
170
  - lib/serverspec/type/iis_app_pool.rb
171
171
  - lib/serverspec/type/iis_website.rb
172
172
  - lib/serverspec/type/interface.rb
173
+ - lib/serverspec/type/ip6tables.rb
173
174
  - lib/serverspec/type/ipfilter.rb
174
175
  - lib/serverspec/type/ipnat.rb
175
176
  - lib/serverspec/type/iptables.rb
@@ -237,6 +238,7 @@ files:
237
238
  - spec/debian/group_spec.rb
238
239
  - spec/debian/host_spec.rb
239
240
  - spec/debian/interface_spec.rb
241
+ - spec/debian/ip6tables_spec.rb
240
242
  - spec/debian/iptables_spec.rb
241
243
  - spec/debian/kernel_module_spec.rb
242
244
  - spec/debian/linux_kernel_parameter_spec.rb
@@ -259,6 +261,7 @@ files:
259
261
  - spec/fedora/group_spec.rb
260
262
  - spec/fedora/host_spec.rb
261
263
  - spec/fedora/interface_spec.rb
264
+ - spec/fedora/ip6tables_spec.rb
262
265
  - spec/fedora/iptables_spec.rb
263
266
  - spec/fedora/kernel_module_spec.rb
264
267
  - spec/fedora/linux_kernel_parameter_spec.rb
@@ -295,6 +298,7 @@ files:
295
298
  - spec/gentoo/group_spec.rb
296
299
  - spec/gentoo/host_spec.rb
297
300
  - spec/gentoo/interface_spec.rb
301
+ - spec/gentoo/ip6tables_spec.rb
298
302
  - spec/gentoo/iptables_spec.rb
299
303
  - spec/gentoo/kernel_module_spec.rb
300
304
  - spec/gentoo/linux_kernel_parameter_spec.rb
@@ -322,6 +326,7 @@ files:
322
326
  - spec/plamo/group_spec.rb
323
327
  - spec/plamo/host_spec.rb
324
328
  - spec/plamo/interface_spec.rb
329
+ - spec/plamo/ip6tables_spec.rb
325
330
  - spec/plamo/iptables_spec.rb
326
331
  - spec/plamo/kernel_module_spec.rb
327
332
  - spec/plamo/linux_kernel_parameter_spec.rb
@@ -343,6 +348,7 @@ files:
343
348
  - spec/redhat/group_spec.rb
344
349
  - spec/redhat/host_spec.rb
345
350
  - spec/redhat/interface_spec.rb
351
+ - spec/redhat/ip6tables_spec.rb
346
352
  - spec/redhat/iptables_spec.rb
347
353
  - spec/redhat/kernel_module_spec.rb
348
354
  - spec/redhat/linux_kernel_parameter_spec.rb
@@ -483,6 +489,7 @@ test_files:
483
489
  - spec/debian/group_spec.rb
484
490
  - spec/debian/host_spec.rb
485
491
  - spec/debian/interface_spec.rb
492
+ - spec/debian/ip6tables_spec.rb
486
493
  - spec/debian/iptables_spec.rb
487
494
  - spec/debian/kernel_module_spec.rb
488
495
  - spec/debian/linux_kernel_parameter_spec.rb
@@ -505,6 +512,7 @@ test_files:
505
512
  - spec/fedora/group_spec.rb
506
513
  - spec/fedora/host_spec.rb
507
514
  - spec/fedora/interface_spec.rb
515
+ - spec/fedora/ip6tables_spec.rb
508
516
  - spec/fedora/iptables_spec.rb
509
517
  - spec/fedora/kernel_module_spec.rb
510
518
  - spec/fedora/linux_kernel_parameter_spec.rb
@@ -541,6 +549,7 @@ test_files:
541
549
  - spec/gentoo/group_spec.rb
542
550
  - spec/gentoo/host_spec.rb
543
551
  - spec/gentoo/interface_spec.rb
552
+ - spec/gentoo/ip6tables_spec.rb
544
553
  - spec/gentoo/iptables_spec.rb
545
554
  - spec/gentoo/kernel_module_spec.rb
546
555
  - spec/gentoo/linux_kernel_parameter_spec.rb
@@ -568,6 +577,7 @@ test_files:
568
577
  - spec/plamo/group_spec.rb
569
578
  - spec/plamo/host_spec.rb
570
579
  - spec/plamo/interface_spec.rb
580
+ - spec/plamo/ip6tables_spec.rb
571
581
  - spec/plamo/iptables_spec.rb
572
582
  - spec/plamo/kernel_module_spec.rb
573
583
  - spec/plamo/linux_kernel_parameter_spec.rb
@@ -589,6 +599,7 @@ test_files:
589
599
  - spec/redhat/group_spec.rb
590
600
  - spec/redhat/host_spec.rb
591
601
  - spec/redhat/interface_spec.rb
602
+ - spec/redhat/ip6tables_spec.rb
592
603
  - spec/redhat/iptables_spec.rb
593
604
  - spec/redhat/kernel_module_spec.rb
594
605
  - spec/redhat/linux_kernel_parameter_spec.rb