ring-sqa 0.4.1 → 0.4.2

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: 39d4bb0c179ebb868730fb900f75518d5475cde5
4
- data.tar.gz: 13b35934016270da0ba4c922080dae1d55261d59
3
+ metadata.gz: 6c33204f008a05908c9ed4986c01c504f78ec5bf
4
+ data.tar.gz: 978b36c48d8c50f4dacecfec4fad84f68c6640d2
5
5
  SHA512:
6
- metadata.gz: 10269a86e695073359afc15d363290ac7ceba9ea6e14d9d109f8bb76ad15049f34ca474a3d166d8bd177a529842da3a6dc5d1ed1ab6fb432908abf87bc60e9e3
7
- data.tar.gz: cbcaf39e26af0800637519579576f9c7c0d70a7601470dac8bc7789783fd1b5801a321332cf4d670e2184a33319737d9fd5982d691d36ec5315c53fd7846a09d
6
+ metadata.gz: 29790e6c1bf0ffeebfd0a381c7f813e84e9cf283bac7a936a7538bb800cfa8dfd28b42c52ae91222906db509a413859a757f6c0d478b6f685a9f5b42dfb2e1b4
7
+ data.tar.gz: 00d2d8c8ef21a816195e26756026f3a971acebed5f4b68285c287971b75e842a186f5726ae9e6e7a37b433cdff28583cfeb90b4516afc5a6e566f9839df7be4e
@@ -10,3 +10,6 @@
10
10
 
11
11
  # 0.4.1
12
12
  - Version bump
13
+
14
+ # 0.4.2
15
+ - Fix processing of /etc/hosts
@@ -73,10 +73,8 @@ class SQA
73
73
 
74
74
  def entry_skip? entry
75
75
  # skip ipv4 entries if we are running in ipv6 mode, and vice versa
76
- return true unless entry.size > 2
76
+ return true unless entry.size > 1
77
77
  return true if entry.first.match(/^\s*#/)
78
- return true if CFG.hosts.ignore.any? { |re| entry[2].match Regexp.new(re) }
79
- return true unless CFG.hosts.load.any? { |re| entry[2].match Regexp.new(re) }
80
78
 
81
79
  address = IPAddr.new(entry.first) rescue (return true)
82
80
  if CFG.afi == "ipv6"
@@ -86,7 +84,13 @@ class SQA
86
84
  return true if address.ipv6?
87
85
  return true if address == IPAddr.new(CFG.host.ipv4)
88
86
  end
89
- false
87
+
88
+ entry.slice(1..-1).each do |element|
89
+ next if CFG.hosts.ignore.any? { |re| element.match Regexp.new(re) }
90
+ next unless CFG.hosts.load.any? { |re| element.match Regexp.new(re) }
91
+ return false
92
+ end
93
+ true
90
94
  end
91
95
  end
92
96
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'ring-sqa'
3
- s.version = '0.4.1'
3
+ s.version = '0.4.2'
4
4
  s.licenses = %w( Apache-2.0 )
5
5
  s.platform = Gem::Platform::RUBY
6
6
  s.authors = [ 'Saku Ytti', 'Job Snijders' ]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ring-sqa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Saku Ytti