relaton-bib 1.14.14 → 1.16.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b9cd2bd785b86aa60a2f08db370a0f1a1ed646a13eab981c40c946c802f74cd
4
- data.tar.gz: e132568753c5aa9200e186dd780265f86c038cbb3365daa3de5e48f16e8a94cc
3
+ metadata.gz: 6165095300e083fe287e6c6cd187f26f0449d0de89a32aade55d3dc5481c939f
4
+ data.tar.gz: fca1f9e076e2d6ed8267c86be8bc0b3fa2bae34a19feddfac306958a2d400016
5
5
  SHA512:
6
- metadata.gz: a83ab74f7defef533468c71c4796066ecd99b9e2f2db4f74735516e1128b8126e97d060eee2935057fb6a39f46f664e9bb8c10a4c47fac73d78ac848e4a472fe
7
- data.tar.gz: e318b237b2e24a4a095b765ebd251f392bbf8071257ff599ae043f64b1bba76ef2322dc74e2ba0bb15b3c1e9ed1b67a05ee71b63e141710fb8e9b076e0fc8372
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
@@ -1283,7 +1283,7 @@
1283
1283
  <value>mergedInto</value>
1284
1284
  <value>splits</value>
1285
1285
  <value>splitInto</value>
1286
- <value>instance</value>
1286
+ <value>instanceOf</value>
1287
1287
  <value>hasInstance</value>
1288
1288
  <value>exemplarOf</value>
1289
1289
  <value>hasExemplar</value>
@@ -1,5 +1,5 @@
1
1
  {
2
- "relaton-models": "v1.2.3",
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.2",
32
- "date": "2023-08-02T19:17:03Z"
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: #{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 "#{args[:type]}" is invalid.}
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: "instance", bibitem: self)
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: "instance", bibitem: self)
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 "#{args[:type]}" is invalid.}
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
- instance hasInstance exemplarOf hasExemplar manifestationOf
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: #{type}"
49
+ Util.warn "WARNING: invalid relation type: `#{type}`"
50
50
  end
51
51
  @type = type
52
52
  @description = description
@@ -348,7 +348,7 @@ module RelatonBib
348
348
  if rel[:bibitem]
349
349
  rel[:bibitem] = bib_item hash_to_bib(rel[:bibitem])
350
350
  else
351
- Util.warn "bibitem missing: #{rel}"
351
+ Util.warn "bibitem missing: `#{rel}`"
352
352
  rel[:bibitem] = nil
353
353
  end
354
354
  end
@@ -1,3 +1,3 @@
1
1
  module RelatonBib
2
- VERSION = "1.14.14".freeze
2
+ VERSION = "1.16.1".freeze
3
3
  end
@@ -17,8 +17,7 @@ module RelatonBib
17
17
  if bibitem
18
18
  bib_item item_data(bibitem)
19
19
  else
20
- Util.warn "WARNING: can't find bibitem or bibdata element " \
21
- "in the XML"
20
+ Util.warn "WARNING: can't find bibitem or bibdata element in the XML"
22
21
  nil
23
22
  end
24
23
  end
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.14.14
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-08-26 00:00:00.000000000 Z
11
+ date: 2023-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable