relaton-itu 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6896cc449a319a193b826b03c471c288a6a23a874aabc884c0fb7d966dc9a859
4
- data.tar.gz: 9ae42b212ac48b0bd1f046f3401eaa04a451977f224497fac678b2cd259fa8d3
3
+ metadata.gz: 0f99c128530261fd98b5a29679341fa049465a336b9f549b70f332fcff8a305d
4
+ data.tar.gz: 92628dc4cb52a75ae803db9f48b96b8dcbaa9fcf4f67542c35c69b13eecb4df6
5
5
  SHA512:
6
- metadata.gz: ecb0566f856fd66dc05155e1b84806dfe9c2a4ea5002fb868b8156c7f50cfd09df7303d4da7c46e298343f73dae9fd15d025eaac3f062c9c64c0b6c7954f0e21
7
- data.tar.gz: 2c61a6bc6394d778a45229fc29db686ffd6713ba35598015ea7e96f49cb660b30cd523fef5d5a14effe3b2f7efe71cbf75e2b7ea75b7723df29058f57d91d1f9
6
+ metadata.gz: 91b754b728d5f63c288262d8b28e9ba2ec00175301f81f4fd066e85b84a3c7382dbaf2b488fa371a3624118ae65a13038c26cc44110ffcfb87d7eb9ff2b81651
7
+ data.tar.gz: 5ae98ea7dbe2f6cae2033aaa5176c302554c8a0e486b47f82a8fb6e4a0c99f712b5988784626c3e3e13980aa6466e6a474fc79fa501658da84c52b5502da637f
data/CLAUDE.md CHANGED
@@ -51,6 +51,7 @@ All model classes use `Lutaml::Model::Serializable` for XML/YAML serialization:
51
51
 
52
52
  ## Testing
53
53
 
54
+ - **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-itu-r.
54
55
  - **Framework:** RSpec with VCR cassettes for HTTP mocking and WebMock
55
56
  - **Fixtures:** `spec/fixtures/` contains sample YAML/XML documents for round-trip tests
56
57
  - **VCR cassettes:** `spec/vcr_cassettes/` — 22 cassettes recording real HTTP responses
data/Gemfile CHANGED
@@ -5,6 +5,7 @@ source "https://rubygems.org"
5
5
  # Specify your gem's dependencies in relaton_itu.gemspec
6
6
  gemspec
7
7
 
8
+
8
9
  gem "equivalent-xml", "~> 0.6"
9
10
  gem "pry-byebug"
10
11
  gem "rake", "~> 13.0"
data/README.adoc CHANGED
@@ -183,6 +183,8 @@ RelatonItu uses the relaton-logger gem for logging. By default, it logs to STDOU
183
183
 
184
184
  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.
185
185
 
186
+ 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-itu-r[relaton-data-itu-r] repository.
187
+
186
188
  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).
187
189
 
188
190
  == 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 ITU index fixture from relaton-data-itu-r"
10
+ task :update_index do
11
+ require "net/http"
12
+ require "uri"
13
+
14
+ url = "https://raw.githubusercontent.com/relaton/relaton-data-itu-r/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