relaton-cen 1.16.0 → 1.16.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: b5f0cd6a09da357f5ca19fe9d38430f7880d9b9658ee89bbcdf56a7c081342f1
4
- data.tar.gz: c3645683652f184f5d037de48065b3e31dc173e84230de6f00d1f253f607febf
3
+ metadata.gz: a64d7b3c77fcd73b38bc5ce62313141e51da3b0f784532b6ff10da1069a7c528
4
+ data.tar.gz: 6186b2913635bc27fc7cf8ea86961985a809063dc36ca60d75a78976b89949b5
5
5
  SHA512:
6
- metadata.gz: 71f1f8971c40519883ead3fcd2a436a05c7d3826be5d1e1e3d3eae3e7d095a4b2c549228e918c18eff2df744fa4bd61297ec78a6c8481624b5106165aa7e8213
7
- data.tar.gz: 13f632f4e026a41ebce994abbf3e9ca9505b51ecc551ed44bb325681427aae678305b7ed9b955db674dd6a8c3dc132971408060c51bf269262df33ad3b9f7248
6
+ metadata.gz: ae0b06db552199faef6afda209aa35918b4b486a04e8979c4554527443ac29122e4c6dcb0597e6438898a4dbda24596e7ea436b4810e4becd57eda9415b23e5b
7
+ data.tar.gz: 7a7644ba895afbfe99c9b5601a1cff601ebd7ee00f5ff842507d3f36f2ecd3ae53ecf054c162ac7d852ad435536997df827040604b15fa5f1f7039bb04b024fb
data/Gemfile CHANGED
@@ -14,5 +14,5 @@ gem "rubocop-performance", "~> 1.11.0"
14
14
  gem "rubocop-rails", "~> 2.10.0"
15
15
  gem "ruby-jing"
16
16
  gem "simplecov"
17
- gem "vcr", "~> 5.0.0"
18
- gem "webmock"
17
+ gem "vcr", "~> 6.2.0"
18
+ gem "webmock", "~> 3.19.0"
data/README.adoc CHANGED
@@ -33,6 +33,8 @@ $ gem install relaton-cen
33
33
 
34
34
  == Usage
35
35
 
36
+ For CENELEC standards, use references with the prefix `CEN/CLC`. For example, `CEN/CLC Guide 6`.
37
+
36
38
  === Search for a standard using keywords
37
39
 
38
40
  [source,ruby]
@@ -48,12 +50,14 @@ item = hit_collection[0].fetch
48
50
  ...
49
51
  ----
50
52
 
53
+ === Get a standard by its code
54
+
51
55
  [source,ruby]
52
56
  ----
53
57
  > RelatonCen::CenBibliography.get "CEN/CLC Guide 6"
54
- [relaton-cen] ("CEN/CLC Guide 6") fetching...
58
+ [relaton-cen] (CEN/CLC Guide 6) fetching...
55
59
  [isoics] code   not found in ICS list
56
- [relaton-cen] ("CEN/CLC Guide 6") found CEN/CLC Guide 6:2014
60
+ [relaton-cen] (CEN/CLC Guide 6) `found CEN/CLC Guide 6`
57
61
  =>
58
62
  #<RelatonCen::BibliographicItem:0x000000011371cb90
59
63
  @abstract=
@@ -106,14 +110,14 @@ item.link
106
110
  [source,ruby]
107
111
  ----
108
112
  RelatonCen::CenBibliography.get "CEN ISO/TS 21003-7:2019"
109
- [relaton-cen] ("CEN ISO/TS 21003-7") fetching...
110
- [relaton-cen] ("CEN ISO/TS 21003-7") found CEN ISO/TS 21003-7:2019
113
+ [relaton-cen] (CEN ISO/TS 21003-7) fetching...
114
+ [relaton-cen] (CEN ISO/TS 21003-7) found CEN `ISO/TS 21003-7:2019`
111
115
  => #<RelatonIsoBib::IsoBibliographicItem:0x00007fadcd596c58
112
116
  ...
113
117
 
114
118
  RelatonCen::CenBibliography.get "CEN ISO/TS 21003-7", "2019"
115
- [relaton-cen] ("CEN ISO/TS 21003-7") fetching...
116
- [relaton-cen] ("CEN ISO/TS 21003-7") found CEN ISO/TS 21003-7:2019
119
+ [relaton-cen] (CEN ISO/TS 21003-7) fetching...
120
+ [relaton-cen] (CEN ISO/TS 21003-7) found CEN `ISO/TS 21003-7:2019`
117
121
  => #<RelatonIsoBib::IsoBibliographicItem:0x00007fadcd5df9f8
118
122
  ...
119
123
  ----
@@ -101,8 +101,9 @@ module RelatonCen
101
101
  result = search_filter(code) || return
102
102
  ret = isobib_results_filter(result, year)
103
103
  if ret[:ret]
104
- warn "[relaton-cen] (\"#{code}\") found #{ret[:ret].docidentifier.first&.id}"
105
- ret[:ret]
104
+ bib = year ? ret[:ret] : ret[:ret].to_most_recent_reference
105
+ warn "[relaton-cen] (#{code}) found `#{bib.docidentifier.first&.id}`"
106
+ bib
106
107
  else
107
108
  fetch_ref_err(code, year, ret[:years])
108
109
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RelatonCen
4
- VERSION = "1.16.0"
4
+ VERSION = "1.16.1"
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.16.0
4
+ version: 1.16.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: 2023-09-03 00:00:00.000000000 Z
11
+ date: 2023-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mechanize