relaton-cen 1.9.1 → 1.9.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
  SHA256:
3
- metadata.gz: '09727f48b755249b669732a011ca4674b4f0a1f782d9adc9bf49a2c6ea9bda42'
4
- data.tar.gz: c6e98c93aecbd1e291e03d9967b819131299532232d3e1122ccca717c64c821b
3
+ metadata.gz: '081d36b18e6244bc5df7cc4c0a982bd06f320fec46a0dba61b539d4d24dd4e45'
4
+ data.tar.gz: 3858963049efe36e7547139aa1d83adcab5f2ad01abad114929cab64321b9bef
5
5
  SHA512:
6
- metadata.gz: b14a05ff7c665101f1dc9a4d469a621696a6560230a920df8f406d981a606bc6813a2af45eb039f7a37fe76ba2e4eee809508901c988b50f65e36f5166843527
7
- data.tar.gz: fe5c8f91f64774b9aa1f5f7bf3b10ae58da09fef73d2b0a4f9cea6aa472116f8514d74950b7cd7f516f1b3c72ac435ab2e46c729fb919a32f824cbcb1683b806
6
+ metadata.gz: b3cb4c16b429828002c5f3dbc8f2e345d72ed7494b6e8e98eab1d35a1e88cac3ed34a655a5e361fa2245a6b70db864ee406dd3230e9e4b0a9f24c6ecf0bb0855
7
+ data.tar.gz: 72e4202622d7c86491dc2d408f534c68c931da388a9bff2f1869efaa893ee36eb68b8fcbabf4fb1915211da1268f436c5b70b5939f91e2c097ccd7c2f47b5243
data/README.adoc CHANGED
@@ -152,6 +152,16 @@ puts item.to_xml(bibdata: true)
152
152
  </bibdata>"
153
153
  ----
154
154
 
155
+ === Typed links
156
+
157
+ Each CEN document has `src` type link.
158
+
159
+ [source,ruby]
160
+ ----
161
+ item.link
162
+ => [#<RelatonBib::TypedUri:0x00007f865cf9a328 @content=#<Addressable::URI:0xbea0 URI:https://standards.cencenelec.eu/dyn/www/f?p=CEN:110:0::::FSP_PROJECT,FSP_ORG_ID:68120,6137&cs=19764D9131733FD9E70037E7A6E6740B2>, @type="src">]
163
+ ----
164
+
155
165
  === Get code, and year
156
166
  [source,ruby]
157
167
  ----
@@ -14,7 +14,7 @@ module RelatonCen
14
14
  # @param text [String]
15
15
  # @return [RelatonCen::HitCollection]
16
16
  def search(text, year = nil)
17
- /^CEN\s(?<code>.+)/ =~ text
17
+ /^C?EN\s(?<code>.+)/ =~ text
18
18
  HitCollection.new code, year
19
19
  rescue Mechanize::ResponseCodeError => e
20
20
  raise RelatonBib::RequestError, e.message
@@ -58,7 +58,7 @@ module RelatonCen
58
58
  # @param code [String]
59
59
  # @return [RelatonCen::HitCollection]
60
60
  def search_filter(code) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity
61
- %r{^CEN\s(?<code1>[^-:]+)(?:-(?<part1>\d+))?} =~ code
61
+ %r{^C?EN\s(?<code1>[^-:]+)(?:-(?<part1>\d+))?} =~ code
62
62
  warn "[relaton-cen] (\"#{code}\") fetching..."
63
63
  result = search(code)
64
64
  result.select do |i|
@@ -2,10 +2,10 @@ require "relaton/processor"
2
2
 
3
3
  module RelatonCen
4
4
  class Processor < Relaton::Processor
5
- def initialize
5
+ def initialize # rubocop:disable Lint/MissingSuper
6
6
  @short = :relaton_cen
7
7
  @prefix = "CEN"
8
- @defaultprefix = %r{^CEN\s}
8
+ @defaultprefix = %r{^C?EN\s}
9
9
  @idtype = "CEN"
10
10
  end
11
11
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RelatonCen
4
- VERSION = "1.9.1"
4
+ VERSION = "1.9.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-cen
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.1
4
+ version: 1.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-08 00:00:00.000000000 Z
11
+ date: 2021-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equivalent-xml