relaton-calconnect 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/calconnect/model/bibdata.rb +1 -0
- data/lib/relaton/calconnect/model/bibitem.rb +1 -0
- data/lib/relaton/calconnect/model/ext.rb +1 -6
- data/lib/relaton/calconnect/version.rb +1 -1
- data/{relaton_calconnect.gemspec → relaton-calconnect.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: 67e7ef0d03aee629fefa14e00cd047e595dfa2fdf108a65498597a7d3f304728
|
|
4
|
+
data.tar.gz: 0c4339378b9e115fabd5ba7ac886079f77b05ca11ed5b6bf24a387b8bb1f94d4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 54db14fc4d30c8e9b326702ee504b5d6808fadefbcb6865f67568af02d24f742e5c7e687a42e8c0eebeb66186946b9d58d87c4f20f260bedcd30971575b70ddf
|
|
7
|
+
data.tar.gz: 110aa774e87a5c8b225bde02303894162f2e895d884e2ed5926ee31bee5f6f098a62594d98e05b943a107c04dd69024cd982d137204758ea7b39be88b27ed993
|
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-calconnect.
|
|
13
|
+
- **VCR cassettes:** `spec/vcr_cassettes/` — index download requests are ignored by VCR (handled by fixture).
|
data/Gemfile
CHANGED
data/README.adoc
CHANGED
|
@@ -138,6 +138,8 @@ RelatonCalconnect uses the relaton-logger gem for logging. By default, it logs t
|
|
|
138
138
|
|
|
139
139
|
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.
|
|
140
140
|
|
|
141
|
+
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-calconnect[relaton-data-calconnect] repository.
|
|
142
|
+
|
|
141
143
|
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).
|
|
142
144
|
|
|
143
145
|
== 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 CALCONNECT index fixture from relaton-data-calconnect"
|
|
10
|
+
task :update_index do
|
|
11
|
+
require "net/http"
|
|
12
|
+
require "uri"
|
|
13
|
+
|
|
14
|
+
url = "https://raw.githubusercontent.com/relaton/relaton-data-calconnect/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">
|
|
@@ -3,14 +3,9 @@ require_relative "doctype"
|
|
|
3
3
|
module Relaton
|
|
4
4
|
module Calconnect
|
|
5
5
|
class Ext < Bib::Ext
|
|
6
|
-
attribute :schema_version, method: :get_schema_version
|
|
7
6
|
attribute :doctype, Doctype
|
|
8
|
-
attribute :subdoctype, :string
|
|
9
|
-
attribute :flavor, :string
|
|
10
7
|
|
|
11
|
-
def get_schema_version
|
|
12
|
-
Relaton.schema_versions["relaton-model-cc"]
|
|
13
|
-
end
|
|
8
|
+
def get_schema_version = Relaton.schema_versions["relaton-model-cc"]
|
|
14
9
|
end
|
|
15
10
|
end
|
|
16
11
|
end
|
|
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
|
27
27
|
spec.required_ruby_version = Gem::Requirement.new(">= 3.2.0")
|
|
28
28
|
|
|
29
29
|
spec.add_dependency "faraday", "~> 2.7.0"
|
|
30
|
-
spec.add_dependency "relaton-bib", "~> 2.
|
|
30
|
+
spec.add_dependency "relaton-bib", "~> 2.1.0"
|
|
31
31
|
spec.add_dependency "relaton-core", "~> 0.0.12"
|
|
32
32
|
spec.add_dependency "addressable", "~> 2.8"
|
|
33
33
|
spec.add_dependency "relaton-index", "~> 0.2.0"
|
metadata
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: relaton-calconnect
|
|
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
|
|
@@ -92,6 +93,7 @@ files:
|
|
|
92
93
|
- ".gitignore"
|
|
93
94
|
- ".rspec"
|
|
94
95
|
- ".rubocop.yml"
|
|
96
|
+
- CLAUDE.md
|
|
95
97
|
- Gemfile
|
|
96
98
|
- LICENSE.txt
|
|
97
99
|
- README.adoc
|
|
@@ -119,11 +121,12 @@ files:
|
|
|
119
121
|
- lib/relaton/calconnect/scraper.rb
|
|
120
122
|
- lib/relaton/calconnect/util.rb
|
|
121
123
|
- lib/relaton/calconnect/version.rb
|
|
122
|
-
-
|
|
124
|
+
- relaton-calconnect.gemspec
|
|
123
125
|
homepage: https://github.com/relaton/relaton-calconnect
|
|
124
126
|
licenses:
|
|
125
127
|
- BSD-2-Clause
|
|
126
128
|
metadata: {}
|
|
129
|
+
post_install_message:
|
|
127
130
|
rdoc_options: []
|
|
128
131
|
require_paths:
|
|
129
132
|
- lib
|
|
@@ -138,7 +141,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
138
141
|
- !ruby/object:Gem::Version
|
|
139
142
|
version: '0'
|
|
140
143
|
requirements: []
|
|
141
|
-
rubygems_version: 3.
|
|
144
|
+
rubygems_version: 3.5.22
|
|
145
|
+
signing_key:
|
|
142
146
|
specification_version: 4
|
|
143
147
|
summary: 'Relaton::Calconnect: retrieve CC Standards for bibliographic use using the
|
|
144
148
|
BibliographicItem model'
|