relaton-bib 2.2.0.pre.alpha.1 → 2.2.0.pre.alpha.2

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: 005ae3e4ad7104f88e115627ff44e82c26afbaec99dbd1c04bd77c2be213f23c
4
- data.tar.gz: b642e93b937488eb3c488a6a29608b85838e4ec8a34ef9cdcebd9fa83115aa4c
3
+ metadata.gz: 8716e113f7ad4c7786d629305dc61a05db0d1edeb91bf3a98ba997ca05557de6
4
+ data.tar.gz: 7f5b7dac89db49d1fc4af1f9f275f853a1fe8d60f81263326e679329e82ab51c
5
5
  SHA512:
6
- metadata.gz: 6a7b248bd8ebb71d15f822bea93dec43df8ebca9a2cefad902aba469252c6a1bc94fabda8f68f42172e90d57c4214af5169a06b0a97e038a4e6861938d62acb6
7
- data.tar.gz: beaed5fafb6a6960645dc13967cf2438f8eb652c65973620ed596600245adce9d0de0c45a5f3a97d7bededa53c412d62cb624401176e7fb43713f4059f087ae6
6
+ metadata.gz: cbcafb8a400fcec5c3f34bdb41bffbf1ad6591e8b501add1fc1c44b581536e5806270015e71612633fb14cb54d5acbdb9b2c9370c7c2a4edbc7fbc32359eb47c
7
+ data.tar.gz: 7d76d26d13c413684650b829ec64857d7d13f4009e5ec396646935086f4e463b819f6e3cf404789751bd78d8368b1af5d1830ee9824be5546d9b50f54e053a91
@@ -26,7 +26,7 @@ jobs:
26
26
 
27
27
  - uses: ruby/setup-ruby@v1
28
28
  with:
29
- ruby-version: '3.2'
29
+ ruby-version: '3.3'
30
30
  bundler-cache: true
31
31
 
32
32
  - uses: actions/checkout@v3
data/.rubocop.yml ADDED
@@ -0,0 +1,12 @@
1
+ # This project follows the Ribose OSS style guide.
2
+ # https://github.com/riboseinc/oss-guides
3
+ # All project-specific additions and overrides should be specified in this file.
4
+
5
+ require: rubocop-rails
6
+
7
+ inherit_from:
8
+ - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
9
+ AllCops:
10
+ TargetRubyVersion: 3.2
11
+ Rails:
12
+ Enabled: false
data/CLAUDE.md CHANGED
@@ -37,6 +37,18 @@ bin/console
37
37
 
38
38
  The codebase uses [lutaml-model](https://github.com/lutaml/lutaml-model) for serialization. Each model class in `lib/relaton/bib/model/` inherits from `Lutaml::Model::Serializable` and declares attributes with XML/YAML/JSON mappings.
39
39
 
40
+ ### Constant loading (autoload)
41
+
42
+ Model and converter constants are wired via Ruby `autoload` from a central manifest,
43
+ [lib/relaton/bib/model_autoload.rb](lib/relaton/bib/model_autoload.rb). This makes load order
44
+ irrelevant and avoids circular requires between mutually-referencing classes (e.g. `OrganizationType`
45
+ ↔ `Subdivision`). **When adding a new model class, add an `autoload` entry to the manifest** rather
46
+ than a `require_relative` in a sibling file. The manifest also eagerly loads `lutaml/model`/`lutaml/xml`
47
+ and runs the `Lutaml::Model::Config.configure` block so the XML adapter is set regardless of which
48
+ class is referenced first. Exceptions that keep `require_relative`: files that only *reopen* an
49
+ already-defined module to add methods (the converter method-partials under
50
+ `lib/relaton/bib/converter/*/`), which `autoload` cannot express.
51
+
40
52
  ### Core Classes
41
53
 
42
54
  **`Relaton::Bib::Item`** ([lib/relaton/bib/model/item.rb](lib/relaton/bib/model/item.rb)) - The main serialization class defining all bibliographic attributes and their XML mappings. Uses `ItemData` as its underlying model.
data/Gemfile CHANGED
@@ -3,14 +3,6 @@ source "https://rubygems.org"
3
3
  # Specify your gem's dependencies in relaton-bib.gemspec
4
4
  gemspec
5
5
 
6
- # Use local monorepo sibling gems where available.
7
- Dir["../*/"].each do |dir|
8
- name = File.basename(dir)
9
- next if name == File.basename(__dir__)
10
- next unless File.exist?(File.join(dir, "#{name}.gemspec"))
11
- gem name, path: dir
12
- end
13
-
14
6
  gem "byebug"
15
7
  gem "equivalent-xml", "~> 0.6"
16
8
  gem "openssl", "~> 3.3.2" # 3.3.0 raises error when rubocop fetches https resources
@@ -1,5 +1,3 @@
1
- require_relative "bibdata_shared"
2
-
3
1
  module Relaton
4
2
  module Bib
5
3
  # Bibliographic item serialized as <bibdata>. Has ext, no id.
@@ -1,5 +1,3 @@
1
- require_relative "item_shared"
2
-
3
1
  module Relaton
4
2
  module Bib
5
3
  module BibdataShared
@@ -1,5 +1,3 @@
1
- require_relative "bibitem_shared"
2
-
3
1
  module Relaton
4
2
  module Bib
5
3
  # Bibliographic item serialized as <bibitem>. Has id, no ext.
@@ -1,5 +1,3 @@
1
- require_relative "item_shared"
2
-
3
1
  module Relaton
4
2
  module Bib
5
3
  module BibitemShared
@@ -1,7 +1,3 @@
1
- require_relative "address"
2
- require_relative "phone"
3
- require_relative "uri"
4
-
5
1
  module Relaton
6
2
  module Bib
7
3
  module Contact
@@ -7,6 +7,7 @@ module Relaton
7
7
  end
8
8
 
9
9
  xml do
10
+ no_root
10
11
  map_element "person", to: :person
11
12
  map_element "organization", to: :organization
12
13
  end
@@ -1,5 +1,3 @@
1
- require_relative "type/string_date"
2
-
3
1
  module Relaton
4
2
  module Bib
5
3
  class Date < Lutaml::Model::Serializable
@@ -1,7 +1,3 @@
1
- require_relative "doctype"
2
- require_relative "ics"
3
- require_relative "structured_identifier"
4
-
5
1
  module Relaton
6
2
  module Bib
7
3
  class Ext < Lutaml::Model::Serializable
@@ -1,60 +1,8 @@
1
- require "lutaml/model"
2
- require "lutaml/xml"
3
-
4
- # lutaml/xml registers :doctype as an attr_accessor on Serializable (for the
5
- # <!DOCTYPE …> XML declaration) and adds it to the override-warning list.
6
- # Relaton's :doctype attribute models the document-type field
7
- # (international-standard, technical-report, …); the override is intentional.
8
- Lutaml::Model::Attribute.format_specific_warn_names.delete(:doctype)
9
-
10
- require_relative "localized_string_attrs"
11
- require_relative "localized_string"
12
- require_relative "formattedref"
13
- require_relative "abstract"
14
- require_relative "date"
15
- require_relative "locality"
16
- require_relative "locality_stack"
17
- require_relative "image"
18
- require_relative "title"
19
- require_relative "docidentifier"
20
- require_relative "note"
21
- require_relative "full_name_type"
22
- require_relative "fullname"
23
- require_relative "contact"
24
- require_relative "logo"
25
- require_relative "organization"
26
- require_relative "affiliation"
27
- require_relative "person"
28
- require_relative "contribution_info"
29
- require_relative "contributor"
30
- require_relative "edition"
31
- require_relative "version"
32
- require_relative "status"
33
- require_relative "copyright"
34
- require_relative "place"
35
- require_relative "series"
36
- require_relative "medium"
37
- require_relative "uri"
38
- require_relative "price"
39
- require_relative "extent"
40
- require_relative "size"
41
- require_relative "keyword"
42
- require_relative "validity"
43
- require_relative "depiction"
44
- require_relative "source_locality_stack"
45
- require_relative "ext"
46
- require_relative "item_shared"
47
- require_relative "type/plain_date"
48
-
49
- Lutaml::Model::Config.configure do |config|
50
- config.xml_adapter_type = :nokogiri
51
- end
52
-
1
+ # Model classes are wired via autoload (see model_autoload.rb); the lutaml
2
+ # requires and XML adapter configuration live there so they run eagerly,
3
+ # independent of which model class is referenced first.
53
4
  module Relaton
54
5
  module Bib
55
- class Relation < Lutaml::Model::Serializable
56
- end
57
-
58
6
  # Item class repesents bibliographic item metadata.
59
7
  # Used for YAML/JSON parsing and as the XML dispatch entry point.
60
8
  class Item < Lutaml::Model::Serializable
@@ -12,7 +12,10 @@ module Relaton
12
12
  graphic_work music patent inbook incollection inproceedings journal website
13
13
  webresource dataset archival social_media alert message convesation misc
14
14
  ]
15
- attribute :formattedref, Formattedref
15
+ # Bilingual bibdata (GB) can carry several <formattedref> elements;
16
+ # classic relaton kept the first one, so collapse over-ingested
17
+ # collections instead of raising at serialization time.
18
+ attribute :formattedref, Formattedref, singular_tolerance: :first
16
19
  attribute :title, Title, collection: true, initialize_empty: true
17
20
  attribute :source, Uri, collection: true, initialize_empty: true
18
21
  attribute :docidentifier, Docidentifier, collection: true, initialize_empty: true
@@ -1,5 +1,3 @@
1
- require_relative "organization_type"
2
-
3
1
  module Relaton
4
2
  module Bib
5
3
  class Organization < Lutaml::Model::Serializable
@@ -13,8 +13,6 @@ module Relaton
13
13
  end
14
14
 
15
15
  def self.included(base) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
16
- require_relative "subdivision"
17
-
18
16
  base.instance_eval do
19
17
  include Contact
20
18
 
@@ -1,8 +1,6 @@
1
- require_relative "item_base"
2
-
3
1
  module Relaton
4
2
  module Bib
5
- class Relation
3
+ class Relation < Lutaml::Model::Serializable
6
4
  attribute :type, :string, values: %w[
7
5
  includes includedIn hasPart partOf merges mergedInto splits splitInto
8
6
  instanceOf hasInstance exemplarOf hasExemplar manifestationOf
@@ -1,5 +1,3 @@
1
- require_relative "type/string_date"
2
-
3
1
  module Relaton
4
2
  module Bib
5
3
  class Series < Lutaml::Model::Serializable
@@ -0,0 +1,85 @@
1
+ # Central autoload manifest for the model + converter layer.
2
+ #
3
+ # Declaring these as autoloads (instead of a require_relative chain) makes load
4
+ # order irrelevant and removes the circular require between OrganizationType and
5
+ # Subdivision (issue #120): a constant is loaded on first reference rather than
6
+ # at file-load time, so mutually-referencing classes resolve each other lazily.
7
+ #
8
+ # lutaml-model must be available before the first model autoload fires, and the
9
+ # XML adapter must be configured eagerly here (not inside item.rb) so that
10
+ # serializing through any model class works regardless of which one is
11
+ # referenced first.
12
+ require "lutaml/model"
13
+ require "lutaml/xml"
14
+
15
+ Lutaml::Model::Config.configure do |config|
16
+ config.xml_adapter_type = :nokogiri
17
+ end
18
+
19
+ module Relaton
20
+ module Bib
21
+ autoload :Abstract, "relaton/bib/model/abstract"
22
+ autoload :Address, "relaton/bib/model/address"
23
+ autoload :Affiliation, "relaton/bib/model/affiliation"
24
+ autoload :Bibdata, "relaton/bib/model/bibdata"
25
+ autoload :BibdataShared, "relaton/bib/model/bibdata_shared"
26
+ autoload :Bibitem, "relaton/bib/model/bibitem"
27
+ autoload :BibitemShared, "relaton/bib/model/bibitem_shared"
28
+ autoload :Contact, "relaton/bib/model/contact"
29
+ autoload :ContributionInfo, "relaton/bib/model/contribution_info"
30
+ autoload :Contributor, "relaton/bib/model/contributor"
31
+ autoload :Copyright, "relaton/bib/model/copyright"
32
+ autoload :Date, "relaton/bib/model/date"
33
+ autoload :Depiction, "relaton/bib/model/depiction"
34
+ autoload :Docidentifier, "relaton/bib/model/docidentifier"
35
+ autoload :Doctype, "relaton/bib/model/doctype"
36
+ autoload :Edition, "relaton/bib/model/edition"
37
+ autoload :Ext, "relaton/bib/model/ext"
38
+ autoload :Extent, "relaton/bib/model/extent"
39
+ autoload :Formattedref, "relaton/bib/model/formattedref"
40
+ autoload :FullName, "relaton/bib/model/fullname"
41
+ autoload :FullNameType, "relaton/bib/model/full_name_type"
42
+ autoload :ICS, "relaton/bib/model/ics"
43
+ autoload :Image, "relaton/bib/model/image"
44
+ autoload :Item, "relaton/bib/model/item"
45
+ autoload :ItemBase, "relaton/bib/model/item_base"
46
+ autoload :ItemShared, "relaton/bib/model/item_shared"
47
+ autoload :Keyword, "relaton/bib/model/keyword"
48
+ autoload :Locality, "relaton/bib/model/locality"
49
+ autoload :LocalityStack, "relaton/bib/model/locality_stack"
50
+ # localized_string.rb defines three top-level constants:
51
+ autoload :LocalizedString, "relaton/bib/model/localized_string"
52
+ autoload :TypedLocalizedString, "relaton/bib/model/localized_string"
53
+ autoload :LocalizedMarkedUpString, "relaton/bib/model/localized_string"
54
+ autoload :LocalizedStringAttrs, "relaton/bib/model/localized_string_attrs"
55
+ autoload :Logo, "relaton/bib/model/logo"
56
+ autoload :Medium, "relaton/bib/model/medium"
57
+ autoload :Note, "relaton/bib/model/note"
58
+ autoload :Organization, "relaton/bib/model/organization"
59
+ autoload :OrganizationType, "relaton/bib/model/organization_type"
60
+ autoload :Person, "relaton/bib/model/person"
61
+ autoload :Phone, "relaton/bib/model/phone"
62
+ autoload :Place, "relaton/bib/model/place"
63
+ # type/ is only a directory; these constants are top-level under Bib:
64
+ autoload :PlainDate, "relaton/bib/model/type/plain_date"
65
+ autoload :StringDate, "relaton/bib/model/type/string_date"
66
+ autoload :Price, "relaton/bib/model/price"
67
+ autoload :Relation, "relaton/bib/model/relation"
68
+ autoload :Series, "relaton/bib/model/series"
69
+ autoload :Size, "relaton/bib/model/size"
70
+ autoload :SourceLocalityStack, "relaton/bib/model/source_locality_stack"
71
+ autoload :Status, "relaton/bib/model/status"
72
+ autoload :StructuredIdentifier, "relaton/bib/model/structured_identifier"
73
+ autoload :Subdivision, "relaton/bib/model/subdivision"
74
+ autoload :Title, "relaton/bib/model/title"
75
+ autoload :Uri, "relaton/bib/model/uri"
76
+ autoload :Validity, "relaton/bib/model/validity"
77
+ autoload :Version, "relaton/bib/model/version"
78
+
79
+ module Converter
80
+ autoload :BibXml, "relaton/bib/converter/bibxml"
81
+ autoload :Bibtex, "relaton/bib/converter/bibtex"
82
+ autoload :Asciibib, "relaton/bib/converter/asciibib"
83
+ end
84
+ end
85
+ end
@@ -3,8 +3,14 @@ require "nokogiri"
3
3
  module Relaton
4
4
  module Bib
5
5
  # Strips inline markup not in the basicdoc PureTextElement set
6
- # (plus <p>, <eref>, <xref>, <fn>) from raw marked-up content strings.
7
- # Disallowed elements are unwrapped: tags removed, inner text kept.
6
+ # (plus <p>, <eref>, <xref>, <fn>, <link>) from raw marked-up content
7
+ # strings. Disallowed elements are unwrapped: tags removed, inner text
8
+ # kept.
9
+ #
10
+ # <link> is admitted because basicdoc expresses external hyperlinks as
11
+ # <link target="...">; without it a from_xml -> to_xml round-trip drops
12
+ # the tag and its target URL, keeping only the link text (see #122,
13
+ # which broke metanorma amend()).
8
14
  #
9
15
  # <fn> is admitted beyond strict PureTextElement because bibliographic
10
16
  # titles in real Metanorma input routinely carry footnotes (e.g. ISO
@@ -22,7 +28,7 @@ module Relaton
22
28
  module Sanitizer
23
29
  ALLOWED = %w[
24
30
  em strong sub sup tt underline strike smallcap br stem
25
- p eref xref fn
31
+ p eref xref fn link
26
32
  ].freeze
27
33
 
28
34
  # Elements whose children are non-basicdoc inline notation
@@ -36,15 +42,151 @@ module Relaton
36
42
 
37
43
  TAG_RX = %r{<[a-zA-Z/!?]}
38
44
 
45
+ # Captures a namespace prefix, on a tag or on an attribute: the
46
+ # "jats" of <jats:p> and </jats:italic>, and the "xlink" of
47
+ # xlink:href.
48
+ NS_PREFIX_RX = %r{(?:</?|\s)([A-Za-z_][\w.-]*):(?=[A-Za-z_])}
49
+
50
+ # Namespace that declares a prefix which the content leaves
51
+ # undeclared. The sanitiser removes it again before it serialises.
52
+ NS_PLACEHOLDER = "urn:x-relaton-undeclared:%s".freeze
53
+
54
+ # Element that carries the placeholder declarations. Its children
55
+ # are the sanitised content, so the element itself never reaches
56
+ # the output.
57
+ NS_WRAPPER = "relaton-sanitizer-root".freeze
58
+
59
+ # Reserved prefixes. XML declares both, so the content must not.
60
+ NS_RESERVED = %w[xml xmlns].freeze
61
+
62
+ # Serialise without the FORMAT option, so the sanitiser keeps the
63
+ # shape of element-only content instead of adding newlines and
64
+ # indent.
65
+ SAVE_OPTS = Nokogiri::XML::Node::SaveOptions::AS_XML
66
+
39
67
  def self.sanitize(content)
40
68
  return content unless sanitizable?(content)
41
69
 
70
+ node = parse(content)
71
+ return content if node.nil?
72
+
73
+ sanitize_children(node)
74
+ node.children.map do |c|
75
+ c.to_xml(encoding: "UTF-8", save_with: SAVE_OPTS)
76
+ end.join
77
+ end
78
+
79
+ #
80
+ # Parse the content into a node whose children are the content.
81
+ #
82
+ # @param [String] content The raw marked-up content.
83
+ #
84
+ # @return [Nokogiri::XML::Node, nil] The node, or nil when the
85
+ # content does not parse.
86
+ #
87
+ def self.parse(content)
42
88
  fragment = Nokogiri::XML::DocumentFragment.parse(content)
43
- return content if fragment.errors.any?
89
+ return fragment if fragment.errors.empty?
90
+
91
+ parse_with_prefixes(content)
92
+ end
93
+ private_class_method :parse
44
94
 
45
- sanitize_children(fragment)
46
- fragment.children.map { |c| c.to_xml(encoding: "UTF-8") }.join
95
+ #
96
+ # Parse content that uses undeclared namespace prefixes.
97
+ #
98
+ # An undeclared prefix is always a parse error, so without this the
99
+ # sanitiser gives up on exactly the third-party markup that needs
100
+ # sanitising most. Declare every prefix that the content uses on a
101
+ # wrapper element, parse, then remove the placeholder namespaces
102
+ # from the elements and from the attributes. See metanorma-pdfa#99.
103
+ #
104
+ # An undeclared prefix inside an OPAQUE <stem> goes as well. The
105
+ # sanitiser cannot keep it: an undeclared prefix in the output is
106
+ # the exact failure that this method removes. Only a namespace that
107
+ # the content declares itself survives verbatim.
108
+ #
109
+ # @param [String] content The raw marked-up content.
110
+ #
111
+ # @return [Nokogiri::XML::Element, nil] The wrapper element, or nil
112
+ # when the content uses no prefix or does not parse.
113
+ #
114
+ def self.parse_with_prefixes(content)
115
+ decl = placeholder_declarations(content) or return
116
+ name = wrapper_name(content)
117
+ doc = Nokogiri::XML "<#{name} #{decl}>#{content}</#{name}>"
118
+ return unless doc.errors.empty?
119
+
120
+ drop_placeholder_namespaces doc.root
121
+ end
122
+ private_class_method :parse_with_prefixes
123
+
124
+ #
125
+ # Declare every namespace prefix that the content uses.
126
+ #
127
+ # @param [String] content The raw marked-up content.
128
+ #
129
+ # @return [String, nil] The declarations, or nil when the content
130
+ # uses no prefix.
131
+ #
132
+ def self.placeholder_declarations(content)
133
+ prefixes = content.scan(NS_PREFIX_RX).flatten.uniq - NS_RESERVED
134
+ return if prefixes.empty?
135
+
136
+ prefixes.map do |pfx|
137
+ %(xmlns:#{pfx}="#{format NS_PLACEHOLDER, pfx}")
138
+ end.join(" ")
139
+ end
140
+ private_class_method :placeholder_declarations
141
+
142
+ #
143
+ # Name a wrapper element that the content does not close itself.
144
+ #
145
+ # Content that holds the literal end tag of the wrapper would close
146
+ # it early. The document then has more than one root, the parse
147
+ # fails, and the sanitiser gives up on content that it can handle.
148
+ #
149
+ # @param [String] content The raw marked-up content.
150
+ #
151
+ # @return [String] A name that the content does not contain.
152
+ #
153
+ def self.wrapper_name(content)
154
+ name = NS_WRAPPER
155
+ name += "-x" while content.include?(name)
156
+ name
157
+ end
158
+ private_class_method :wrapper_name
159
+
160
+ #
161
+ # Remove the placeholder namespaces, and only those.
162
+ #
163
+ # Nokogiri's remove_namespaces! would also strip a namespace that
164
+ # the content declares itself, such as the MathML xmlns inside an
165
+ # OPAQUE <stem>, which must survive verbatim. Match the wrapper's
166
+ # own declarations, so a namespace of the content never matches,
167
+ # whatever its URI.
168
+ #
169
+ # The declarations stay on the wrapper element. Only its children
170
+ # reach the output, so the declarations never leak. Do not
171
+ # serialise the root itself.
172
+ #
173
+ # @param [Nokogiri::XML::Element] root The wrapper element.
174
+ #
175
+ # @return [Nokogiri::XML::Element] The same element.
176
+ #
177
+ def self.drop_placeholder_namespaces(root)
178
+ placeholders = root.namespace_definitions
179
+ root.traverse do |node|
180
+ node.namespace = nil if placeholders.include?(node.namespace)
181
+ next unless node.element?
182
+
183
+ node.attribute_nodes.each do |attr|
184
+ attr.namespace = nil if placeholders.include?(attr.namespace)
185
+ end
186
+ end
187
+ root
47
188
  end
189
+ private_class_method :drop_placeholder_namespaces
48
190
 
49
191
  def self.sanitizable?(content)
50
192
  content.is_a?(::String) && !content.empty? && content.match?(TAG_RX)
@@ -1,5 +1,5 @@
1
1
  module Relaton
2
2
  module Bib
3
- VERSION = "2.2.0.pre.alpha.1".freeze
3
+ VERSION = "2.2.0.pre.alpha.2".freeze
4
4
  end
5
5
  end
data/lib/relaton/bib.rb CHANGED
@@ -9,17 +9,10 @@ require_relative "bib/version"
9
9
  require_relative "bib/util"
10
10
  require_relative "bib/sanitizer"
11
11
  require_relative "bib/namespace_helper"
12
+ # Model and converter classes are wired via autoload (see model_autoload.rb) so
13
+ # that load order is irrelevant and mutually-referencing classes resolve lazily.
14
+ require_relative "bib/model_autoload"
12
15
  require_relative "bib/item_data"
13
- require_relative "bib/model/item"
14
- require_relative "bib/model/item_base"
15
- require_relative "bib/model/bibitem_shared"
16
- require_relative "bib/model/bibdata_shared"
17
- require_relative "bib/model/bibitem"
18
- require_relative "bib/model/bibdata"
19
- require_relative "bib/converter/bibxml"
20
- require_relative "bib/converter/bibtex"
21
- require_relative "bib/converter/asciibib"
22
- require_relative "bib/model/relation"
23
16
 
24
17
  module Relaton
25
18
  # class Error < StandardError; end
data/relaton-bib.gemspec CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.bindir = "exe"
22
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
23
  spec.require_paths = ["lib"]
24
- spec.required_ruby_version = Gem::Requirement.new(">= 3.3.0")
24
+ spec.required_ruby_version = Gem::Requirement.new(">= 3.2.0")
25
25
 
26
26
  spec.add_dependency "bibtex-ruby"
27
27
  spec.add_dependency "iso639"
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.add_dependency "lutaml-model", "~> 0.8.0"
30
30
  spec.add_dependency "nokogiri", ">= 1.16"
31
31
  spec.add_dependency "psych", "~> 5.2.0" # versin 5.3.0 crashes
32
- spec.add_dependency "relaton-core", "~> 2.2.0.pre.alpha.1"
33
- spec.add_dependency "relaton-logger", "~> 2.2.0.pre.alpha.1"
32
+ spec.add_dependency "relaton-core", "~> 0.0.8"
33
+ spec.add_dependency "relaton-logger", "~> 0.2.0"
34
34
  spec.add_dependency "rfcxml", "~> 0.4.3"
35
35
  end
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: 2.2.0.pre.alpha.1
4
+ version: 2.2.0.pre.alpha.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-06-26 00:00:00.000000000 Z
11
+ date: 2026-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bibtex-ruby
@@ -100,28 +100,28 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 2.2.0.pre.alpha.1
103
+ version: 0.0.8
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 2.2.0.pre.alpha.1
110
+ version: 0.0.8
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: relaton-logger
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 2.2.0.pre.alpha.1
117
+ version: 0.2.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 2.2.0.pre.alpha.1
124
+ version: 0.2.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rfcxml
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -150,6 +150,7 @@ files:
150
150
  - ".gitmodules"
151
151
  - ".hound.yml"
152
152
  - ".rspec"
153
+ - ".rubocop.yml"
153
154
  - CLAUDE.md
154
155
  - Gemfile
155
156
  - LICENSE.txt
@@ -225,6 +226,7 @@ files:
225
226
  - lib/relaton/bib/model/uri.rb
226
227
  - lib/relaton/bib/model/validity.rb
227
228
  - lib/relaton/bib/model/version.rb
229
+ - lib/relaton/bib/model_autoload.rb
228
230
  - lib/relaton/bib/namespace_helper.rb
229
231
  - lib/relaton/bib/sanitizer.rb
230
232
  - lib/relaton/bib/util.rb
@@ -243,7 +245,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
243
245
  requirements:
244
246
  - - ">="
245
247
  - !ruby/object:Gem::Version
246
- version: 3.3.0
248
+ version: 3.2.0
247
249
  required_rubygems_version: !ruby/object:Gem::Requirement
248
250
  requirements:
249
251
  - - ">="