relaton-oasis 2.0.0 → 2.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab1cfb1ce7f59b50d782f32e4605b34cbf89045a645f6e41e64ec9347156f7db
4
- data.tar.gz: ee82099958e7c5f24e3b13624e18e119641d8ce7e7da8d0334bb890bb633ff7c
3
+ metadata.gz: bd8ef234de017d7010bed3950ba491e675993fb3ae0cc20352e49d895c93e5fc
4
+ data.tar.gz: 4db3c44d28f7e88a2149b2ad001d33369499a707ff8ca0e450fc6750fdb63403
5
5
  SHA512:
6
- metadata.gz: 70195e0c65741f05572f2f7094d808af2b4e5daa7f3104768c36390eb8f1a4635215f0305523e57c23d641c1601fa839db5eb609b29076ed7534943cf902bb1a
7
- data.tar.gz: d6475eb7f0561b319970c742f639c8462d061578307a203a4331377a158f412332db20a684adbccff82a143a630167b5677e52ecfd281dcc7348cdd70548e0df
6
+ metadata.gz: 620a407b5e44093b1479f2c51e61963b3bfcd3300d1edf9b54d2ba708807d35c70a7f917def803d2c87ab3cd23fad079030360aaca791619ba3dc801ccd4e934
7
+ data.tar.gz: 0c2ccfba218a94ecbf5bc947db23b2f2e0dd474066ea44ff66a40fe604797886ba4861d5fd851e1f3881c5bb5f5f6a93d1773c56c628e0f2625ee6e42e1982fa
data/CLAUDE.md CHANGED
@@ -53,3 +53,7 @@ Tests are round-trip based: parse a fixture file, serialize back, and compare ou
53
53
  ## Style
54
54
 
55
55
  RuboCop config inherits from the Ribose OSS style guide. Target Ruby version: 3.4. Rails cops are required but disabled.
56
+
57
+ ## Testing
58
+
59
+ - **Index fixture:** `spec/fixtures/index-v1.zip` is pre-loaded into `Relaton::Index` pool in `before(:suite)` (configured in `spec/support/webmock.rb`). Run `rake spec:update_index` to refresh from relaton-data-oasis.
data/Gemfile CHANGED
@@ -5,6 +5,7 @@ source "https://rubygems.org"
5
5
  # Specify your gem's dependencies in relaton_oasis.gemspec
6
6
  gemspec
7
7
 
8
+
8
9
  gem "rake", "~> 13.0"
9
10
  gem "rspec", "~> 3.0"
10
11
 
data/README.adoc CHANGED
@@ -143,6 +143,8 @@ RelatonOasis uses the relaton-logger gem for logging. By default, it logs to STD
143
143
 
144
144
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
145
145
 
146
+ To update the index test fixture (used by tests), run `rake spec:update_index`. This downloads the latest `index-v1.zip` from the https://github.com/relaton/relaton-data-oasis[relaton-data-oasis] repository.
147
+
146
148
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
147
149
 
148
150
  == Contributing
data/Rakefile CHANGED
@@ -10,3 +10,25 @@ require "rubocop/rake_task"
10
10
  RuboCop::RakeTask.new
11
11
 
12
12
  task default: %i[spec]
13
+
14
+ namespace :spec do
15
+ desc "Download latest OASIS index fixture from relaton-data-oasis"
16
+ task :update_index do
17
+ require "net/http"
18
+ require "uri"
19
+
20
+ url = "https://raw.githubusercontent.com/relaton/relaton-data-oasis/data-v2/index-v1.zip"
21
+ dest = File.join(__dir__, "spec", "fixtures", "index-v1.zip")
22
+
23
+ puts "Downloading \#{url} ..."
24
+ uri = URI.parse(url)
25
+ response = Net::HTTP.get_response(uri)
26
+
27
+ if response.is_a?(Net::HTTPSuccess)
28
+ File.binwrite(dest, response.body)
29
+ puts "Updated \#{dest} (\#{response.body.bytesize} bytes)"
30
+ else
31
+ abort "Failed to download: HTTP \#{response.code}"
32
+ end
33
+ end
34
+ end
data/grammars/biblio.rng CHANGED
@@ -2015,15 +2015,11 @@ provided that it is not the entire bibliographic item that is so related</a:docu
2015
2015
  <a:documentation>A version of the bibliographic item (within an edition). Can be used for drafts</a:documentation>
2016
2016
  <element name="version">
2017
2017
  <optional>
2018
- <ref name="revision-date">
2019
- <a:documentation>The date at which the current version of the bibliographic item was produced</a:documentation>
2020
- </ref>
2021
- </optional>
2022
- <optional>
2023
- <ref name="draft">
2024
- <a:documentation>The identifier for the current draft of the bibliographic item</a:documentation>
2025
- </ref>
2018
+ <attribute name="type">
2019
+ <a:documentation>Versioning scheme, in case of multiple versioning schemes</a:documentation>
2020
+ </attribute>
2026
2021
  </optional>
2022
+ <text/>
2027
2023
  </element>
2028
2024
  </define>
2029
2025
  <define name="vedition">
@@ -1,6 +1,7 @@
1
1
  module Relaton
2
2
  module Oasis
3
3
  class Bibdata < Item
4
+ model ItemData
4
5
  include Bib::BibdataShared
5
6
  end
6
7
  end
@@ -1,6 +1,7 @@
1
1
  module Relaton
2
2
  module Oasis
3
3
  class Bibitem < Item
4
+ model ItemData
4
5
  include Bib::BibitemShared
5
6
  end
6
7
  end
@@ -3,7 +3,6 @@ require_relative "doctype"
3
3
  module Relaton
4
4
  module Oasis
5
5
  class Ext < Bib::Ext
6
- attribute :schema_version, method: :get_schema_version
7
6
  attribute :doctype, Doctype
8
7
  attribute :technology_area, :string, collection: true, values: %w[
9
8
  Cloud Content-Technologies Cybersecurity e-Business eGov/Legal Emergency-Management
@@ -11,13 +10,10 @@ module Relaton
11
10
  Privacy/Identity Security SOA Web-Services Software-Development Virtualization
12
11
  ]
13
12
 
14
- xml do
15
- map_element "technology-area", to: :technology_area
16
- end
13
+ xml { map_element "technology-area", to: :technology_area }
14
+ key_value { map "technology_area", to: :technology_area }
17
15
 
18
- def get_schema_version
19
- Relaton.schema_versions["relaton-model-oasis"]
20
- end
16
+ def get_schema_version = Relaton.schema_versions["relaton-model-oasis"]
21
17
  end
22
18
  end
23
19
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Relaton
4
4
  module Oasis
5
- VERSION = "2.0.0"
5
+ VERSION = "2.1.0"
6
6
  end
7
7
  end
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
33
33
 
34
34
  spec.add_dependency "mechanize", "~> 2.10"
35
35
  spec.add_dependency "multi_json", "~> 1.15.0"
36
- spec.add_dependency "relaton-bib", "~> 2.0.0"
36
+ spec.add_dependency "relaton-bib", "~> 2.1.0"
37
37
  spec.add_dependency "relaton-core", "~> 0.0.13"
38
38
  spec.add_dependency "relaton-index", "~> 0.2.0"
39
39
 
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-oasis
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
+ autorequire:
8
9
  bindir: exe
9
10
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2026-05-04 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: mechanize
@@ -43,14 +44,14 @@ dependencies:
43
44
  requirements:
44
45
  - - "~>"
45
46
  - !ruby/object:Gem::Version
46
- version: 2.0.0
47
+ version: 2.1.0
47
48
  type: :runtime
48
49
  prerelease: false
49
50
  version_requirements: !ruby/object:Gem::Requirement
50
51
  requirements:
51
52
  - - "~>"
52
53
  - !ruby/object:Gem::Version
53
- version: 2.0.0
54
+ version: 2.1.0
54
55
  - !ruby/object:Gem::Dependency
55
56
  name: relaton-core
56
57
  requirement: !ruby/object:Gem::Requirement
@@ -120,13 +121,14 @@ files:
120
121
  - lib/relaton/oasis/processor.rb
121
122
  - lib/relaton/oasis/util.rb
122
123
  - lib/relaton/oasis/version.rb
123
- - relaton_oasis.gemspec
124
+ - relaton-oasis.gemspec
124
125
  homepage: https://github.com/metanorma/relaton-oasis
125
126
  licenses:
126
127
  - BSD-2-Clause
127
128
  metadata:
128
129
  homepage_uri: https://github.com/metanorma/relaton-oasis
129
130
  source_code_uri: https://github.com/metanorma/relaton-oasis
131
+ post_install_message:
130
132
  rdoc_options: []
131
133
  require_paths:
132
134
  - lib
@@ -141,7 +143,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
143
  - !ruby/object:Gem::Version
142
144
  version: '0'
143
145
  requirements: []
144
- rubygems_version: 3.6.9
146
+ rubygems_version: 3.5.22
147
+ signing_key:
145
148
  specification_version: 4
146
149
  summary: 'Relaton::Oasis: retrieve OASIS Standards for bibliographic use using the
147
150
  BibliographicItem model'