relaton-iana 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: 5972645e4b8b369a457e767eb33784d37cb4dc3bf719882b3d3ce5ee4ece0e83
4
- data.tar.gz: d42a18936d47cba4e64e894331bb76d2801c896fc3127eafea00c26fe9130071
3
+ metadata.gz: 4c74f55e879ba63e1c5131568d467c34c4e4b4efdd0b307d8a1e35d8c35c9f1c
4
+ data.tar.gz: 9e3ef9b3d93bd500d10cb330f4fea6cfba8073304f14ac9d45f10c4bd8397599
5
5
  SHA512:
6
- metadata.gz: f8d91741246eec851bbcd405529bc275f5bb812afd72b68f03e16c74b548f105c357c137d4c55256af94f2581dc4ed680b1b32fd50a04fcf6f3c0117f3a2b0a7
7
- data.tar.gz: 6169d4f472bc99c0e402dc3c264373713d19bf2462c003c5d89b70d20f6c793dda93d655ad8884f4bf6932f37d5ebe2cffd16f51f99b121d4f39ee4fdd6b8eb4
6
+ metadata.gz: 1ca300253c81004cdf1b7886181e104f33e6c533bfcdb5667136537d6d1c3e5b35a193b6a4bd4db689b85d77d42ceaf0a4935a25aa2aceb8ec3438e80802cae4
7
+ data.tar.gz: 0b16e939c675af3636dfdf0a25b5a4a254238b3692371003b8e28c1cfa034918a94e052f4bdfcbcb1defcc547cad5910465efc1fc61634c09121981e2972e2fe
data/CLAUDE.md ADDED
@@ -0,0 +1,13 @@
1
+ # CLAUDE.md
2
+
3
+ ## Development
4
+
5
+ - `bundle install` — install dependencies
6
+ - `bundle exec rake spec` — run tests
7
+ - `bundle exec rubocop` — lint
8
+
9
+ ## Testing
10
+
11
+ - **Framework:** RSpec with VCR cassettes and WebMock
12
+ - **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-iana.
13
+ - **VCR cassettes:** `spec/vcr_cassettes/` — index download requests are ignored by VCR (handled by fixture).
data/Gemfile CHANGED
@@ -6,9 +6,9 @@ source "https://rubygems.org"
6
6
  gemspec
7
7
 
8
8
  gem "rake", "~> 13.0"
9
-
10
9
  gem "rspec", "~> 3.0"
11
10
 
11
+
12
12
  gem "equivalent-xml", "~> 0.6"
13
13
  gem "rubocop", "~> 1.7"
14
14
  gem "rubocop-performance"
data/README.adoc CHANGED
@@ -119,6 +119,8 @@ Relaton::Iana uses the relaton-logger gem for logging. By default, it logs to ST
119
119
 
120
120
  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.
121
121
 
122
+ 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-iana[relaton-data-iana] repository.
123
+
122
124
  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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
123
125
 
124
126
  == 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 IANA index fixture from relaton-data-iana"
16
+ task :update_index do
17
+ require "net/http"
18
+ require "uri"
19
+
20
+ url = "https://raw.githubusercontent.com/relaton/relaton-data-iana/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 Iana
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 Iana
3
3
  class Bibitem < Item
4
+ model ItemData
4
5
  include Bib::BibitemShared
5
6
  end
6
7
  end
@@ -1,5 +1,5 @@
1
1
  module Relaton
2
2
  module Iana
3
- VERSION = "2.0.0".freeze
3
+ VERSION = "2.1.0".freeze
4
4
  end
5
5
  end
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
31
31
  spec.require_paths = ["lib"]
32
32
 
33
33
  spec.add_dependency "faraday", "~> 2.7.0"
34
- spec.add_dependency "relaton-bib", "~> 2.0.0"
34
+ spec.add_dependency "relaton-bib", "~> 2.1.0"
35
35
  spec.add_dependency "relaton-core", "~> 0.0.13"
36
36
  spec.add_dependency "relaton-index", "~> 0.2.0"
37
37
 
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-iana
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: faraday
@@ -29,14 +30,14 @@ dependencies:
29
30
  requirements:
30
31
  - - "~>"
31
32
  - !ruby/object:Gem::Version
32
- version: 2.0.0
33
+ version: 2.1.0
33
34
  type: :runtime
34
35
  prerelease: false
35
36
  version_requirements: !ruby/object:Gem::Requirement
36
37
  requirements:
37
38
  - - "~>"
38
39
  - !ruby/object:Gem::Version
39
- version: 2.0.0
40
+ version: 2.1.0
40
41
  - !ruby/object:Gem::Dependency
41
42
  name: relaton-core
42
43
  requirement: !ruby/object:Gem::Requirement
@@ -77,6 +78,7 @@ files:
77
78
  - ".gitignore"
78
79
  - ".rspec"
79
80
  - ".rubocop.yml"
81
+ - CLAUDE.md
80
82
  - Gemfile
81
83
  - LICENSE.txt
82
84
  - README.adoc
@@ -100,12 +102,13 @@ files:
100
102
  - lib/relaton/iana/processor.rb
101
103
  - lib/relaton/iana/util.rb
102
104
  - lib/relaton/iana/version.rb
103
- - relaton_iana.gemspec
105
+ - relaton-iana.gemspec
104
106
  homepage: https://github.com/relaton/relaton-iana
105
107
  licenses:
106
108
  - BSD-2-Clause
107
109
  metadata:
108
110
  homepage_uri: https://github.com/relaton/relaton-iana
111
+ post_install_message:
109
112
  rdoc_options: []
110
113
  require_paths:
111
114
  - lib
@@ -120,7 +123,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
123
  - !ruby/object:Gem::Version
121
124
  version: '0'
122
125
  requirements: []
123
- rubygems_version: 3.6.9
126
+ rubygems_version: 3.5.22
127
+ signing_key:
124
128
  specification_version: 4
125
129
  summary: 'Relaton::Iana: Ruby XMLDOC impementation.'
126
130
  test_files: []