specinfra 2.71.2 → 2.71.3

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: 910bd1387e77159f6c75c7f4ab3f96b4b02434d2
4
- data.tar.gz: 4507ac82b294370809a5bf4e0c0873e9b2145458
3
+ metadata.gz: a81bee062c4fecdd2fb6f378644ea7bc5d0a8ef3
4
+ data.tar.gz: f268f41467710403fba283d362da03658ce922e0
5
5
  SHA512:
6
- metadata.gz: 525fd01d92ffe72fc5eb009d00936bd0e269aa77822698705d15b330b050d855b4539b1d8845037fec0eba1b59a56ee27afabe825ec57a675dec0de64574d55b
7
- data.tar.gz: 4ee0713c3d72adae1e494cc49a30d28a1c3ea658a9196383cb19d8b30f659c052fe5cafa94f5ef7395d3b9fd25697cab443cf0ee45c23ba6e4307935b8b19e73
6
+ metadata.gz: 749cda56dd1345490109ac381e464b2e57eac2f7637ffa1aa6c270d2ad3c9c44b65c7aebd650f3a655c5e357e49319cedb0f1e7678df5c9cae36d397a5dac379
7
+ data.tar.gz: e4a59f70f760825313796d32a6e91283f8146c55a316e8f1b43ee6a39a9deabb989388b7e0cc551b86963279ebc414499d1afbe0a3d22121c4436f15c87ed591
@@ -1,7 +1,10 @@
1
1
  class Specinfra::Command::Base::RoutingTable < Specinfra::Command::Base
2
2
  class << self
3
3
  def check_has_entry(destination)
4
- "ip route show #{destination} | grep #{destination}"
4
+ if destination == "default"
5
+ destination = "0.0.0.0/0"
6
+ end
7
+ "ip route show #{destination}"
5
8
  end
6
9
 
7
10
  alias :get_entry :check_has_entry
@@ -175,7 +175,7 @@ module Specinfra
175
175
  :interface => expected_attr[:interface] ? $3 : nil
176
176
  }
177
177
  else
178
- matches = ret.stdout.scan(/^(\S+)(?: via (\S+))? dev (\S+).+\n|^(\S+).+\n|\s+nexthop via (\S+)\s+dev (\S+).+/)
178
+ matches = ret.stdout.scan(/^(\S+)(?: via (\S+))? dev (\S+).+\n|^(\S+).*\n|\s+nexthop via (\S+)\s+dev (\S+).+/)
179
179
  if matches.length > 1
180
180
  # ECMP route
181
181
  destination = nil
@@ -183,9 +183,9 @@ module Specinfra
183
183
  if groups[3]
184
184
  destination = groups[3]
185
185
  next
186
- else
187
- next unless expected_attr[:interface] == groups[5]
188
186
  end
187
+ next if expected_attr[:gateway] && expected_attr[:gateway] != groups[4]
188
+ next if expected_attr[:interface] && expected_attr[:interface] != groups[5]
189
189
 
190
190
  actual_attr = {
191
191
  :destination => destination,
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.71.2"
2
+ VERSION = "2.71.3"
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: 2.71.2
4
+ version: 2.71.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-07 00:00:00.000000000 Z
11
+ date: 2017-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-scp