relaton-bib 1.14.14 → 1.16.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +2 -3
- data/grammars/biblio.rng +1 -1
- data/grammars/versions.json +3 -3
- data/lib/relaton_bib/bib_item_locality.rb +1 -1
- data/lib/relaton_bib/bibliographic_item.rb +3 -3
- data/lib/relaton_bib/contribution_info.rb +1 -1
- data/lib/relaton_bib/contributor.rb +4 -0
- data/lib/relaton_bib/document_relation.rb +2 -2
- data/lib/relaton_bib/hash_converter.rb +1 -1
- data/lib/relaton_bib/version.rb +1 -1
- data/lib/relaton_bib/xml_parser.rb +1 -2
- data/lib/relaton_bib.rb +4 -4
- 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: 6165095300e083fe287e6c6cd187f26f0449d0de89a32aade55d3dc5481c939f
|
4
|
+
data.tar.gz: fca1f9e076e2d6ed8267c86be8bc0b3fa2bae34a19feddfac306958a2d400016
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bf3f71377b6ee41cc12ee9bf80be44c0ab81d10f237535c17372f1ebdd5a17f7f6685ceda9dc684764c85663015be88ecb7a5060680b3a4a7e8af1c8c65ddaf
|
7
|
+
data.tar.gz: e2fbf83739f64942dc259573446f9925e613a29c822b3158db261d69d5fb9aa42e1468104368a2668cc535b9ee5a3e9b65ce9cdfa1e0b444d03f8d78a95ad079
|
@@ -7,11 +7,10 @@ on:
|
|
7
7
|
inputs:
|
8
8
|
next_version:
|
9
9
|
description: |
|
10
|
-
Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
|
10
|
+
Next release version. Possible values: x.y.z, major, minor, patch (or pre|rc|etc).
|
11
|
+
Also, you can pass 'skip' to skip 'git tag' and do 'gem push' for the current version
|
11
12
|
required: true
|
12
13
|
default: 'skip'
|
13
|
-
push:
|
14
|
-
tags: [ v* ]
|
15
14
|
repository_dispatch:
|
16
15
|
types: [ do-release ]
|
17
16
|
|
data/grammars/biblio.rng
CHANGED
data/grammars/versions.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"relaton-models": "v1.2.
|
2
|
+
"relaton-models": "v1.2.4",
|
3
3
|
"basicdoc-models": "v1.0.2",
|
4
4
|
"metanorma-requirements-models": "v1.0.0",
|
5
5
|
"relaton-model-ieee": "v1.0.0",
|
@@ -28,6 +28,6 @@
|
|
28
28
|
"relaton-model-omg": "v1.0.0",
|
29
29
|
"relaton-model-oasis": "v1.0.1",
|
30
30
|
"relaton-model-jis": "v0.0.1",
|
31
|
-
"metanorma-model": "v1.2.
|
32
|
-
"date": "2023-08-
|
31
|
+
"metanorma-model": "v1.2.4",
|
32
|
+
"date": "2023-08-31T02:58:33Z"
|
33
33
|
}
|
@@ -18,7 +18,7 @@ module RelatonBib
|
|
18
18
|
whole|table|annex|figure|note|list|example|volume|issue|time|anchor|
|
19
19
|
locality:[a-zA-Z0-9_]+}x
|
20
20
|
unless type&.match? type_ptrn
|
21
|
-
Util.warn "WARNING: invalid locality type:
|
21
|
+
Util.warn "WARNING: invalid locality type: `#{type}`"
|
22
22
|
end
|
23
23
|
|
24
24
|
@type = type
|
@@ -204,7 +204,7 @@ module RelatonBib
|
|
204
204
|
# @option link [String] :content
|
205
205
|
def initialize(**args)
|
206
206
|
if args[:type] && !TYPES.include?(args[:type])
|
207
|
-
Util.warn %{WARNING: type
|
207
|
+
Util.warn %{WARNING: type `#{args[:type]}` is invalid.}
|
208
208
|
end
|
209
209
|
|
210
210
|
@title = if args[:title].is_a?(TypedTitleStringCollection)
|
@@ -487,7 +487,7 @@ module RelatonBib
|
|
487
487
|
def to_all_parts # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength,Metrics/PerceivedComplexity
|
488
488
|
me = deep_clone
|
489
489
|
me.disable_id_attribute
|
490
|
-
me.relation << DocumentRelation.new(type: "
|
490
|
+
me.relation << DocumentRelation.new(type: "instanceOf", bibitem: self)
|
491
491
|
me.language.each do |l|
|
492
492
|
me.title.delete_title_part!
|
493
493
|
ttl = me.title.select do |t|
|
@@ -518,7 +518,7 @@ module RelatonBib
|
|
518
518
|
def to_most_recent_reference
|
519
519
|
me = deep_clone
|
520
520
|
disable_id_attribute
|
521
|
-
me.relation << DocumentRelation.new(type: "
|
521
|
+
me.relation << DocumentRelation.new(type: "instanceOf", bibitem: self)
|
522
522
|
me.abstract = []
|
523
523
|
me.date = []
|
524
524
|
me.docidentifier.each &:remove_date
|
@@ -22,7 +22,7 @@ module RelatonBib
|
|
22
22
|
# @param description [Array<String>]
|
23
23
|
def initialize(**args)
|
24
24
|
if args[:type] && !TYPES.include?(args[:type])
|
25
|
-
Util.warn %{Contributor's type
|
25
|
+
Util.warn %{Contributor's type `#{args[:type]}` is invalid.}
|
26
26
|
end
|
27
27
|
|
28
28
|
@type = args[:type]
|
@@ -133,6 +133,10 @@ module RelatonBib
|
|
133
133
|
# @param name [RelatonBib::LocalizedString, nil]
|
134
134
|
# @param description [Array<RelatonBib::FormattedString>]
|
135
135
|
def initialize(organization:, name: nil, description: [])
|
136
|
+
unless organization.is_a? RelatonBib::Organization
|
137
|
+
raise ArgumentError, "organization should be an instance of RelatonBib::Organization"
|
138
|
+
end
|
139
|
+
|
136
140
|
@name = name
|
137
141
|
@organization = organization
|
138
142
|
@description = description
|
@@ -5,7 +5,7 @@ module RelatonBib
|
|
5
5
|
|
6
6
|
TYPES = %w[
|
7
7
|
includes includedIn hasPart partOf merges mergedInto splits splitInto
|
8
|
-
|
8
|
+
instanceOf hasInstance exemplarOf hasExemplar manifestationOf
|
9
9
|
hasManifestation reproductionOf hasReproduction reprintOf hasReprint
|
10
10
|
expressionOf hasExpression translatedFrom hasTranslation arrangementOf
|
11
11
|
hasArrangement abridgementOf hasAbridgement annotationOf hasAnnotation
|
@@ -46,7 +46,7 @@ module RelatonBib
|
|
46
46
|
source_locality: [])
|
47
47
|
type = "obsoletes" if type == "Now withdrawn"
|
48
48
|
unless self.class::TYPES.include? type
|
49
|
-
Util.warn "WARNING: invalid relation type:
|
49
|
+
Util.warn "WARNING: invalid relation type: `#{type}`"
|
50
50
|
end
|
51
51
|
@type = type
|
52
52
|
@description = description
|
data/lib/relaton_bib/version.rb
CHANGED
data/lib/relaton_bib.rb
CHANGED
@@ -86,10 +86,10 @@ module RelatonBib
|
|
86
86
|
end
|
87
87
|
|
88
88
|
def self.grammar_hash
|
89
|
-
gem_path = File.expand_path "..", __dir__
|
90
|
-
grammars_path = File.join gem_path, "grammars", "*"
|
91
|
-
grammars = Dir[grammars_path].sort.map { |gp| File.read gp }.join
|
92
|
-
Digest::MD5.hexdigest grammars
|
89
|
+
# gem_path = File.expand_path "..", __dir__
|
90
|
+
# grammars_path = File.join gem_path, "grammars", "*"
|
91
|
+
# grammars = Dir[grammars_path].sort.map { |gp| File.read gp }.join
|
92
|
+
Digest::MD5.hexdigest RelatonBib::VERSION # grammars
|
93
93
|
end
|
94
94
|
|
95
95
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-bib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
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-
|
11
|
+
date: 2023-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|