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 +4 -4
- data/CLAUDE.md +13 -0
- data/Gemfile +1 -1
- data/README.adoc +2 -0
- data/Rakefile +22 -0
- data/grammars/biblio.rng +4 -8
- data/lib/relaton/iana/bibdata.rb +1 -0
- data/lib/relaton/iana/bibitem.rb +1 -0
- data/lib/relaton/iana/version.rb +1 -1
- data/{relaton_iana.gemspec → relaton-iana.gemspec} +1 -1
- metadata +10 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4c74f55e879ba63e1c5131568d467c34c4e4b4efdd0b307d8a1e35d8c35c9f1c
|
|
4
|
+
data.tar.gz: 9e3ef9b3d93bd500d10cb330f4fea6cfba8073304f14ac9d45f10c4bd8397599
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
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
|
-
<
|
|
2019
|
-
<a:documentation>
|
|
2020
|
-
</
|
|
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">
|
data/lib/relaton/iana/bibdata.rb
CHANGED
data/lib/relaton/iana/bibitem.rb
CHANGED
data/lib/relaton/iana/version.rb
CHANGED
|
@@ -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.
|
|
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.
|
|
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:
|
|
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.
|
|
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.
|
|
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
|
-
-
|
|
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.
|
|
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: []
|