relaton-render 0.7.4 → 0.7.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +1 -1
- data/lib/relaton/render/fields/fields.rb +2 -1
- data/lib/relaton/render/parse/parse_id.rb +6 -6
- data/lib/relaton/render/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b47617ae80167f0cc531f028b1012d2bcbd6f3349cda1bb295d97bf5af2bece
|
4
|
+
data.tar.gz: ce208c20d47927c342769bbbbfb88bb065f382a20814756cb7632b5e7d0136bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5760bec56ebe156eb74037acf9a57ff4c881cf70cf36e9c9a5d2acf026188409fac0f1a7205ebbcbe2d7d4b0f3b7727fbf149323cfc74450085408e88aae522f
|
7
|
+
data.tar.gz: 1886c6e222cbc621291c5cd2e6f54d22067c04e732662cd09858fef57c1ad372036ce8ad0527c6479bfeb0d8a96f9166f7d19429a0e40704949a3d2e433ab52e
|
data/README.adoc
CHANGED
@@ -182,7 +182,7 @@ drawn from the bibliographic item:
|
|
182
182
|
| labels | | | text to be looked up in internationalisation configuration files: "edition", "In", "At", "Vol", "Vols", "p.", "pp"
|
183
183
|
|===
|
184
184
|
|
185
|
-
Missing dates and places of publication are rendered as "n.d." and "n.p." or the equivalent internationalisation (`no_date`, `no_place` in the internationalisation YAML files.) However, missing dates are left as nil in standards, as undated standards indicate that the citation applies to the latest version of the standard, and not that the date is unknown.
|
185
|
+
Missing dates and places of publication are rendered as "n.d." and "n.p." or the equivalent internationalisation (`no_date`, `no_place` in the internationalisation YAML files.) However, missing dates are left as nil in standards, as undated standards indicate that the citation applies to the latest version of the standard, and not that the date is unknown. Missing dates are also left as nil in webresources and websites, since they are continuously updated.
|
186
186
|
|
187
187
|
Many fields are populated either by the description of the bibliographic item itself, or by the description of the item containing it (the _host_ item: `./relation[@type = 'includedIn']/bibitem`). For example, in a paper included in an edited volume, the edition will typically be given for the editor volume, rather than for the paper. Those fields are indicated by "Can come from host" in the table.
|
188
188
|
|
@@ -56,7 +56,8 @@ module Relaton
|
|
56
56
|
[%i(date date), %i(date_updated date_updated),
|
57
57
|
%i(date_accessed date_accessed)].each do |k|
|
58
58
|
hash[k[0]] = dateformat(hash[k[1]], hash, k)
|
59
|
-
k[0] == :date &&
|
59
|
+
k[0] == :date &&
|
60
|
+
!%w(standard webresource website).include?(hash[:type]) and
|
60
61
|
hash[k[0]] ||= @r.i18n.get["no_date"]
|
61
62
|
end
|
62
63
|
end
|
@@ -11,9 +11,10 @@ module Relaton
|
|
11
11
|
id_sort_by_scope(ids).each_with_object([]) do |(k, v), m|
|
12
12
|
case k
|
13
13
|
when "IEEE"
|
14
|
-
|
15
|
-
|
16
|
-
m <<
|
14
|
+
f = id_extract_by_scope(v, "trademark")
|
15
|
+
f.empty? and f = id_extract_by_scope(v, nil)
|
16
|
+
m << f
|
17
|
+
else m << id_extract_by_scope(v, nil)
|
17
18
|
end
|
18
19
|
end.flatten
|
19
20
|
end
|
@@ -27,10 +28,9 @@ module Relaton
|
|
27
28
|
end
|
28
29
|
|
29
30
|
def id_extract_by_scope(idents, key)
|
30
|
-
if idents.key?(key)
|
31
|
+
if idents.key?(key)
|
31
32
|
idents[key]
|
32
|
-
else
|
33
|
-
idents.each_with_object([]) { |(_, v), m| m << v }.flatten
|
33
|
+
else []
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-render
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|