relaton-gb 1.20.3 → 1.20.4

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
  SHA256:
3
- metadata.gz: d8ecccfdf0750528c8a3ea4ba13c5158366a3ba5d802b8c72b8aa04455eb24f8
4
- data.tar.gz: beca0cda066343acaad0a51ae35e765cc4fe849268c4b9119f28917db47fd9c1
3
+ metadata.gz: f018c7b2bdd3de88295eef4a3f1443754ffdbfd70b67655a3283c473a610cc09
4
+ data.tar.gz: 30f02de58467dd014c5dffb88c10431a2e9e3a92999d72b9e1adab766a753f57
5
5
  SHA512:
6
- metadata.gz: b4d898f666e80790128d6d96b98b0a58450facc97c34314a154424e49c4fcb210b2db9d301f3196f6442b9e068826f70cd083552ec67d309df4c0dfb2f85dffb
7
- data.tar.gz: e4e90288e68cfefba400de5153f4eb5798521c21a0f2bb80e48f55944dcb39b17bbf6485fbc990ea3b24c7bed80638e830942fdaaa968ddf2da947a5de8af82b
6
+ metadata.gz: 3a33d2082e6f14c0b00e622b141699dc83aa22a6c8a7c90774c80ae9d098b53d4aad305ccf7388131083b4828688abb9a44efba2107fb4fcafb6d5e23e5e6f03
7
+ data.tar.gz: 8c012e61b469aea8b4965a941bad8fd1141e0d1ab0e79b55f48790a70c215e0ae0933d35cfb4ada37efd4f4289d912a7bb685a178477f8d645e980c3ad45830a
@@ -22,7 +22,7 @@ module RelatonGb
22
22
  ).map do |h|
23
23
  ref = h.at "./td[2]/a"
24
24
  pid = ref[:onclick].match(/[0-9A-F]+/).to_s
25
- rdate = h.at("./td[7]").text
25
+ rdate = h.at("./td[8]").text
26
26
  Hit.new pid: pid, docref: ref.text, scrapper: self, release_date: rdate
27
27
  end
28
28
  HitCollection.new hits.sort_by(&:release_date).reverse
@@ -51,7 +51,7 @@ module RelatonGb
51
51
  # * :name [String]
52
52
  def get_committee(doc, _ref)
53
53
  name = doc.at("//div[contains(., '归口单位') or contains(., '归口部门')]/following-sibling::div")
54
- { type: "technical", name: name.text.delete("\r\n\t\t") }
54
+ { type: "technical", name: name.text.strip }
55
55
  end
56
56
  end
57
57
  end
@@ -123,7 +123,7 @@ module RelatonGb
123
123
  # @return [Array<String>]
124
124
  def get_ccs(doc)
125
125
  [doc.at("//div[contains(text(), '中国标准分类号')]/following-sibling::div").
126
- text.delete("\r\n\t\t")]
126
+ text.strip]
127
127
  end
128
128
 
129
129
  # @param doc [Nokogiri::HTML::Document]
@@ -136,7 +136,7 @@ module RelatonGb
136
136
  " | //dt[contains(text(), '国际标准分类号')]/following-sibling::dd")
137
137
  return [] unless ics
138
138
 
139
- field, group, subgroup = ics.text.delete("\r\n\t\t").split "."
139
+ field, group, subgroup = ics.text.strip.split "."
140
140
  [{ field: field, group: group.ljust(3, "0"), subgroup: subgroup }]
141
141
  end
142
142
 
@@ -181,7 +181,7 @@ module RelatonGb
181
181
  def get_dates(doc)
182
182
  date = doc.at("//div[contains(text(), '发布日期')]/following-sibling::div"\
183
183
  " | //dt[contains(text(), '发布日期')]/following-sibling::dd")
184
- [{ type: "published", on: date.text.delete("\r\n\t\t") }]
184
+ [{ type: "published", on: date.text.strip }]
185
185
  end
186
186
  end
187
187
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RelatonGb
4
- VERSION = "1.20.3"
4
+ VERSION = "1.20.4"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-gb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.20.3
4
+ version: 1.20.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-04-07 00:00:00.000000000 Z
11
+ date: 2026-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cnccs