relaton-cie 1.20.1 → 2.0.0.pre.alpha.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: dd5511102fe58e22ea8bc53bab129f8ae6fc00b9fb5fd7647d4ff20e12f1a912
4
- data.tar.gz: f7e2cb38965575cfe36976076cf08014d6d695a36452daef02634cef6dfaace1
3
+ metadata.gz: 5a41c3c7829bf05dc593f3d7217281bcd5f28c385794513a1dcad500e6d605c8
4
+ data.tar.gz: d2f9c4f0e50285409dfdd43605b6af40b47f398dab95de8902ac8745ac98760f
5
5
  SHA512:
6
- metadata.gz: f3f17b076c36358e79ad828500f727ff102938461826fd54b844a09db211befe4c40a6b9321269b6e9f0a553abd0fadaeb77342f8f5e418e811d7eff31917a9c
7
- data.tar.gz: dede39458440d919b9babdfb95909503e2ddfcbeb5902c37e78617002793b869f41ab41b21971dac07c95f445a33a0b0866cabcae229a3f86d943336ddcbf7fe
6
+ metadata.gz: 56120f73fc6ae1d3f528b05535e9d325cbf171a6ae611c54f1a513663adfb277b0c4b87123b97a8d169da1d11b81eedb41cb141e39cce74285a729b6e281b025
7
+ data.tar.gz: 1b58cb14fd99c03c270a658280c23689ee10bb811580fb463c0adeeea88b07a4d8a8a7299975bcc26dde43d0f82b790e76843a14707c9f2cd475d075f72b2a48
data/.rubocop.yml CHANGED
@@ -7,6 +7,6 @@ require: rubocop-rails
7
7
  inherit_from:
8
8
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
9
9
  AllCops:
10
- TargetRubyVersion: 2.7
10
+ TargetRubyVersion: 3.2
11
11
  Rails:
12
12
  Enabled: false
data/README.adoc CHANGED
@@ -1,4 +1,4 @@
1
- = RelatonCie
1
+ = Relaton::Cie
2
2
 
3
3
  image:https://img.shields.io/gem/v/relaton-cie.svg["Gem Version", link="https://rubygems.org/gems/relaton-cie"]
4
4
  image:https://github.com/relaton/relaton-cie/workflows/macos/badge.svg["Build Status (macOS)", link="https://github.com/relaton/relaton-cie/actions?workflow=macos"]
@@ -33,19 +33,19 @@ Or install it yourself as:
33
33
 
34
34
  [source,ruby]
35
35
  ----
36
- require 'relaton_cie'
36
+ require 'relaton/cie'
37
37
  => true
38
38
 
39
- item = RelatonCie::CieBibliography.get 'CIE 001-1980'
40
- [relaton-cie] (CIE 001-1980) Fetching from Realton repository ...
41
- [relaton-cie] (CIE 001-1980) Found: `CIE 001-1980`
42
- => #<RelatonBib::BibliographicItem:0x007fb3f6098920
39
+ item = Relaton::Cie::Bibliography.get 'CIE 001-1980'
40
+ [relaton-cie] INFO: (CIE 001-1980) Fetching from Relaton repository ...
41
+ [relaton-cie] INFO: (CIE 001-1980) Found: `CIE 001-1980`
42
+ => #<Relaton::Bib::ItemData:0x0000000123b05300
43
43
  ...
44
44
 
45
45
  # Return nil if a document doesn't exist.
46
- RelatonCie::CieBibliography.get '1111'
47
- [relaton-cie] (1111) Fetching from Realton repository ...
48
- [relaton-cie] (1111) Not found.
46
+ Relaton::Cie::Bibliography.get '1111'
47
+ [relaton-cie] INFO: (1111) Fetching from Relaton repository ...
48
+ [relaton-cie] INFO: (1111) Not found.
49
49
  => nil
50
50
  ----
51
51
 
@@ -54,11 +54,11 @@ RelatonCie::CieBibliography.get '1111'
54
54
  [source,ruby]
55
55
  ----
56
56
  item.to_xml
57
- => "<bibitem id="CIE001-1980" type="standard" schema-version="v1.2.1">
58
- <fetched>2022-12-03</fetched>
59
- <title type="title-main" format="text/plain">Guidelines for minimizing urban sky glow near astronomical observatories (Joint Publication IAU/CIE)</title>
60
- <title type="main" format="text/plain">Guidelines for minimizing urban sky glow near astronomical observatories (Joint Publication IAU/CIE)</title>
61
- <uri type="src">https://www.techstreet.com/cie/standards/cie-001-1980?product_id=1210107</uri>
57
+ => "<bibitem id="CIE0011980" type="standard" schema-version="v1.4.1">
58
+ <fetched>2025-12-23</fetched>
59
+ <title type="title-main">Guidelines for minimizing urban sky glow near astronomical observatories (Joint Publication IAU/CIE)</title>
60
+ <title type="main">Guidelines for minimizing urban sky glow near astronomical observatories (Joint Publication IAU/CIE)</title>
61
+ <uri type="src">https://store.accuristech.com/standards/cie-001-1980?product_id=1210107</uri>
62
62
  ...
63
63
  </bibitem>"
64
64
  ----
@@ -67,33 +67,39 @@ With `bibdata: true` option XML output is wrapped with `bibdata` element and `ex
67
67
  [source,ruby]
68
68
  ----
69
69
  item.to_xml bibdata: true
70
- => "<bibdata type="standard" schema-version="v1.2.1">
71
- <fetched>2022-12-03</fetched>
72
- <title type="title-main" format="text/plain">Guidelines for minimizing urban sky glow near astronomical observatories (Joint Publication IAU/CIE)</title>
73
- <title type="main" format="text/plain">Guidelines for minimizing urban sky glow near astronomical observatories (Joint Publication IAU/CIE)</title>
74
- <uri type="src">https://www.techstreet.com/cie/standards/cie-001-1980?product_id=1210107</uri>
70
+ => "<bibdata type="standard" schema-version="v1.4.1">
71
+ <fetched>2025-12-23</fetched>
72
+ <title type="title-main">Guidelines for minimizing urban sky glow near astronomical observatories (Joint Publication IAU/CIE)</title>
73
+ <title type="main">Guidelines for minimizing urban sky glow near astronomical observatories (Joint Publication IAU/CIE)</title>
74
+ <uri type="src">https://store.accuristech.com/standards/cie-001-1980?product_id=1210107</uri>
75
75
  ...
76
76
  <ext schema-version="v1.0.0">
77
77
  <doctype>document</doctype>
78
+ <flavor>cie</flavor>
78
79
  </ext>
79
- </bibdata>"
80
+ </bibdata>
80
81
  ----
81
82
  === Typed links
82
83
 
83
- Each CIE document has `src` type link.
84
+ Each CIE document has `src` type source link.
84
85
 
85
86
  [source,ruby]
86
87
  ----
87
- item.link
88
- => [#<RelatonBib::TypedUri:0x00007fe58e8d4048 @content=#<Addressable::URI:0xbe50 URI:https://www.techstreet.com/cie/standards/cie-001-1980?product_id=1210107>, @type="src">]
88
+ item.source
89
+ => [#<Relaton::Bib::Uri:0x0000000123cc2990
90
+ @content="https://store.accuristech.com/standards/cie-001-1980?product_id=1210107",
91
+ @language=nil,
92
+ @locale=nil,
93
+ @script=nil,
94
+ @type="src">]
89
95
  ----
90
96
 
91
97
  === Parse a file locally
92
98
 
93
99
  [source,ruby]
94
100
  ----
95
- item = RelatonCie::XMLParser.from_xml File.read("spec/fixtures/bibdata.xml")
96
- #<RelatonCie::BibliographicItem:0x00007feecda370f0
101
+ item = Relaton::Cie::Item.from_xml File.read("spec/fixtures/bibdata.xml")
102
+ => #<Relaton::Cie::ItemData:0x000000010d00d0d0
97
103
  ...
98
104
  ----
99
105
 
@@ -101,7 +107,7 @@ item = RelatonCie::XMLParser.from_xml File.read("spec/fixtures/bibdata.xml")
101
107
 
102
108
  This gem uses the https://www.techstreet.com/cie/searches/31156444 dataset as one of the data sources.
103
109
 
104
- The method `RelatonCie::DataFetcher.fetch(output: "data", format: "yaml")` fetches all the documents from the dataset and saves them to the `./data` folder in YAML format.
110
+ The method `Relaton::Cie::DataFetcher.fetch(output: "data", format: "yaml")` fetches all the documents from the dataset and saves them to the `./data` folder in YAML format.
105
111
  Arguments:
106
112
 
107
113
  - `output` - folder to save documents (default './data').
@@ -109,7 +115,10 @@ Arguments:
109
115
 
110
116
  [source,ruby]
111
117
  ----
112
- RelatonCie::DataFetcher.fetch
118
+ require "relaton/cie/data_fetcher"
119
+ => true
120
+
121
+ Relaton::Cie::DataFetcher.fetch
113
122
  Started at: 2021-09-08 16:37:53 +0200
114
123
  Stopped at: 2021-09-08 16:49:17 +0200
115
124
  Done in: 684 sec.
data/bin/console CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "bundler/setup"
4
- require "relaton_cie"
4
+ require "relaton/cie"
5
5
 
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.