relaton-cie 2.0.0 → 2.1.1

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: 1db93e1afbf8ea3b5feb210c2cfc1abbe681616fa80500cb703ad77f0c166306
4
- data.tar.gz: 25373576c6ea1f13af3bb86334db91a1f7b91bf43416a9fc9be806a514ea1d05
3
+ metadata.gz: 4cd9e78a6899ffa70d902a2b00eccf5dcce1d2dc15fffe8925dc9b5dc84650af
4
+ data.tar.gz: 31cb613d144a7aec4c7f100c116dcdcab4d23e3773c362a4e5129cb35f3dbdef
5
5
  SHA512:
6
- metadata.gz: b098be04623ffac73ec165e3ae12c722a72b1810a7cfbae0c5c4ac40435dcc253dee0d57f24b675cbd96920e2b4285782310972edd6ff1e658f184eadfb277ed
7
- data.tar.gz: 6efe779368514f949438320c929b272164212cd9a9576efede2d623ce7c05c086e54688c32469d0aee64f8e443c91ed6b72666d813010cf42049a51bff305211
6
+ metadata.gz: 59e51836382654d2f186f8f6aaf68a7e74f222d0cf4f1e20894070da6822e0a59766e237754412bce1383530f4a6a730da519fd8a73a47c4a985ba7a8d0704a1
7
+ data.tar.gz: 72460dcabce2101301e1b55347ca762f88b003c66d4fbd246adba213030fec121def7550f08e132891790885aa21fbddcba1c7caa5f2efbe0c1769c0b1600630
@@ -4,7 +4,7 @@ name: rake
4
4
 
5
5
  on:
6
6
  push:
7
- branches: [ master, main ]
7
+ branches: [ master, main, lutaml-integration ]
8
8
  tags: [ v* ]
9
9
  pull_request:
10
10
 
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
@@ -3,6 +3,7 @@ source "https://rubygems.org"
3
3
  # Specify your gem's dependencies in relaton_cie.gemspec
4
4
  gemspec
5
5
 
6
+
6
7
  gem "equivalent-xml", "~> 0.6"
7
8
  gem "pry-byebug"
8
9
  gem "rake", "~> 13.0"
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/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
- <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 Cie
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 Cie
3
3
  class Bibitem < Item
4
+ model ItemData
4
5
  include Bib::BibitemShared
5
6
  end
6
7
  end
@@ -1,11 +1,7 @@
1
1
  module Relaton
2
2
  module Cie
3
3
  class Ext < Bib::Ext
4
- attribute :schema_version, method: :get_shema_version
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
@@ -3,7 +3,7 @@ require "mechanize"
3
3
  module Relaton
4
4
  module Cie
5
5
  module Scrapper
6
- ENDPOINT = "https://raw.githubusercontent.com/relaton/relaton-data-cie/refs/heads/data-v2/".freeze
6
+ ENDPOINT = "https://raw.githubusercontent.com/relaton/relaton-data-cie/refs/heads/v2/".freeze
7
7
 
8
8
  class << self
9
9
  # @param code [String]
@@ -1,5 +1,5 @@
1
1
  module Relaton
2
2
  module Cie
3
- VERSION = "2.0.0".freeze
3
+ VERSION = "2.1.1".freeze
4
4
  end
5
5
  end
@@ -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.0.0"
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.0.0
4
+ version: 2.1.1
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-12 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.0.0
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.0.0
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
- - relaton_cie.gemspec
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.6.9
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.'