relaton-ieee 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 -0
- data/README.adoc +2 -0
- data/Rakefile +22 -0
- data/grammars/biblio.rng +4 -8
- data/lib/relaton/ieee/bibdata.rb +1 -0
- data/lib/relaton/ieee/bibitem.rb +1 -0
- data/lib/relaton/ieee/ext.rb +10 -11
- data/lib/relaton/ieee/version.rb +1 -1
- data/{relaton_ieee.gemspec → relaton-ieee.gemspec} +2 -2
- metadata +12 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7ab2d9d62bb8cac0ba126977f4a0e3740f83ceddad8db92a47a06452205bc8c1
|
|
4
|
+
data.tar.gz: f3c903c2a699d790b5b9f39d2fb2d6d1af2d9511c408a714585a7b1663f83c64
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '09c6279ece32a2b5cad7a057838f40254282bcf7f91b0fde8e068b706628902199878b128309b89a43135c65a5a3bc444103d0d0372f672f76997d8b52b3c1c9'
|
|
7
|
+
data.tar.gz: 26bb0e419b91da5bde7253041215ae520404516126e6eab6736e682fa67a3c75bba207bd091c520d01dffa7e1bbbe6e7352ed11548b7d5d3fa706366181e1043
|
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-ieee.
|
|
13
|
+
- **VCR cassettes:** `spec/vcr_cassettes/` — index download requests are ignored by VCR (handled by fixture).
|
data/Gemfile
CHANGED
data/README.adoc
CHANGED
|
@@ -135,6 +135,8 @@ RelatonIeee uses the relaton-logger gem for logging. By default, it logs to STDO
|
|
|
135
135
|
|
|
136
136
|
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.
|
|
137
137
|
|
|
138
|
+
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-ieee[relaton-data-ieee] repository.
|
|
139
|
+
|
|
138
140
|
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).
|
|
139
141
|
|
|
140
142
|
== Contributing
|
data/Rakefile
CHANGED
|
@@ -4,3 +4,25 @@ require "rspec/core/rake_task"
|
|
|
4
4
|
RSpec::Core::RakeTask.new(:spec)
|
|
5
5
|
|
|
6
6
|
task :default => :spec
|
|
7
|
+
|
|
8
|
+
namespace :spec do
|
|
9
|
+
desc "Download latest IEEE index fixture from relaton-data-ieee"
|
|
10
|
+
task :update_index do
|
|
11
|
+
require "net/http"
|
|
12
|
+
require "uri"
|
|
13
|
+
|
|
14
|
+
url = "https://raw.githubusercontent.com/relaton/relaton-data-ieee/data-v2/index-v1.zip"
|
|
15
|
+
dest = File.join(__dir__, "spec", "fixtures", "index-v1.zip")
|
|
16
|
+
|
|
17
|
+
puts "Downloading \#{url} ..."
|
|
18
|
+
uri = URI.parse(url)
|
|
19
|
+
response = Net::HTTP.get_response(uri)
|
|
20
|
+
|
|
21
|
+
if response.is_a?(Net::HTTPSuccess)
|
|
22
|
+
File.binwrite(dest, response.body)
|
|
23
|
+
puts "Updated \#{dest} (\#{response.body.bytesize} bytes)"
|
|
24
|
+
else
|
|
25
|
+
abort "Failed to download: HTTP \#{response.code}"
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
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/ieee/bibdata.rb
CHANGED
data/lib/relaton/ieee/bibitem.rb
CHANGED
data/lib/relaton/ieee/ext.rb
CHANGED
|
@@ -2,13 +2,10 @@ require_relative "doctype"
|
|
|
2
2
|
|
|
3
3
|
module Relaton
|
|
4
4
|
module Ieee
|
|
5
|
-
class Ext <
|
|
6
|
-
attribute :schema_version, method: :get_schema_version
|
|
5
|
+
class Ext < Bib::Ext
|
|
7
6
|
attribute :doctype, Doctype
|
|
8
7
|
attribute :subdoctype, :string, values: %w[amendment corrigendum erratum]
|
|
9
|
-
attribute :flavor, :string
|
|
10
8
|
attribute :trial_use, :boolean
|
|
11
|
-
attribute :ics, Bib::ICS, collection: true
|
|
12
9
|
attribute :standard_status, :string, values: %w[Inactive Active Superseded]
|
|
13
10
|
attribute :standard_modified, :string, values: %w[Draft Withdrawn Superseded Superseded Reserved Redline]
|
|
14
11
|
attribute :pubstatus, :string, values: %w[Active Inactive]
|
|
@@ -16,12 +13,7 @@ module Relaton
|
|
|
16
13
|
attribute :program, :string
|
|
17
14
|
|
|
18
15
|
xml do
|
|
19
|
-
map_attribute "schema-version", to: :schema_version
|
|
20
|
-
map_element "doctype", to: :doctype
|
|
21
|
-
map_element "subdoctype", to: :subdoctype
|
|
22
|
-
map_element "flavor", to: :flavor
|
|
23
16
|
map_element "trial-use", to: :trial_use
|
|
24
|
-
map_element "ics", to: :ics
|
|
25
17
|
map_element "standard_status", to: :standard_status
|
|
26
18
|
map_element "standard_modified", to: :standard_modified
|
|
27
19
|
map_element "pubstatus", to: :pubstatus
|
|
@@ -29,9 +21,16 @@ module Relaton
|
|
|
29
21
|
map_element "program", to: :program
|
|
30
22
|
end
|
|
31
23
|
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
key_value do
|
|
25
|
+
map_element "trial_use", to: :trial_use
|
|
26
|
+
map_element "standard_status", to: :standard_status
|
|
27
|
+
map_element "standard_modified", to: :standard_modified
|
|
28
|
+
map_element "pubstatus", to: :pubstatus
|
|
29
|
+
map_element "holdstatus", to: :holdstatus
|
|
30
|
+
map_element "program", to: :program
|
|
34
31
|
end
|
|
32
|
+
|
|
33
|
+
def get_schema_version = Relaton.schema_versions["relaton-model-ieee"]
|
|
35
34
|
end
|
|
36
35
|
end
|
|
37
36
|
end
|
data/lib/relaton/ieee/version.rb
CHANGED
|
@@ -32,9 +32,9 @@ Gem::Specification.new do |spec|
|
|
|
32
32
|
spec.require_paths = ["lib"]
|
|
33
33
|
|
|
34
34
|
spec.add_dependency "faraday", "~> 2.7.0"
|
|
35
|
-
spec.add_dependency "ieee-idams", "~> 0.
|
|
35
|
+
spec.add_dependency "ieee-idams", "~> 0.3.0"
|
|
36
36
|
spec.add_dependency "mini_portile2", "~> 2.8.0"
|
|
37
|
-
spec.add_dependency "relaton-bib", "~> 2.
|
|
37
|
+
spec.add_dependency "relaton-bib", "~> 2.1.0"
|
|
38
38
|
spec.add_dependency "relaton-core", "~> 0.0.13"
|
|
39
39
|
spec.add_dependency "relaton-index", "~> 0.2.0"
|
|
40
40
|
spec.add_dependency "rubyzip", "~> 2.3.0"
|
metadata
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: relaton-ieee
|
|
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: 0.
|
|
33
|
+
version: 0.3.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: 0.
|
|
40
|
+
version: 0.3.0
|
|
40
41
|
- !ruby/object:Gem::Dependency
|
|
41
42
|
name: mini_portile2
|
|
42
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -57,14 +58,14 @@ dependencies:
|
|
|
57
58
|
requirements:
|
|
58
59
|
- - "~>"
|
|
59
60
|
- !ruby/object:Gem::Version
|
|
60
|
-
version: 2.
|
|
61
|
+
version: 2.1.0
|
|
61
62
|
type: :runtime
|
|
62
63
|
prerelease: false
|
|
63
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
64
65
|
requirements:
|
|
65
66
|
- - "~>"
|
|
66
67
|
- !ruby/object:Gem::Version
|
|
67
|
-
version: 2.
|
|
68
|
+
version: 2.1.0
|
|
68
69
|
- !ruby/object:Gem::Dependency
|
|
69
70
|
name: relaton-core
|
|
70
71
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -120,6 +121,7 @@ files:
|
|
|
120
121
|
- ".gitignore"
|
|
121
122
|
- ".rspec"
|
|
122
123
|
- ".rubocop.yml"
|
|
124
|
+
- CLAUDE.md
|
|
123
125
|
- Gemfile
|
|
124
126
|
- LICENSE.txt
|
|
125
127
|
- README.adoc
|
|
@@ -152,13 +154,14 @@ files:
|
|
|
152
154
|
- lib/relaton/ieee/rawbib_id_parser.rb
|
|
153
155
|
- lib/relaton/ieee/util.rb
|
|
154
156
|
- lib/relaton/ieee/version.rb
|
|
155
|
-
-
|
|
157
|
+
- relaton-ieee.gemspec
|
|
156
158
|
homepage: https://github.com/relaton/relaton-ieee
|
|
157
159
|
licenses:
|
|
158
160
|
- BSD-2-Clause
|
|
159
161
|
metadata:
|
|
160
162
|
homepage_uri: https://github.com/relaton/relaton-ieee
|
|
161
163
|
source_code_uri: https://github.com/relaton/relaton-ieee
|
|
164
|
+
post_install_message:
|
|
162
165
|
rdoc_options: []
|
|
163
166
|
require_paths:
|
|
164
167
|
- lib
|
|
@@ -173,7 +176,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
173
176
|
- !ruby/object:Gem::Version
|
|
174
177
|
version: '0'
|
|
175
178
|
requirements: []
|
|
176
|
-
rubygems_version: 3.
|
|
179
|
+
rubygems_version: 3.5.22
|
|
180
|
+
signing_key:
|
|
177
181
|
specification_version: 4
|
|
178
182
|
summary: 'Relaton::Ieee: retrieve IEEE Standards for bibliographic use using the IeeeBibliographicItem
|
|
179
183
|
model'
|