specinfra 2.0.0.beta44 → 2.0.0.beta45

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7e06e2085c8a22f674bc94c57c8915bb79029774
4
- data.tar.gz: 07b5050a0cd064f0aa9a4a56a1258b2aae747bbb
3
+ metadata.gz: da34115f7301508e58d4ce39282f0424d6f2ca9b
4
+ data.tar.gz: fe5b623278cdebae40aaec7dad64ed3e676be930
5
5
  SHA512:
6
- metadata.gz: 2d15fb703b1b5894fcbc5ab87ca8571482a0b06abd704d0a15a727e3d19c18c14976bf51017e558298a71d103dd1d20c2c83595ad25c8ac51d3ecdbf93313fc5
7
- data.tar.gz: ac34fb786f096fd8024665dc8ee07b47e21ff591ada409d0a3a61a4a444c9d13a53a7a960cd098bc145bc9df9ab7e77458efb298d136ccaea1f24848897444a0
6
+ metadata.gz: dfdbfe7d21fd49334d4b27cd5088cea06f89528a1ff342e2f95997be59c7bc26d929ef50dae149c5db7e542423fb126114c909c9912201b0b28087e0de47982c
7
+ data.tar.gz: 60e692b38a48cd2f040b452ddf4bb474c604fd118288822a76db4ebe07d4058fddaf2a42f83dbe9d692b4a3be188bf12e616d5a698efc91e2937ef81912e3cc8
@@ -0,0 +1,2 @@
1
+ class Specinfra::Command::Base::Ip6tables < Specinfra::Command::Base
2
+ end
@@ -0,0 +1,15 @@
1
+ class Specinfra::Command::Linux::Base::Ip6tables < Specinfra::Command::Base::Ip6tables
2
+ class << self
3
+ def check_has_rule(rule, table=nil, chain=nil)
4
+ cmd = "ip6tables"
5
+ cmd += " -t #{escape(table)}" if table
6
+ cmd += " -S"
7
+ cmd += " #{escape(chain)}" if chain
8
+ cmd += " | grep -- #{escape(rule)}"
9
+ cmd += " || ip6tables-save"
10
+ cmd += " -t #{escape(table)}" if table
11
+ cmd += " | grep -- #{escape(rule)}"
12
+ cmd
13
+ end
14
+ end
15
+ end
@@ -15,6 +15,7 @@ require 'specinfra/command/base/interface'
15
15
  require 'specinfra/command/base/ipfilter'
16
16
  require 'specinfra/command/base/ipnat'
17
17
  require 'specinfra/command/base/iptables'
18
+ require 'specinfra/command/base/ip6tables'
18
19
  require 'specinfra/command/base/kernel_module'
19
20
  require 'specinfra/command/base/lxc_container'
20
21
  require 'specinfra/command/base/mail_alias'
@@ -35,6 +36,7 @@ require 'specinfra/command/linux/base'
35
36
  require 'specinfra/command/linux/base/file'
36
37
  require 'specinfra/command/linux/base/interface'
37
38
  require 'specinfra/command/linux/base/iptables'
39
+ require 'specinfra/command/linux/base/ip6tables'
38
40
  require 'specinfra/command/linux/base/kernel_module'
39
41
  require 'specinfra/command/linux/base/lxc_container'
40
42
  require 'specinfra/command/linux/base/package'
@@ -1,6 +1,6 @@
1
1
  class Specinfra::Helper::DetectOs::Arch < Specinfra::Helper::DetectOs
2
2
  def self.detect
3
- if run_command('uname -sr').stdout =~ /Arch/i
3
+ if File.exist?('/etc/arch-release')
4
4
  { :family => 'arch', :release => nil }
5
5
  end
6
6
  end
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.0.0.beta44"
2
+ VERSION = "2.0.0.beta45"
3
3
  end
@@ -0,0 +1,7 @@
1
+ require 'spec_helper'
2
+
3
+ set :os, :family => 'linux'
4
+
5
+ describe get_command(:check_ip6tables_has_rule, 'rule') do
6
+ it { should eq 'ip6tables -S | grep -- rule || ip6tables-save | grep -- rule' }
7
+ end
data/wercker.yml CHANGED
@@ -1,4 +1,4 @@
1
- box: mizzy/serverspec-base@0.0.3
1
+ box: mizzy/serverspec-base@0.0.5
2
2
  build:
3
3
  steps:
4
4
  - script:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specinfra
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.beta44
4
+ version: 2.0.0.beta45
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-09-01 00:00:00.000000000 Z
11
+ date: 2014-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh
@@ -155,6 +155,7 @@ files:
155
155
  - lib/specinfra/command/base/group.rb
156
156
  - lib/specinfra/command/base/host.rb
157
157
  - lib/specinfra/command/base/interface.rb
158
+ - lib/specinfra/command/base/ip6tables.rb
158
159
  - lib/specinfra/command/base/ipfilter.rb
159
160
  - lib/specinfra/command/base/ipnat.rb
160
161
  - lib/specinfra/command/base/iptables.rb
@@ -203,6 +204,7 @@ files:
203
204
  - lib/specinfra/command/linux/base.rb
204
205
  - lib/specinfra/command/linux/base/file.rb
205
206
  - lib/specinfra/command/linux/base/interface.rb
207
+ - lib/specinfra/command/linux/base/ip6tables.rb
206
208
  - lib/specinfra/command/linux/base/iptables.rb
207
209
  - lib/specinfra/command/linux/base/kernel_module.rb
208
210
  - lib/specinfra/command/linux/base/lxc_container.rb
@@ -327,6 +329,7 @@ files:
327
329
  - spec/command/base/user_spec.rb
328
330
  - spec/command/debian/service_spec.rb
329
331
  - spec/command/factory_spec.rb
332
+ - spec/command/linux/ip6tables_spec.rb
330
333
  - spec/command/module/systemd_spec.rb
331
334
  - spec/command/redhat/interface_spec.rb
332
335
  - spec/command/redhat/package_spec.rb
@@ -371,6 +374,7 @@ test_files:
371
374
  - spec/command/base/user_spec.rb
372
375
  - spec/command/debian/service_spec.rb
373
376
  - spec/command/factory_spec.rb
377
+ - spec/command/linux/ip6tables_spec.rb
374
378
  - spec/command/module/systemd_spec.rb
375
379
  - spec/command/redhat/interface_spec.rb
376
380
  - spec/command/redhat/package_spec.rb