relaton-plateau 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 +4 -4
- data/.github/workflows/rake.yml +1 -1
- data/CLAUDE.md +1 -0
- data/Gemfile +1 -0
- data/README.adoc +2 -0
- data/Rakefile +22 -0
- data/grammars/biblio.rng +4 -8
- data/lib/relaton/plateau/bibdata.rb +1 -0
- data/lib/relaton/plateau/bibitem.rb +1 -0
- data/lib/relaton/plateau/ext.rb +5 -3
- data/lib/relaton/plateau/hit_collection.rb +1 -1
- data/lib/relaton/plateau/version.rb +1 -1
- data/{relaton_plateau.gemspec → relaton-plateau.gemspec} +1 -1
- metadata +9 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 943e722e1321a4d4597d868cff0ffbcd2eacfea04ebe2e138e5de9be6564c7fc
|
|
4
|
+
data.tar.gz: 82ab90a1fa9adc17a373c1aab5b3f681c135026b657fabe40a87c295fe66d5d9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c5d3c05db34f6bc6f8e6048be7709bb920658fe07c52ecccd923c34764384f97e5f05f57b9e36bebd53881c2db010b87248c5fcbb33d254fb9aa5103c3a6fd5c
|
|
7
|
+
data.tar.gz: 7c89d78a1da33a5a3403555d1541317063f771fc32ec7386c56bb3d79d87050a6ac846988f7c23c801abc8c94e78c3636eff96b3c0b728cfdfd348d0fbacb160
|
data/.github/workflows/rake.yml
CHANGED
data/CLAUDE.md
CHANGED
|
@@ -64,6 +64,7 @@ RNG grammar files in `grammars/` define the XML schema. Tests validate fixtures
|
|
|
64
64
|
|
|
65
65
|
## Testing
|
|
66
66
|
|
|
67
|
+
- **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-plateau.
|
|
67
68
|
- RSpec with `expect` syntax (no monkey-patching)
|
|
68
69
|
- VCR cassettes record HTTP interactions (in `spec/fixtures/vcr_cassettes/`)
|
|
69
70
|
- `equivalent-xml` for XML comparison assertions
|
data/Gemfile
CHANGED
data/README.adoc
CHANGED
|
@@ -153,6 +153,8 @@ RelatonPlateau uses https://github.com/relaton/relaton-logger[relaton-logger] fo
|
|
|
153
153
|
|
|
154
154
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
155
155
|
|
|
156
|
+
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-plateau[relaton-data-plateau] repository.
|
|
157
|
+
|
|
156
158
|
== Contributing
|
|
157
159
|
|
|
158
160
|
Bug reports and pull requests are welcome on GitHub at https://github.com/relaton/relaton-plateau
|
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 PLATEAU index fixture from relaton-data-plateau"
|
|
16
|
+
task :update_index do
|
|
17
|
+
require "net/http"
|
|
18
|
+
require "uri"
|
|
19
|
+
|
|
20
|
+
url = "https://raw.githubusercontent.com/relaton/relaton-data-plateau/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/plateau/ext.rb
CHANGED
|
@@ -3,7 +3,6 @@ require_relative "doctype"
|
|
|
3
3
|
module Relaton
|
|
4
4
|
module Plateau
|
|
5
5
|
class Ext < Bib::Ext
|
|
6
|
-
attribute :schema_version, method: :get_schema_version
|
|
7
6
|
attribute :doctype, Doctype
|
|
8
7
|
attribute :stagename, Iso::Stagename
|
|
9
8
|
attribute :filesize, :integer
|
|
@@ -13,9 +12,12 @@ module Relaton
|
|
|
13
12
|
map_element "filesize", to: :filesize
|
|
14
13
|
end
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
key_value do
|
|
16
|
+
map_element "stagename", to: :stagename
|
|
17
|
+
map_element "filesize", to: :filesize
|
|
18
18
|
end
|
|
19
|
+
|
|
20
|
+
def get_schema_version = Relaton.schema_versions["relaton-model-plateau"]
|
|
19
21
|
end
|
|
20
22
|
end
|
|
21
23
|
end
|
|
@@ -3,7 +3,7 @@ require_relative "hit"
|
|
|
3
3
|
module Relaton
|
|
4
4
|
module Plateau
|
|
5
5
|
class HitCollection < Relaton::Core::HitCollection
|
|
6
|
-
ENDPOINT = "https://raw.githubusercontent.com/relaton/relaton-data-plateau/
|
|
6
|
+
ENDPOINT = "https://raw.githubusercontent.com/relaton/relaton-data-plateau/v2/"
|
|
7
7
|
|
|
8
8
|
def find
|
|
9
9
|
@array = index.search do |row|
|
|
@@ -28,5 +28,5 @@ Gem::Specification.new do |spec|
|
|
|
28
28
|
spec.add_dependency "relaton-core", "~> 0.0.13"
|
|
29
29
|
spec.add_dependency "relaton-index", "~> 0.2.12"
|
|
30
30
|
spec.add_dependency "relaton-logger", "~> 0.2.0"
|
|
31
|
-
spec.add_dependency "relaton-iso", "~> 2.
|
|
31
|
+
spec.add_dependency "relaton-iso", "~> 2.1.0"
|
|
32
32
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: relaton-plateau
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
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:
|
|
11
|
+
date: 2026-05-12 00:00:00.000000000 Z
|
|
11
12
|
dependencies:
|
|
12
13
|
- !ruby/object:Gem::Dependency
|
|
13
14
|
name: base64
|
|
@@ -71,14 +72,14 @@ dependencies:
|
|
|
71
72
|
requirements:
|
|
72
73
|
- - "~>"
|
|
73
74
|
- !ruby/object:Gem::Version
|
|
74
|
-
version: 2.
|
|
75
|
+
version: 2.1.0
|
|
75
76
|
type: :runtime
|
|
76
77
|
prerelease: false
|
|
77
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
78
79
|
requirements:
|
|
79
80
|
- - "~>"
|
|
80
81
|
- !ruby/object:Gem::Version
|
|
81
|
-
version: 2.
|
|
82
|
+
version: 2.1.0
|
|
82
83
|
description: Retrieve Project PLATEAU bibliographic items.
|
|
83
84
|
email:
|
|
84
85
|
- open.source@ribose.com
|
|
@@ -120,12 +121,13 @@ files:
|
|
|
120
121
|
- lib/relaton/plateau/technical_report_parser.rb
|
|
121
122
|
- lib/relaton/plateau/util.rb
|
|
122
123
|
- lib/relaton/plateau/version.rb
|
|
123
|
-
-
|
|
124
|
+
- relaton-plateau.gemspec
|
|
124
125
|
- sig/relaton/plateau.rbs
|
|
125
126
|
homepage: https://github.com/relaton/relaton-plateau
|
|
126
127
|
licenses:
|
|
127
128
|
- BSD-2-Clause
|
|
128
129
|
metadata: {}
|
|
130
|
+
post_install_message:
|
|
129
131
|
rdoc_options: []
|
|
130
132
|
require_paths:
|
|
131
133
|
- lib
|
|
@@ -140,7 +142,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
140
142
|
- !ruby/object:Gem::Version
|
|
141
143
|
version: '0'
|
|
142
144
|
requirements: []
|
|
143
|
-
rubygems_version: 3.
|
|
145
|
+
rubygems_version: 3.5.22
|
|
146
|
+
signing_key:
|
|
144
147
|
specification_version: 4
|
|
145
148
|
summary: 'Relaton::Plateau: retrieve Project PLATEAU bibliographic items'
|
|
146
149
|
test_files: []
|