relaton-ogc 2.0.0.pre.alpha.3 → 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 +4 -0
- data/Gemfile +1 -0
- data/README.adoc +2 -0
- data/Rakefile +22 -0
- data/grammars/biblio.rng +4 -8
- data/lib/relaton/ogc/bibdata.rb +1 -0
- data/lib/relaton/ogc/bibitem.rb +1 -0
- data/lib/relaton/ogc/ext.rb +1 -4
- data/lib/relaton/ogc/version.rb +1 -1
- data/{relaton_ogc.gemspec → relaton-ogc.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: 8d5137dff8146c7b65f0a3ce3f946270199c3fa1e2633d70ab10780ffd87cdb7
|
|
4
|
+
data.tar.gz: 9a88b928e3120a545b7e85f6faf45092dc553590b4c2fc0dae453f273b129e89
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 26a41990c082ac497ba2c03e609893180c07f44a8130461729610428330ac9e9fc2a4e31212607d10c3233d3d9297b2981be60d7363f984258d9d359f3f67020
|
|
7
|
+
data.tar.gz: 17dcd50eb7a45bd79e426f513497f3618a7f0834c0bb4bd9576e8a3e36ca6629d29ef03cc3bee7ed3a1cf49d7b8dae6b07b3f89b5dc08e6eb2bea9a4c9e07161
|
data/CLAUDE.md
CHANGED
|
@@ -106,3 +106,7 @@ RuboCop inherits from the [Ribose OSS style guide](https://github.com/riboseinc/
|
|
|
106
106
|
## CI
|
|
107
107
|
|
|
108
108
|
GitHub Actions workflows in `.github/workflows/` are auto-generated by Cimas — avoid manual edits. `rake.yml` runs tests on push/PR; `release.yml` handles gem publishing.
|
|
109
|
+
|
|
110
|
+
## Testing
|
|
111
|
+
|
|
112
|
+
- **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-ogc.
|
data/Gemfile
CHANGED
data/README.adoc
CHANGED
|
@@ -146,6 +146,8 @@ Relaton::Ogc uses the relaton-logger gem for logging. By default, it logs to STD
|
|
|
146
146
|
|
|
147
147
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
148
148
|
|
|
149
|
+
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-ogc[relaton-data-ogc] repository.
|
|
150
|
+
|
|
149
151
|
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).
|
|
150
152
|
|
|
151
153
|
== 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 OGC index fixture from relaton-data-ogc"
|
|
10
|
+
task :update_index do
|
|
11
|
+
require "net/http"
|
|
12
|
+
require "uri"
|
|
13
|
+
|
|
14
|
+
url = "https://raw.githubusercontent.com/relaton/relaton-data-ogc/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/ogc/bibdata.rb
CHANGED
data/lib/relaton/ogc/bibitem.rb
CHANGED
data/lib/relaton/ogc/ext.rb
CHANGED
|
@@ -3,16 +3,13 @@ require_relative "doctype"
|
|
|
3
3
|
module Relaton
|
|
4
4
|
module Ogc
|
|
5
5
|
class Ext < Bib::Ext
|
|
6
|
-
attribute :schema_version, method: :get_schema_version
|
|
7
6
|
attribute :doctype, Doctype
|
|
8
7
|
attribute :subdoctype, :string, values: %w[
|
|
9
8
|
conceptual-model conceptual-model-and-encoding conceptual-model-and-implementation
|
|
10
9
|
encoding extension implementation profile profile-with-extension general
|
|
11
10
|
]
|
|
12
11
|
|
|
13
|
-
def get_schema_version
|
|
14
|
-
Relaton.schema_versions["relaton-model-ogc"]
|
|
15
|
-
end
|
|
12
|
+
def get_schema_version = Relaton.schema_versions["relaton-model-ogc"]
|
|
16
13
|
end
|
|
17
14
|
end
|
|
18
15
|
end
|
data/lib/relaton/ogc/version.rb
CHANGED
|
@@ -28,5 +28,5 @@ Gem::Specification.new do |spec|
|
|
|
28
28
|
spec.add_dependency "faraday", "~> 2.7"
|
|
29
29
|
spec.add_dependency "relaton-core", "~> 0.0.13"
|
|
30
30
|
spec.add_dependency "relaton-index", "~> 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-ogc
|
|
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
|
|
@@ -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
|
description: 'Relaton::Ogc: retrieve OGC Standards for bibliographic use using the
|
|
69
70
|
OgcBibliographicItem model'
|
|
70
71
|
email:
|
|
@@ -109,11 +110,12 @@ files:
|
|
|
109
110
|
- lib/relaton/ogc/scraper.rb
|
|
110
111
|
- lib/relaton/ogc/util.rb
|
|
111
112
|
- lib/relaton/ogc/version.rb
|
|
112
|
-
-
|
|
113
|
+
- relaton-ogc.gemspec
|
|
113
114
|
homepage: https://github.com/relaton/relaton-ogc
|
|
114
115
|
licenses:
|
|
115
116
|
- BSD-2-Clause
|
|
116
117
|
metadata: {}
|
|
118
|
+
post_install_message:
|
|
117
119
|
rdoc_options: []
|
|
118
120
|
require_paths:
|
|
119
121
|
- lib
|
|
@@ -128,7 +130,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
128
130
|
- !ruby/object:Gem::Version
|
|
129
131
|
version: '0'
|
|
130
132
|
requirements: []
|
|
131
|
-
rubygems_version: 3.
|
|
133
|
+
rubygems_version: 3.5.22
|
|
134
|
+
signing_key:
|
|
132
135
|
specification_version: 4
|
|
133
136
|
summary: 'Relaton::Ogc: retrieve OGC Standards for bibliographic use using the OgcBibliographicItem
|
|
134
137
|
model'
|