Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
d8427eb
feat: update dependencies to version 2.0.0.alpha.1 and improve gem sp…
andrew2net Mar 5, 2026
b199918
update flavor gems namespaces and data model
andrew2net Mar 11, 2026
bc1a6d6
feat: update Ruby version requirement to 3.2 and modify gem dependencies
andrew2net Mar 17, 2026
5f6ab3b
Update VCR cassettes
andrew2net Mar 17, 2026
733e81c
fix: correct string substitution for reference prefix handling
andrew2net Mar 18, 2026
c7a9de3
fix rubocop offences
andrew2net Mar 18, 2026
334dded
feat: update README, improve regex pattern in Db, and enhance tests f…
andrew2net Mar 19, 2026
3913215
Update VCRs
andrew2net Mar 19, 2026
481ee53
chore: update version to 2.0.0-alpha.2 and adjust dependencies in gem…
andrew2net Apr 3, 2026
eb7578d
feat: update VCR cassettes for ECMA-6, add new request and response data
andrew2net Apr 3, 2026
44e54b9
chore: update version to 2.0.0 and adjust dependencies in gemspec
andrew2net Apr 9, 2026
b07d8de
feat: add workflow_dispatch trigger to rake.yml and update VCR casset…
andrew2net Apr 9, 2026
a144f52
fix: format docid initialization for IEC reference in specs
andrew2net Apr 9, 2026
f4ea6c8
update VCRs
andrew2net Apr 9, 2026
fc13516
Update lutaml-model to v0.8.0 (#147)
andrew2net May 2, 2026
adbc4fe
Update VCR cassettes for relaton-bib 2.1.0 / lutaml-model 0.8.0
andrew2net May 4, 2026
d966aba
Bump intra-relaton constraints to ~> 2.1.0 and clean Gemfile GH refs …
andrew2net May 4, 2026
69207b7
Bump relaton to 2.1.0
invalid-email-address May 4, 2026
62f27fc
Trigger rake CI on lutaml-integration pushes
andrew2net May 4, 2026
8359284
Re-run rake CI against relaton-bipm 2.1.1
andrew2net May 5, 2026
514593a
Update VCR cassettes for ecma_6.yml with new request and response data
andrew2net May 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/rake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ name: rake

on:
push:
branches: [ master, main ]
branches: [ master, main, lutaml-integration ]
tags: [ v* ]
pull_request:
workflow_dispatch:

jobs:
rake:
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ plugins: rubocop-rails
inherit_from:
- https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
AllCops:
TargetRubyVersion: 3.1
TargetRubyVersion: 3.2
Rails:
Enabled: false
6 changes: 4 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Relaton is a Ruby gem that fetches, caches, and manages bibliographic references

### Plugin Registry Pattern

**Relaton::Registry** (singleton) auto-discovers and manages backend processor gems (relaton-iso, relaton-iec, relaton-ietf, etc.). Each processor implements the **Relaton::Processor** interface (`get`, `from_xml`, `hash_to_bib`, `prefix`, `defaultprefix`). The registry routes reference codes to the correct processor by matching prefixes (e.g., "ISO 19115" → `:relaton_iso`).
**Relaton::Registry** (singleton) auto-discovers and manages backend processor gems (relaton-iso, relaton-iec, relaton-ietf, etc.). Each processor implements the **Relaton::Processor** interface (`get`, `from_xml`, `from_yaml`, `grammar_hash`, `prefix`, `defaultprefix`). The registry routes reference codes to the correct processor by matching prefixes (e.g., "ISO 19115" → `:relaton_iso`).

### Db (lib/relaton/db.rb) — Main Public API

Expand All @@ -36,6 +36,8 @@ Relaton is a Ruby gem that fetches, caches, and manages bibliographic references
2. Handles combined references (`+` for derivedFrom, `,` for amendments) in `combine_doc`
3. Delegates to `check_bibliocache` which manages the dual-cache lookup and network fetch flow

`Relaton::Db#fetch_all(text, edition, year)` searches cached entries, filtering by text content (via `match_xml_text?`), edition, and/or year. Returns an array of deserialized bibliographic items from both local and global caches.

The dual-cache strategy uses a **global cache** (`~/.relaton/cache`) and an optional **local cache** (project-level). `check_bibliocache` checks local first, falls back to global, and syncs between them.

### DbCache (lib/relaton/db_cache.rb) — File-based Storage
Expand Down Expand Up @@ -64,5 +66,5 @@ Thread pool for `fetch_async`. Default 10 threads per processor, overridable via

## Style

- RuboCop config inherits from [Ribose OSS guides](https://github.com/riboseinc/oss-guides), target Ruby 3.1
- RuboCop config inherits from [Ribose OSS guides](https://github.com/riboseinc/oss-guides), target Ruby 3.2
- Thread safety via `@semaphore` (Mutex) around cache reads/writes in Db
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ source "https://rubygems.org"
# Specify your gem's dependencies in gemspec
gemspec



gem "byebug"
gem "equivalent-xml", "~> 0.6"
gem "guard", "~> 2.14"
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ require "rspec/core/rake_task"

RSpec::Core::RakeTask.new(:spec)

task :default => :spec
task default: :spec
3 changes: 1 addition & 2 deletions bin/rspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby

# This file was generated by Bundler.
#
# The application 'rspec' is installed as part of a gem, and
Expand All @@ -15,4 +15,3 @@ require "rubygems"
require "bundler/setup"

load Gem.bin_path("rspec-core", "rspec")

Loading
Loading