relaton-iec 0.9.0 → 0.10.0
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 +4 -4
- data/lib/relaton_iec/iec_bibliography.rb +13 -10
- data/lib/relaton_iec/version.rb +1 -1
- data/relaton_iec.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b0d53d02ba697e7635c9373d8e9896b04a7803b1b292ae9a7fb4e6ecbf73806
|
4
|
+
data.tar.gz: a5dfb8cbde724c76d067b5685ccbca0bd4799eaa03fae6b57558f105cd910f65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41f34a9491e9da321863bbfaa19173bf334eda9233702f1805f9e396c120a70ac574a75ad0e1b4e8126e3752990c69ac96f41236538f6bcc22c3b18497df0c02
|
7
|
+
data.tar.gz: 383365645ac5b6d2d0bcd3ba3f8a55493515d39a368c5645c4ede49273f4b970477db456885fa24e13081598c61f500974012c41f3e9739d37f92295188f5a27
|
@@ -43,8 +43,8 @@ module RelatonIec
|
|
43
43
|
ret = iecbib_get1(code, year, opts)
|
44
44
|
return nil if ret.nil?
|
45
45
|
|
46
|
-
ret.to_most_recent_reference unless year || opts[:keep_year]
|
47
|
-
ret.to_all_parts if opts[:all_parts]
|
46
|
+
ret = ret.to_most_recent_reference unless year || opts[:keep_year]
|
47
|
+
ret = ret.to_all_parts if opts[:all_parts]
|
48
48
|
ret
|
49
49
|
end
|
50
50
|
|
@@ -52,15 +52,15 @@ module RelatonIec
|
|
52
52
|
|
53
53
|
def fetch_ref_err(code, year, missed_years)
|
54
54
|
id = year ? "#{code}:#{year}" : code
|
55
|
-
warn "WARNING: no match found online for #{id}. "\
|
55
|
+
warn "[relaton-iec] WARNING: no match found online for #{id}. "\
|
56
56
|
"The code must be exactly like it is on the standards website."
|
57
|
-
warn "(There was no match for #{year}, though there were matches "\
|
57
|
+
warn "[relaton-iec] (There was no match for #{year}, though there were matches "\
|
58
58
|
"found for #{missed_years.join(', ')}.)" unless missed_years.empty?
|
59
59
|
if /\d-\d/ =~ code
|
60
|
-
warn "The provided document part may not exist, or the document "\
|
60
|
+
warn "[relaton-iec] The provided document part may not exist, or the document "\
|
61
61
|
"may no longer be published in parts."
|
62
62
|
else
|
63
|
-
warn "If you wanted to cite all document parts for the reference, "\
|
63
|
+
warn "[relaton-iec] If you wanted to cite all document parts for the reference, "\
|
64
64
|
"use \"#{code} (all parts)\".\nIf the document is not a standard, "\
|
65
65
|
"use its document type abbreviation (TS, TR, PAS, Guide)."
|
66
66
|
end
|
@@ -78,7 +78,7 @@ module RelatonIec
|
|
78
78
|
def isobib_search_filter(code)
|
79
79
|
docidrx = %r{^(ISO|IEC)[^0-9]*\s[0-9-]+}
|
80
80
|
corrigrx = %r{^(ISO|IEC)[^0-9]*\s[0-9-]+:[0-9]+/}
|
81
|
-
warn "
|
81
|
+
warn "[relaton-iec] (\"#{code}\") fetching..."
|
82
82
|
result = search(code)
|
83
83
|
result.select do |i|
|
84
84
|
i.hit[:code] &&
|
@@ -147,9 +147,12 @@ module RelatonIec
|
|
147
147
|
|
148
148
|
result = isobib_search_filter(code) || return
|
149
149
|
ret = isobib_results_filter(result, year)
|
150
|
-
|
151
|
-
|
152
|
-
|
150
|
+
if ret[:ret]
|
151
|
+
warn "[relaton-iec] (\"#{code}\") found #{ret[:ret].docidentifier.first.id}"
|
152
|
+
ret[:ret]
|
153
|
+
else
|
154
|
+
fetch_ref_err(code, year, ret[:years])
|
155
|
+
end
|
153
156
|
end
|
154
157
|
end
|
155
158
|
end
|
data/lib/relaton_iec/version.rb
CHANGED
data/relaton_iec.gemspec
CHANGED
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: 0.
|
4
|
+
version: 0.10.0
|
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
|
+
date: 2020-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debase
|
@@ -156,14 +156,14 @@ dependencies:
|
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 0.
|
159
|
+
version: 0.9.0
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: 0.
|
166
|
+
version: 0.9.0
|
167
167
|
description: 'RelatonIec: retrieve IEC Standards for bibliographic use using the IsoBibliographicItem
|
168
168
|
model'
|
169
169
|
email:
|