specinfra 1.25.8 → 1.26.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: 0acb5a58e038703cb59c6026b75e13183c636553
4
- data.tar.gz: adc9f8bc532b1cf0599fe19d4c90f10c83850066
3
+ metadata.gz: 38340f2ab0fa6f2bb429b18c11f7b66ab4684d8a
4
+ data.tar.gz: ae98d7b97ccc70c47666f67b12722e04cedc0f7c
5
5
  SHA512:
6
- metadata.gz: 863994e02a42ad21c0da540918cfd01b895a424d5f48182ad9daf088880fcc31784bbaac92aa0968c9042a8b52a9945e188e02802495edce20971d2d7ca753f6
7
- data.tar.gz: e2e83d05c726c6b7cfc84e60f9ad1f34b53b429955ddf9bf1a3b0be7784d376900dac5e4fda448c7ef8b785e19fe00e39410d8a2bed0b92bb394c619cfafac7d
6
+ metadata.gz: b32c5e713056475d8c5dfc51e5b13724fb14b0d08aa073edc7db798df425dd7251be359aae3130c2b10677362ff057451600efe9c3eb5b56a30bfdb5d8542dc5
7
+ data.tar.gz: 864c9350cdc8e6b2a9326af749126e9de92d937c3320c8e144a9d3c92f2c9e004fc8578127f0983a64a4f5e9cbe53719b9f054f3d965e0a58324132a348564f9
@@ -58,6 +58,7 @@ module SpecInfra
58
58
  exit_status = nil
59
59
  exit_signal = nil
60
60
  pass_prompt = SpecInfra.configuration.pass_prompt || /^\[sudo\] password for/
61
+ retry_prompt = /^Sorry, try again/
61
62
 
62
63
  ssh = SpecInfra.configuration.ssh
63
64
  ssh.open_channel do |channel|
@@ -69,7 +70,9 @@ module SpecInfra
69
70
  channel.exec("#{command}") do |ch, success|
70
71
  abort "FAILED: couldn't execute command (ssh.channel.exec)" if !success
71
72
  channel.on_data do |ch, data|
72
- if data.match pass_prompt
73
+ if data.match retry_prompt
74
+ abort 'Wrong sudo password! Please confirm your password.'
75
+ elsif data.match pass_prompt
73
76
  channel.send_data "#{SpecInfra.configuration.sudo_password}\n"
74
77
  else
75
78
  stdout_data += data
@@ -289,6 +289,10 @@ module SpecInfra
289
289
  raise NotImplementedError.new
290
290
  end
291
291
 
292
+ def check_ip6tables_rule(rule, table=nil, chain=nil)
293
+ raise NotImplementedError.new
294
+ end
295
+
292
296
  def check_zfs(zfs, property=nil, value=nil)
293
297
  raise NotImplementedError.new
294
298
  end
@@ -17,6 +17,18 @@ module SpecInfra
17
17
  cmd
18
18
  end
19
19
 
20
+ def check_ip6tables_rule(rule, table=nil, chain=nil)
21
+ cmd = "ip6tables"
22
+ cmd += " -t #{escape(table)}" if table
23
+ cmd += " -S"
24
+ cmd += " #{escape(chain)}" if chain
25
+ cmd += " | grep -- #{escape(rule)}"
26
+ cmd += " || ip6tables-save"
27
+ cmd += " -t #{escape(table)}" if table
28
+ cmd += " | grep -- #{escape(rule)}"
29
+ cmd
30
+ end
31
+
20
32
  def check_selinux(mode)
21
33
  cmd = ""
22
34
  cmd += "test ! -f /etc/selinux/config || (" if mode == "disabled"
@@ -1,3 +1,3 @@
1
1
  module SpecInfra
2
- VERSION = "1.25.8"
2
+ VERSION = "1.26.0"
3
3
  end
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: 1.25.8
4
+ version: 1.26.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-27 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: bundler