relaton-cie 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/cie/bibdata.rb +1 -0
- data/lib/relaton/cie/bibitem.rb +1 -0
- data/lib/relaton/cie/ext.rb +1 -5
- data/lib/relaton/cie/version.rb +1 -1
- data/{relaton_cie.gemspec → relaton-cie.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: 6dbb109ece2a9d747bbec32bb76e87fb502549fb7559ec3b751c264c8788387b
|
|
4
|
+
data.tar.gz: 7bc24ddac6a905c4783f7f1350de7c697b2fb77052a621384320444b641c5fcf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1aedb30acab2edc9b4baa181748dbf87cfc9c368ca14f5dd49783688f0752704328c37de6cf67c4026f7ec26aa40a666b6f08b6617855d959efe95e0a04b7807
|
|
7
|
+
data.tar.gz: b3003609e4a4a68b8a6a5dd43449959201918b120b92d7ea29b07c23bddf9821297b0e3053ee64648f4c9491affaf95d7b4549bb6c37030c0adb24ef39e982e1
|
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-cie.
|
|
13
|
+
- **VCR cassettes:** `spec/vcr_cassettes/` — index download requests are ignored by VCR (handled by fixture).
|
data/Gemfile
CHANGED
data/README.adoc
CHANGED
|
@@ -133,6 +133,8 @@ RelatonCie uses the relaton-logger gem for logging. By default, it logs to STDOU
|
|
|
133
133
|
|
|
134
134
|
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.
|
|
135
135
|
|
|
136
|
+
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-cie[relaton-data-cie] repository.
|
|
137
|
+
|
|
136
138
|
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).
|
|
137
139
|
|
|
138
140
|
== 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 CIE index fixture from relaton-data-cie"
|
|
10
|
+
task :update_index do
|
|
11
|
+
require "net/http"
|
|
12
|
+
require "uri"
|
|
13
|
+
|
|
14
|
+
url = "https://raw.githubusercontent.com/relaton/relaton-data-cie/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/cie/bibdata.rb
CHANGED
data/lib/relaton/cie/bibitem.rb
CHANGED
data/lib/relaton/cie/ext.rb
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
module Relaton
|
|
2
2
|
module Cie
|
|
3
3
|
class Ext < Bib::Ext
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def get_shema_version
|
|
7
|
-
Relaton.schema_versions["relaton-model-cie"]
|
|
8
|
-
end
|
|
4
|
+
def get_schema_version = Relaton.schema_versions["relaton-model-cie"]
|
|
9
5
|
end
|
|
10
6
|
end
|
|
11
7
|
end
|
data/lib/relaton/cie/version.rb
CHANGED
|
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
|
|
|
31
31
|
|
|
32
32
|
spec.add_dependency "mechanize", "~> 2.10"
|
|
33
33
|
spec.add_dependency "parslet", "~> 2.0.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.12"
|
|
36
36
|
spec.add_dependency "relaton-index", "~> 0.2.0"
|
|
37
37
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: relaton-cie
|
|
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: mechanize
|
|
@@ -43,14 +44,14 @@ dependencies:
|
|
|
43
44
|
requirements:
|
|
44
45
|
- - "~>"
|
|
45
46
|
- !ruby/object:Gem::Version
|
|
46
|
-
version: 2.
|
|
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.
|
|
54
|
+
version: 2.1.0
|
|
54
55
|
- !ruby/object:Gem::Dependency
|
|
55
56
|
name: relaton-core
|
|
56
57
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -93,6 +94,7 @@ files:
|
|
|
93
94
|
- ".gitignore"
|
|
94
95
|
- ".rspec"
|
|
95
96
|
- ".rubocop.yml"
|
|
97
|
+
- CLAUDE.md
|
|
96
98
|
- Gemfile
|
|
97
99
|
- LICENSE.txt
|
|
98
100
|
- README.adoc
|
|
@@ -117,12 +119,13 @@ files:
|
|
|
117
119
|
- lib/relaton/cie/scrapper.rb
|
|
118
120
|
- lib/relaton/cie/util.rb
|
|
119
121
|
- lib/relaton/cie/version.rb
|
|
120
|
-
-
|
|
122
|
+
- relaton-cie.gemspec
|
|
121
123
|
homepage: https://github.com/metanorma/relaton-cie
|
|
122
124
|
licenses:
|
|
123
125
|
- BSD-2-Clause
|
|
124
126
|
metadata:
|
|
125
127
|
homepage_uri: https://github.com/metanorma/relaton-cie
|
|
128
|
+
post_install_message:
|
|
126
129
|
rdoc_options: []
|
|
127
130
|
require_paths:
|
|
128
131
|
- lib
|
|
@@ -137,7 +140,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
137
140
|
- !ruby/object:Gem::Version
|
|
138
141
|
version: '0'
|
|
139
142
|
requirements: []
|
|
140
|
-
rubygems_version: 3.
|
|
143
|
+
rubygems_version: 3.5.22
|
|
144
|
+
signing_key:
|
|
141
145
|
specification_version: 4
|
|
142
146
|
summary: 'Relaton::Cie: retrieve CIE Standards for bibliographic use using the BibliographicItem
|
|
143
147
|
model.'
|