relaton-calconnect 1.8.0 → 1.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 419e558344470da6c12bb6bdd37e7dd993b2a50277b9163f80bb2ea1ecfc2330
4
- data.tar.gz: 98618e247fea9ad95abe52efbd4b972871c9b988af5303b5847663e8021e9b71
3
+ metadata.gz: fc6f1d7dfe13d3c4db9b18e95dc9f5aed1bedefd19213c70dbd873de26a38ce2
4
+ data.tar.gz: bab5ad5fec02754e549f7a35f488a985d03947c5a428fe6b02438a2a1cc54d3f
5
5
  SHA512:
6
- metadata.gz: 24b9804af7f51484cd11a17493f3f2f8d5e6fb1b633822df99f0d657b89ca3cef66820e51d5a935b46b2c97363dbefdbec2b026ff1ddd1dc1e5e6cf9288f7782
7
- data.tar.gz: 4e8a0b5709843b4fef36054597dab9b3b5d2d1ae9b500895387454a11a173767837feca8bca83b394c824cf0fd1db46c5a8f541dae2903633a6c34a1525750f8
6
+ metadata.gz: 902f6d7353903a53cd1739d7a094c2be8d72fe94b73066bd849559463a368060d4692542cbc48c49764b128be44e3e83177e5d18c0e0ae8c88bbc491484f586b
7
+ data.tar.gz: ca2dcfca25d202703a3a32032880b82532e7c75a7395582bcbdac6314c71a92c0c5fe2bd5d8a62b737c20e6d51c2188d2f33970b833fb4368f99a2840371a038
@@ -16,19 +16,9 @@ jobs:
16
16
  strategy:
17
17
  fail-fast: false
18
18
  matrix:
19
- ruby: [ '2.7', '2.6', '2.5', '2.4' ]
19
+ ruby: [ '3.0', '2.7', '2.6', '2.5' ]
20
20
  os: [ ubuntu-latest, windows-latest, macos-latest ]
21
21
  experimental: [ false ]
22
- include:
23
- - ruby: '3.0'
24
- os: 'ubuntu-latest'
25
- experimental: true
26
- - ruby: '3.0'
27
- os: 'windows-latest'
28
- experimental: true
29
- - ruby: '3.0'
30
- os: 'macos-latest'
31
- experimental: true
32
22
  steps:
33
23
  - uses: actions/checkout@v2
34
24
  with:
data/.rubocop.yml CHANGED
@@ -2,9 +2,11 @@
2
2
  # https://github.com/riboseinc/oss-guides
3
3
  # All project-specific additions and overrides should be specified in this file.
4
4
 
5
+ require: rubocop-rails
6
+
5
7
  inherit_from:
6
8
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
7
9
  AllCops:
8
- TargetRubyVersion: 2.4
10
+ TargetRubyVersion: 2.5
9
11
  Rails:
10
12
  Enabled: false
data/README.adoc CHANGED
@@ -76,6 +76,26 @@ item.to_xml bibdata: true
76
76
  </bibdata>"
77
77
  ----
78
78
 
79
+ === Typed links
80
+
81
+ Each Calconnect document has link types:
82
+
83
+ * `xml` - XML format
84
+ * `pdf` - PDF format
85
+ * `doc` - Microsoft Word document format
86
+ * `html` - HTML format
87
+ * `rxl` - RelatonXML format
88
+
89
+ [source,ruby]
90
+ ----
91
+ item.link
92
+ => [#<RelatonBib::TypedUri:0x00007ff2d4b009e0 @content=#<Addressable::URI:0x668 URI:https://standards.calconnect.org/csd/cc-10005.xml>, @type="xml">,
93
+ #<RelatonBib::TypedUri:0x00007ff2d4b00378 @content=#<Addressable::URI:0x67c URI:https://standards.calconnect.org/csd/cc-10005.pdf>, @type="pdf">,
94
+ #<RelatonBib::TypedUri:0x00007ff2d4b00058 @content=#<Addressable::URI:0x690 URI:https://standards.calconnect.org/csd/cc-10005.doc>, @type="doc">,
95
+ #<RelatonBib::TypedUri:0x00007ff2d4b23d28 @content=#<Addressable::URI:0x6a4 URI:https://standards.calconnect.org/csd/cc-10005.html>, @type="html">,
96
+ #<RelatonBib::TypedUri:0x00007ff2d4b23a08 @content=#<Addressable::URI:0x6b8 URI:https://standards.calconnect.org/csd/cc-10005.rxl>, @type="rxl">]
97
+ ----
98
+
79
99
  === Get code, and year
80
100
  [source,ruby]
81
101
  ----
@@ -106,6 +126,25 @@ RelatonCalconnect::CcBibliographicItem.from_hash hash
106
126
  ...
107
127
  ----
108
128
 
129
+ === Fetch data
130
+
131
+ This gem uses the https://raw.githubusercontent.com/usnistgov/NIST-Tech-Pubs/nist-pages/xml/allrecords.xml dataset as one of data sources.
132
+
133
+ The method `RelatonCalconnect::DataFetcher.fetch(output: "data", format: "yaml")` fetches all the documents from the datast and save them to the `./data` folder in YAML format.
134
+ Arguments:
135
+
136
+ - `output` - folder to save documents (default './data').
137
+ - `format` - format in which the documents are saved. Possimle formats are: `yaml`, `xml` (default `yaml`).
138
+
139
+ [source,ruby]
140
+ ----
141
+ RelatonCalconnect::DataFetcher.fetch
142
+ Started at: 2021-09-09 16:03:51 +0200
143
+ Stopped at: 2021-09-09 16:04:12 +0200
144
+ Done in: 20 sec.
145
+ => nil
146
+ ----
147
+
109
148
  == Development
110
149
 
111
150
  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.
@@ -173,9 +173,11 @@
173
173
  <data type="dateTime"/>
174
174
  </attribute>
175
175
  </optional>
176
- <attribute name="from">
177
- <data type="IDREF"/>
178
- </attribute>
176
+ <optional>
177
+ <attribute name="from">
178
+ <data type="IDREF"/>
179
+ </attribute>
180
+ </optional>
179
181
  <optional>
180
182
  <attribute name="to">
181
183
  <data type="IDREF"/>
@@ -624,6 +626,9 @@
624
626
  <choice>
625
627
  <ref name="PureTextElement"/>
626
628
  <ref name="stem"/>
629
+ <ref name="eref"/>
630
+ <ref name="xref"/>
631
+ <ref name="hyperlink"/>
627
632
  </choice>
628
633
  </zeroOrMore>
629
634
  </element>
@@ -634,6 +639,9 @@
634
639
  <choice>
635
640
  <ref name="PureTextElement"/>
636
641
  <ref name="stem"/>
642
+ <ref name="eref"/>
643
+ <ref name="xref"/>
644
+ <ref name="hyperlink"/>
637
645
  </choice>
638
646
  </zeroOrMore>
639
647
  </element>
@@ -641,7 +649,12 @@
641
649
  <define name="tt">
642
650
  <element name="tt">
643
651
  <zeroOrMore>
644
- <ref name="PureTextElement"/>
652
+ <choice>
653
+ <ref name="PureTextElement"/>
654
+ <ref name="eref"/>
655
+ <ref name="xref"/>
656
+ <ref name="hyperlink"/>
657
+ </choice>
645
658
  </zeroOrMore>
646
659
  </element>
647
660
  </define>
@@ -822,7 +835,9 @@
822
835
  <attribute name="alt"/>
823
836
  </optional>
824
837
  <ref name="CitationType"/>
825
- <text/>
838
+ <oneOrMore>
839
+ <ref name="PureTextElement"/>
840
+ </oneOrMore>
826
841
  </define>
827
842
  <define name="hyperlink">
828
843
  <element name="link">
@@ -835,7 +850,9 @@
835
850
  <optional>
836
851
  <attribute name="alt"/>
837
852
  </optional>
838
- <text/>
853
+ <oneOrMore>
854
+ <ref name="PureTextElement"/>
855
+ </oneOrMore>
839
856
  </element>
840
857
  </define>
841
858
  <define name="xref">
@@ -849,7 +866,9 @@
849
866
  <optional>
850
867
  <attribute name="alt"/>
851
868
  </optional>
852
- <text/>
869
+ <oneOrMore>
870
+ <ref name="PureTextElement"/>
871
+ </oneOrMore>
853
872
  </element>
854
873
  </define>
855
874
  <define name="fn">
data/grammars/biblio.rng CHANGED
@@ -401,9 +401,9 @@
401
401
  <choice>
402
402
  <!-- iso191606 TODO -->
403
403
  <group>
404
- <oneOrMore>
404
+ <zeroOrMore>
405
405
  <ref name="street"/>
406
- </oneOrMore>
406
+ </zeroOrMore>
407
407
  <ref name="city"/>
408
408
  <optional>
409
409
  <ref name="state"/>
@@ -787,6 +787,7 @@
787
787
  <value>adapted</value>
788
788
  <value>vote-started</value>
789
789
  <value>vote-ended</value>
790
+ <value>announced</value>
790
791
  </choice>
791
792
  </define>
792
793
  <define name="bdate">
data/grammars/csd.rng CHANGED
@@ -73,6 +73,9 @@
73
73
  <optional>
74
74
  <ref name="doctype"/>
75
75
  </optional>
76
+ <optional>
77
+ <ref name="docsubtype"/>
78
+ </optional>
76
79
  <ref name="editorialgroup"/>
77
80
  <zeroOrMore>
78
81
  <ref name="ics"/>