relaton-ccsds 1.16.3 → 1.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +2 -2
- data/grammars/basicdoc.rng +18 -2
- data/grammars/biblio.rng +1 -0
- data/lib/relaton_ccsds/bibliographic_item.rb +1 -6
- data/lib/relaton_ccsds/data_parser.rb +1 -1
- data/lib/relaton_ccsds/document_type.rb +16 -0
- data/lib/relaton_ccsds/hash_converter.rb +19 -15
- data/lib/relaton_ccsds/version.rb +1 -1
- data/lib/relaton_ccsds.rb +1 -0
- data/relaton_ccsds.gemspec +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b632bd8f8858ae2fb6d2fbaffed10fff5f6fde030337ce6fff74e2b4f19e010
|
4
|
+
data.tar.gz: b73f9f3a7b63f80bac18024b2afa60a6bf19f63569a62f9ac7b82302b3dfc631
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aef90a13ba49c82b849bab3192b64b3fd632c85670af4297d4fa3dfa40fc03321976402b610d5b96fa292520c0d72d9b481b498ebad876eefb617a9ef3d6d0a7
|
7
|
+
data.tar.gz: e23521780a2abe04b89167727751191963cb40ed2a805b884348342c459ee90903d6f960261be54459dcddade6bfad877fd40dcc70123b879c59a13e4724e2dd
|
data/README.adoc
CHANGED
@@ -54,7 +54,7 @@ item = hits[0].doc
|
|
54
54
|
[source,ruby]
|
55
55
|
----
|
56
56
|
item.to_xml
|
57
|
-
=> "<bibitem id="CCSDS230.2-G-1" schema-version="v1.2.
|
57
|
+
=> "<bibitem id="CCSDS230.2-G-1" schema-version="v1.2.5">
|
58
58
|
<fetched>2023-08-25</fetched>
|
59
59
|
<title format="text/plain" language="en" script="Latn">Next Generation Uplink</title>
|
60
60
|
<uri type="pdf">https://public.ccsds.org/Pubs/230x2g1.pdf</uri>
|
@@ -66,7 +66,7 @@ With argument `bibdata: true` it outputs XML wrapped by `bibdata` element and ad
|
|
66
66
|
[source,ruby]
|
67
67
|
----
|
68
68
|
item.to_xml bibdata: true
|
69
|
-
=> "<bibdata schema-version="v1.2.
|
69
|
+
=> "<bibdata schema-version="v1.2.5">
|
70
70
|
<fetched>2023-08-25</fetched>
|
71
71
|
<title format="text/plain" language="en" script="Latn">Next Generation Uplink</title>
|
72
72
|
<uri type="pdf">https://public.ccsds.org/Pubs/230x2g1.pdf</uri>
|
data/grammars/basicdoc.rng
CHANGED
@@ -346,6 +346,8 @@
|
|
346
346
|
<ref name="keyword"/>
|
347
347
|
<ref name="xref"/>
|
348
348
|
<ref name="hyperlink"/>
|
349
|
+
<ref name="index"/>
|
350
|
+
<ref name="index-xref"/>
|
349
351
|
</choice>
|
350
352
|
</oneOrMore>
|
351
353
|
</element>
|
@@ -623,6 +625,8 @@
|
|
623
625
|
<ref name="eref"/>
|
624
626
|
<ref name="xref"/>
|
625
627
|
<ref name="hyperlink"/>
|
628
|
+
<ref name="index"/>
|
629
|
+
<ref name="index-xref"/>
|
626
630
|
</choice>
|
627
631
|
</zeroOrMore>
|
628
632
|
</element>
|
@@ -636,6 +640,8 @@
|
|
636
640
|
<ref name="eref"/>
|
637
641
|
<ref name="xref"/>
|
638
642
|
<ref name="hyperlink"/>
|
643
|
+
<ref name="index"/>
|
644
|
+
<ref name="index-xref"/>
|
639
645
|
</choice>
|
640
646
|
</zeroOrMore>
|
641
647
|
</element>
|
@@ -648,6 +654,8 @@
|
|
648
654
|
<ref name="eref"/>
|
649
655
|
<ref name="xref"/>
|
650
656
|
<ref name="hyperlink"/>
|
657
|
+
<ref name="index"/>
|
658
|
+
<ref name="index-xref"/>
|
651
659
|
</choice>
|
652
660
|
</zeroOrMore>
|
653
661
|
</element>
|
@@ -655,7 +663,11 @@
|
|
655
663
|
<define name="keyword">
|
656
664
|
<element name="keyword">
|
657
665
|
<zeroOrMore>
|
658
|
-
<
|
666
|
+
<choice>
|
667
|
+
<ref name="PureTextElement"/>
|
668
|
+
<ref name="index"/>
|
669
|
+
<ref name="index-xref"/>
|
670
|
+
</choice>
|
659
671
|
</zeroOrMore>
|
660
672
|
</element>
|
661
673
|
</define>
|
@@ -676,7 +688,11 @@
|
|
676
688
|
<define name="strike">
|
677
689
|
<element name="strike">
|
678
690
|
<zeroOrMore>
|
679
|
-
<
|
691
|
+
<choice>
|
692
|
+
<ref name="PureTextElement"/>
|
693
|
+
<ref name="index"/>
|
694
|
+
<ref name="index-xref"/>
|
695
|
+
</choice>
|
680
696
|
</zeroOrMore>
|
681
697
|
</element>
|
682
698
|
</define>
|
data/grammars/biblio.rng
CHANGED
@@ -1,14 +1,9 @@
|
|
1
1
|
module RelatonCcsds
|
2
2
|
class BibliographicItem < RelatonBib::BibliographicItem
|
3
|
-
DOCTYPES = %w[standard practice report specification record].freeze
|
4
|
-
|
5
3
|
attr_reader :technology_area
|
6
4
|
|
7
5
|
# @param technology_area [String, nil]
|
8
6
|
def initialize(**args)
|
9
|
-
if args[:doctype] && !DOCTYPES.include?(args[:doctype])
|
10
|
-
Util.warn "WARNING: Invalid doctype: `#{args[:doctype]}`"
|
11
|
-
end
|
12
7
|
@technology_area = args.delete(:technology_area)
|
13
8
|
super
|
14
9
|
end
|
@@ -27,7 +22,7 @@ module RelatonCcsds
|
|
27
22
|
super do |builder|
|
28
23
|
if opts[:bibdata] && (doctype || editorialgroup || technology_area)
|
29
24
|
ext = builder.ext do |b|
|
30
|
-
|
25
|
+
doctype&.to_xml b
|
31
26
|
editorialgroup&.to_xml b
|
32
27
|
b.send(:"technology-area", technology_area) if technology_area
|
33
28
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module RelatonCcsds
|
2
|
+
class DocumentType < RelatonBib::DocumentType
|
3
|
+
# DOCTYPES = %w[standard practice report specification record].freeze
|
4
|
+
|
5
|
+
def initialize(type:, abbreviation: nil)
|
6
|
+
# check_type type
|
7
|
+
super
|
8
|
+
end
|
9
|
+
|
10
|
+
# def check_type(type)
|
11
|
+
# return if DOCTYPES.include? type
|
12
|
+
|
13
|
+
# Util.warn "WARNING: invalid doctype: `#{type}`"
|
14
|
+
# end
|
15
|
+
end
|
16
|
+
end
|
@@ -1,21 +1,25 @@
|
|
1
1
|
module RelatonCcsds
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
2
|
+
module HashConverter
|
3
|
+
include RelatonBib::HashConverter
|
4
|
+
extend self
|
5
|
+
# @param args [Hash]
|
6
|
+
# @return [Hash]
|
7
|
+
def hash_to_bib(args)
|
8
|
+
ret = super
|
9
|
+
return unless ret
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
11
|
+
ret[:technology_area] = ret[:ext][:technology_area] if ret[:ext]
|
12
|
+
ret
|
13
|
+
end
|
14
|
+
|
15
|
+
# @param item_hash [Hash]
|
16
|
+
# @return [RelatonCie::BibliographicItem]
|
17
|
+
def bib_item(item_hash)
|
18
|
+
BibliographicItem.new(**item_hash)
|
19
|
+
end
|
13
20
|
|
14
|
-
|
15
|
-
|
16
|
-
def bib_item(item_hash)
|
17
|
-
BibliographicItem.new(**item_hash)
|
18
|
-
end
|
21
|
+
def create_doctype(**args)
|
22
|
+
DocumentType.new(**args)
|
19
23
|
end
|
20
24
|
end
|
21
25
|
end
|
data/lib/relaton_ccsds.rb
CHANGED
@@ -7,6 +7,7 @@ require_relative "relaton_ccsds/version"
|
|
7
7
|
require_relative "relaton_ccsds/bibliographic_item"
|
8
8
|
require_relative "relaton_ccsds/config"
|
9
9
|
require_relative "relaton_ccsds/util"
|
10
|
+
require_relative "relaton_ccsds/document_type"
|
10
11
|
require_relative "relaton_ccsds/bibliography"
|
11
12
|
require_relative "relaton_ccsds/hit"
|
12
13
|
require_relative "relaton_ccsds/hit_collection"
|
data/relaton_ccsds.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
|
26
26
|
# Uncomment to register a new dependency of your gem
|
27
27
|
spec.add_dependency "mechanize", "~> 2.7"
|
28
|
-
spec.add_dependency "relaton-bib", "~> 1.
|
28
|
+
spec.add_dependency "relaton-bib", "~> 1.17.0"
|
29
29
|
spec.add_dependency "relaton-index", "~> 0.2.0"
|
30
30
|
|
31
31
|
# For more information and examples about making a new gem, check out our
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-ccsds
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mechanize
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.17.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
40
|
+
version: 1.17.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: relaton-index
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -79,6 +79,7 @@ files:
|
|
79
79
|
- lib/relaton_ccsds/config.rb
|
80
80
|
- lib/relaton_ccsds/data_fetcher.rb
|
81
81
|
- lib/relaton_ccsds/data_parser.rb
|
82
|
+
- lib/relaton_ccsds/document_type.rb
|
82
83
|
- lib/relaton_ccsds/hash_converter.rb
|
83
84
|
- lib/relaton_ccsds/hit.rb
|
84
85
|
- lib/relaton_ccsds/hit_collection.rb
|