relaton-iec 1.7.0 → 1.7.1

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
  SHA256:
3
- metadata.gz: affb3c4e8c5d26115be469d456d5b3de4f89f1184226b7a51b8dbabdd1cae937
4
- data.tar.gz: cb850e8a8cbae05c66b629db7f2ee548debf0f1dfe3d03d6dc75e8c6e85900d2
3
+ metadata.gz: 3989d41422ae3287109099dabba99ecc5c8a5657dd391fa6e069e7116df4fdac
4
+ data.tar.gz: 222dd6c957c83b1a6c4bdb0a79140bf33f64da6a1725a7ece785a1fcc797bf31
5
5
  SHA512:
6
- metadata.gz: 107761f95543a8f188d45e5aa3ea676fe904a152d32d0ebdd92e1e66ac42e2164287ac0feef3906fbb596bd6807636c3f70938fe301a2b53f2ffaf34cf316b54
7
- data.tar.gz: bcd04f967647bed2d2a4cebaff71cf5acf03ad1e388a81d44f150e9d1d4bbdbd9d16e3de222134d5806112453a3e0e4fd82aa3cc2f9ce1e55047b7f9439b9d4c
6
+ metadata.gz: 59b511e74a2315143c1ed8aa5a78e231d7b8fb7a09b568676443b39bd7d077e654fba28ff9c160000beb6ba9868684646ab546af4c26605aa2c06bac5849c827
7
+ data.tar.gz: a9530148a809cb3b898abb86a4b54c9c2c421bdd5a71a0f11ee6000ec93b45731b4bab70c088ee973a1538c42f925d2233f27fa1c71f72abacdb70fba8685584
@@ -55,11 +55,13 @@ module RelatonIec
55
55
  "//body/li#{contains}",
56
56
  "//ul[contains(@class,'search-results')]/li#{contains}",
57
57
  "//ul[contains(@class,'morethesame')]/li#{contains}"
58
- ).map { |h| make_hit h }
58
+ ).map { |h| make_hit h }.compact
59
59
  end
60
60
 
61
61
  def make_hit(hit)
62
- link = hit.at('a[@href!="#"]')
62
+ link = hit.at('a[@href!="#"]')
63
+ return unless link
64
+
63
65
  code = link.text.tr [194, 160].pack("c*").force_encoding("UTF-8"), ""
64
66
  title = hit.xpath("text()").text.gsub(/[\r\n]/, "")
65
67
  Hit.new({ code: code, title: title, url: DOMAIN + link[:href] }, self)
@@ -1,3 +1,3 @@
1
1
  module RelatonIec
2
- VERSION = "1.7.0".freeze
2
+ VERSION = "1.7.1".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-iec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-27 00:00:00.000000000 Z
11
+ date: 2020-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debase