relaton-un 1.3.0 → 1.6.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 +4 -4
- data/.github/workflows/macos.yml +2 -0
- data/README.adoc +23 -10
- data/grammars/isodoc.rng +136 -21
- data/grammars/un.rng +7 -0
- data/lib/relaton_un/editorialgroup.rb +5 -0
- data/lib/relaton_un/hit_collection.rb +21 -11
- data/lib/relaton_un/un_bibliographic_item.rb +8 -5
- data/lib/relaton_un/version.rb +1 -1
- data/relaton_un.gemspec +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1281dc621956805796d8679f0b56a7381d015b83aeda686756719e7c945a5386
|
4
|
+
data.tar.gz: 60fdeff0e2a947ef74d8a37336647ab4229066c2e3add1d2ce9834640006e48c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2de2e5a272da58c6356dcf2c829721bba82b89a74a8cce15709db9c4e8b1c068b468f9e3af7ef9c44111a23c03881513f1d2df739cd7e601ca7fac0a6af2646e
|
7
|
+
data.tar.gz: e45d3385ee0f836bdca80a2a649d1e966de897f9a5a9c894e374322dcab23daf3eff24259c836601dc3c376e060024df241274c5a0d9463d0a949bab693c7d27
|
data/.github/workflows/macos.yml
CHANGED
@@ -26,6 +26,8 @@ jobs:
|
|
26
26
|
- name: Update gems
|
27
27
|
run: |
|
28
28
|
sudo gem install bundler --force
|
29
|
+
ruby -v | grep 2.5 && bundle config set build.debase --with-cflags="-Wno-error=implicit-function-declaration"
|
30
|
+
ruby -v | grep 2.5 && bundle config set build.ruby-debug-ide --with-cflags="-Wno-error=implicit-function-declaration"
|
29
31
|
bundle install --jobs 4 --retry 3
|
30
32
|
- name: Run specs
|
31
33
|
run: |
|
data/README.adoc
CHANGED
@@ -25,9 +25,10 @@ Or install it yourself as:
|
|
25
25
|
|
26
26
|
=== Search for a standard using keywords
|
27
27
|
|
28
|
-
[source]
|
28
|
+
[source,ruby]
|
29
29
|
----
|
30
30
|
require 'relaton_un'
|
31
|
+
=> true
|
31
32
|
|
32
33
|
hits = RelatonUn::UnBibliography.search("TRADE/CEFACT/2004/32")
|
33
34
|
=> <RelatonUn::HitCollection:0x007fc4e6ec2018 @ref=TRADE/CEFACT/2004/32 @fetched=false>
|
@@ -39,23 +40,23 @@ item = hits[0].fetch
|
|
39
40
|
|
40
41
|
=== XML serialization
|
41
42
|
|
42
|
-
[source]
|
43
|
+
[source,ruby]
|
43
44
|
----
|
44
45
|
item.to_xml
|
45
|
-
=>
|
46
|
+
=> "<bibitem id="TRADE/CEFACT/2004/32" type="standard">
|
46
47
|
<title type="main" format="text/plain" language="en" script="Latn">SECRETARIAT REVIEW OF UN/LOCODE, 19 DECEMBER 2003 / SUBMITTED BY THE SECRETARIAT</title>
|
47
48
|
<uri type="pdf">https://documents-dds-ny.un.org/doc/UNDOC/GEN/G04/306/83/pdf/G0430683.pdf?OpenElement</uri>
|
48
49
|
<uri type="word">https://documents-dds-ny.un.org/doc/UNDOC/GEN/G04/306/83/doc/G0430683.DOC?OpenElement</uri>
|
49
50
|
<docidentifier type="UN">TRADE/CEFACT/2004/32</docidentifier>
|
50
51
|
<docnumber>TRADE/CEFACT/2004/32</docnumber>
|
51
52
|
...
|
52
|
-
</bibitem>
|
53
|
+
</bibitem>"
|
53
54
|
----
|
54
55
|
With argument `bibdata: true` it ouputs XML wrapped by `bibdata` element and adds flavour `ext` element.
|
55
|
-
[source]
|
56
|
+
[source,ruby]
|
56
57
|
----
|
57
58
|
item.to_xml bibdata: true
|
58
|
-
=>
|
59
|
+
=> "<bibdata type="standard">
|
59
60
|
<fetched>2020-03-13</fetched>
|
60
61
|
<title type="main" format="text/plain" language="en" script="Latn">SECRETARIAT REVIEW OF UN/LOCODE, 19 DECEMBER 2003 / SUBMITTED BY THE SECRETARIAT</title>
|
61
62
|
<uri type="pdf">https://documents-dds-ny.un.org/doc/UNDOC/GEN/G04/306/83/pdf/G0430683.pdf?OpenElement</uri>
|
@@ -63,11 +64,23 @@ item.to_xml bibdata: true
|
|
63
64
|
<docidentifier type="UN">TRADE/CEFACT/2004/32</docidentifier>
|
64
65
|
<docnumber>TRADE/CEFACT/2004/32</docnumber>
|
65
66
|
...
|
66
|
-
|
67
|
+
<ext>
|
68
|
+
<editorialgroup>
|
69
|
+
<committee>Committee on Trade</committee>
|
70
|
+
<committee>Centre for Trade Facilitation and Electronic Business</committee>
|
71
|
+
</editorialgroup>
|
72
|
+
<distribution>general</distribution>
|
73
|
+
<session>
|
74
|
+
<number>10</number>
|
75
|
+
<agenda-id>12</agenda-id>
|
76
|
+
</session>
|
77
|
+
<job_number>G0430683</job_number>
|
78
|
+
</ext>
|
79
|
+
</bibdata>"
|
67
80
|
----
|
68
81
|
|
69
82
|
=== Get code, and year
|
70
|
-
[source]
|
83
|
+
[source,ruby]
|
71
84
|
----
|
72
85
|
RelatonUn::UnBibliography.get "UN TRADE/CEFACT/2004/32"
|
73
86
|
[relaton-un] ("UN TRADE/CEFACT/2004/32") fetching...
|
@@ -77,7 +90,7 @@ RelatonUn::UnBibliography.get "UN TRADE/CEFACT/2004/32"
|
|
77
90
|
----
|
78
91
|
|
79
92
|
=== Create bibliographic item from XML
|
80
|
-
[source]
|
93
|
+
[source,ruby]
|
81
94
|
----
|
82
95
|
RelatonUn::XMLParser.from_xml File.read('spec/fixtures/un_bib.xml')
|
83
96
|
=> #<RelatonUn::UnBibliographicItem:0x007fdc5e7ab678
|
@@ -85,7 +98,7 @@ RelatonUn::XMLParser.from_xml File.read('spec/fixtures/un_bib.xml')
|
|
85
98
|
----
|
86
99
|
|
87
100
|
=== Create bibliographic item from YAML
|
88
|
-
[source]
|
101
|
+
[source,ruby]
|
89
102
|
----
|
90
103
|
hash = YAML.load_file 'spec/fixtures/un_bib.yaml'
|
91
104
|
=> {"id"=>"TRADE/CEFACT/2004/32",
|
data/grammars/isodoc.rng
CHANGED
@@ -43,7 +43,9 @@
|
|
43
43
|
<define name="xref">
|
44
44
|
<element name="xref">
|
45
45
|
<attribute name="target">
|
46
|
-
<data type="
|
46
|
+
<data type="string">
|
47
|
+
<param name="pattern">\i\c*|\c+#\c+</param>
|
48
|
+
</data>
|
47
49
|
</attribute>
|
48
50
|
<optional>
|
49
51
|
<attribute name="type">
|
@@ -61,6 +63,11 @@
|
|
61
63
|
</choice>
|
62
64
|
</attribute>
|
63
65
|
</optional>
|
66
|
+
<optional>
|
67
|
+
<attribute name="droploc">
|
68
|
+
<data type="boolean"/>
|
69
|
+
</attribute>
|
70
|
+
</optional>
|
64
71
|
<text/>
|
65
72
|
</element>
|
66
73
|
</define>
|
@@ -578,6 +585,8 @@
|
|
578
585
|
<ref name="ol"/>
|
579
586
|
<ref name="dl"/>
|
580
587
|
<ref name="formula"/>
|
588
|
+
<ref name="quote"/>
|
589
|
+
<ref name="sourcecode"/>
|
581
590
|
</choice>
|
582
591
|
</oneOrMore>
|
583
592
|
</element>
|
@@ -661,6 +670,16 @@
|
|
661
670
|
</choice>
|
662
671
|
</attribute>
|
663
672
|
</optional>
|
673
|
+
<optional>
|
674
|
+
<attribute name="valign">
|
675
|
+
<choice>
|
676
|
+
<value>top</value>
|
677
|
+
<value>middle</value>
|
678
|
+
<value>bottom</value>
|
679
|
+
<value>baseline</value>
|
680
|
+
</choice>
|
681
|
+
</attribute>
|
682
|
+
</optional>
|
664
683
|
<choice>
|
665
684
|
<zeroOrMore>
|
666
685
|
<choice>
|
@@ -697,6 +716,16 @@
|
|
697
716
|
</choice>
|
698
717
|
</attribute>
|
699
718
|
</optional>
|
719
|
+
<optional>
|
720
|
+
<attribute name="valign">
|
721
|
+
<choice>
|
722
|
+
<value>top</value>
|
723
|
+
<value>middle</value>
|
724
|
+
<value>bottom</value>
|
725
|
+
<value>baseline</value>
|
726
|
+
</choice>
|
727
|
+
</attribute>
|
728
|
+
</optional>
|
700
729
|
<choice>
|
701
730
|
<zeroOrMore>
|
702
731
|
<choice>
|
@@ -834,6 +863,13 @@
|
|
834
863
|
</define>
|
835
864
|
<define name="standard-document">
|
836
865
|
<element name="standard-document">
|
866
|
+
<attribute name="version"/>
|
867
|
+
<attribute name="type">
|
868
|
+
<choice>
|
869
|
+
<value>semantic</value>
|
870
|
+
<value>presentation</value>
|
871
|
+
</choice>
|
872
|
+
</attribute>
|
837
873
|
<ref name="bibdata"/>
|
838
874
|
<optional>
|
839
875
|
<ref name="boilerplate"/>
|
@@ -855,7 +891,7 @@
|
|
855
891
|
<oneOrMore>
|
856
892
|
<choice>
|
857
893
|
<ref name="content"/>
|
858
|
-
<ref name="
|
894
|
+
<ref name="abstract"/>
|
859
895
|
<ref name="foreword"/>
|
860
896
|
<ref name="introduction"/>
|
861
897
|
<ref name="acknowledgements"/>
|
@@ -922,6 +958,9 @@
|
|
922
958
|
<optional>
|
923
959
|
<attribute name="script"/>
|
924
960
|
</optional>
|
961
|
+
<optional>
|
962
|
+
<attribute name="type"/>
|
963
|
+
</optional>
|
925
964
|
<optional>
|
926
965
|
<attribute name="obligation">
|
927
966
|
<choice>
|
@@ -961,9 +1000,6 @@
|
|
961
1000
|
</define>
|
962
1001
|
<define name="content-subsection">
|
963
1002
|
<element name="clause">
|
964
|
-
<optional>
|
965
|
-
<attribute name="type"/>
|
966
|
-
</optional>
|
967
1003
|
<ref name="Content-Section"/>
|
968
1004
|
</element>
|
969
1005
|
</define>
|
@@ -992,6 +1028,9 @@
|
|
992
1028
|
</choice>
|
993
1029
|
</attribute>
|
994
1030
|
</optional>
|
1031
|
+
<optional>
|
1032
|
+
<attribute name="type"/>
|
1033
|
+
</optional>
|
995
1034
|
<optional>
|
996
1035
|
<ref name="section-title"/>
|
997
1036
|
</optional>
|
@@ -1011,9 +1050,6 @@
|
|
1011
1050
|
</define>
|
1012
1051
|
<define name="clause">
|
1013
1052
|
<element name="clause">
|
1014
|
-
<optional>
|
1015
|
-
<attribute name="type"/>
|
1016
|
-
</optional>
|
1017
1053
|
<ref name="Clause-Section"/>
|
1018
1054
|
</element>
|
1019
1055
|
</define>
|
@@ -1042,18 +1078,24 @@
|
|
1042
1078
|
</choice>
|
1043
1079
|
</attribute>
|
1044
1080
|
</optional>
|
1081
|
+
<optional>
|
1082
|
+
<attribute name="type"/>
|
1083
|
+
</optional>
|
1045
1084
|
<optional>
|
1046
1085
|
<ref name="section-title"/>
|
1047
1086
|
</optional>
|
1048
1087
|
<group>
|
1049
|
-
<
|
1050
|
-
<
|
1051
|
-
<
|
1052
|
-
|
1053
|
-
|
1054
|
-
<
|
1055
|
-
|
1056
|
-
|
1088
|
+
<choice>
|
1089
|
+
<group>
|
1090
|
+
<zeroOrMore>
|
1091
|
+
<ref name="BasicBlock"/>
|
1092
|
+
</zeroOrMore>
|
1093
|
+
<zeroOrMore>
|
1094
|
+
<ref name="note"/>
|
1095
|
+
</zeroOrMore>
|
1096
|
+
</group>
|
1097
|
+
<ref name="amend"/>
|
1098
|
+
</choice>
|
1057
1099
|
<zeroOrMore>
|
1058
1100
|
<choice>
|
1059
1101
|
<ref name="clause-subsection"/>
|
@@ -1180,6 +1222,9 @@
|
|
1180
1222
|
<optional>
|
1181
1223
|
<attribute name="script"/>
|
1182
1224
|
</optional>
|
1225
|
+
<optional>
|
1226
|
+
<attribute name="type"/>
|
1227
|
+
</optional>
|
1183
1228
|
<optional>
|
1184
1229
|
<attribute name="obligation">
|
1185
1230
|
<choice>
|
@@ -1447,11 +1492,6 @@
|
|
1447
1492
|
</optional>
|
1448
1493
|
</element>
|
1449
1494
|
</define>
|
1450
|
-
<define name="preface_abstract">
|
1451
|
-
<element name="abstract">
|
1452
|
-
<ref name="Basic-Section"/>
|
1453
|
-
</element>
|
1454
|
-
</define>
|
1455
1495
|
<define name="term-clause">
|
1456
1496
|
<element name="clause">
|
1457
1497
|
<optional>
|
@@ -1501,4 +1541,79 @@
|
|
1501
1541
|
<ref name="CitationType"/>
|
1502
1542
|
</element>
|
1503
1543
|
</define>
|
1544
|
+
<define name="amend">
|
1545
|
+
<element name="amend">
|
1546
|
+
<optional>
|
1547
|
+
<attribute name="id">
|
1548
|
+
<data type="ID"/>
|
1549
|
+
</attribute>
|
1550
|
+
</optional>
|
1551
|
+
<attribute name="change">
|
1552
|
+
<choice>
|
1553
|
+
<value>add</value>
|
1554
|
+
<value>modify</value>
|
1555
|
+
<value>delete</value>
|
1556
|
+
</choice>
|
1557
|
+
</attribute>
|
1558
|
+
<optional>
|
1559
|
+
<attribute name="path"/>
|
1560
|
+
</optional>
|
1561
|
+
<optional>
|
1562
|
+
<attribute name="path_end"/>
|
1563
|
+
</optional>
|
1564
|
+
<optional>
|
1565
|
+
<attribute name="title"/>
|
1566
|
+
</optional>
|
1567
|
+
<optional>
|
1568
|
+
<element name="location">
|
1569
|
+
<zeroOrMore>
|
1570
|
+
<ref name="locality"/>
|
1571
|
+
</zeroOrMore>
|
1572
|
+
</element>
|
1573
|
+
</optional>
|
1574
|
+
<zeroOrMore>
|
1575
|
+
<ref name="autonumber"/>
|
1576
|
+
</zeroOrMore>
|
1577
|
+
<optional>
|
1578
|
+
<element name="description">
|
1579
|
+
<zeroOrMore>
|
1580
|
+
<ref name="BasicBlock"/>
|
1581
|
+
</zeroOrMore>
|
1582
|
+
</element>
|
1583
|
+
</optional>
|
1584
|
+
<optional>
|
1585
|
+
<element name="newcontent">
|
1586
|
+
<zeroOrMore>
|
1587
|
+
<ref name="BasicBlock"/>
|
1588
|
+
</zeroOrMore>
|
1589
|
+
</element>
|
1590
|
+
</optional>
|
1591
|
+
<optional>
|
1592
|
+
<element name="description">
|
1593
|
+
<zeroOrMore>
|
1594
|
+
<ref name="BasicBlock"/>
|
1595
|
+
</zeroOrMore>
|
1596
|
+
</element>
|
1597
|
+
</optional>
|
1598
|
+
</element>
|
1599
|
+
</define>
|
1600
|
+
<define name="autonumber">
|
1601
|
+
<element name="autonumber">
|
1602
|
+
<attribute name="type">
|
1603
|
+
<choice>
|
1604
|
+
<value>requirement</value>
|
1605
|
+
<value>recommendation</value>
|
1606
|
+
<value>permission</value>
|
1607
|
+
<value>table</value>
|
1608
|
+
<value>figure</value>
|
1609
|
+
<value>admonition</value>
|
1610
|
+
<value>formula</value>
|
1611
|
+
<value>sourcecode</value>
|
1612
|
+
<value>example</value>
|
1613
|
+
<value>note</value>
|
1614
|
+
</choice>
|
1615
|
+
</attribute>
|
1616
|
+
<text/>
|
1617
|
+
</element>
|
1618
|
+
</define>
|
1504
1619
|
</grammar>
|
data/grammars/un.rng
CHANGED
@@ -340,6 +340,13 @@
|
|
340
340
|
</define>
|
341
341
|
<define name="un-standard">
|
342
342
|
<element name="un-standard">
|
343
|
+
<attribute name="version"/>
|
344
|
+
<attribute name="type">
|
345
|
+
<choice>
|
346
|
+
<value>semantic</value>
|
347
|
+
<value>presentation</value>
|
348
|
+
</choice>
|
349
|
+
</attribute>
|
343
350
|
<ref name="bibdata"/>
|
344
351
|
<optional>
|
345
352
|
<ref name="boilerplate"/>
|
@@ -6,18 +6,23 @@ require "http-cookie"
|
|
6
6
|
module RelatonUn
|
7
7
|
# Page of hit collection.
|
8
8
|
class HitCollection < RelatonBib::HitCollection
|
9
|
-
AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X
|
10
|
-
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/
|
9
|
+
AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) "\
|
10
|
+
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"
|
11
11
|
DOMAIN = "https://documents.un.org"
|
12
|
-
BOUNDARY = "----
|
12
|
+
BOUNDARY = "----WebKitFormBoundaryVarT9Z7AFUzw2lma"
|
13
13
|
|
14
14
|
# @param text [String] reference to search
|
15
15
|
def initialize(text)
|
16
16
|
super
|
17
17
|
@uri = URI.parse DOMAIN
|
18
18
|
@jar = HTTP::CookieJar.new
|
19
|
-
@http = Net::HTTP.new @uri.host, @uri.port
|
19
|
+
@http = Net::HTTP.new @uri.host, @uri.port # , "localhost", "8000"
|
20
20
|
@http.use_ssl = true
|
21
|
+
# @http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
22
|
+
# @http.cert_store = OpenSSL::X509::Store.new
|
23
|
+
# ca_file = "/Users/andrej/Library/Preferences/httptoolkit/ca.pem"
|
24
|
+
# @http.cert_store.set_default_paths
|
25
|
+
# @http.cert_store.add_file ca_file
|
21
26
|
@http.read_timeout = 120
|
22
27
|
if (form_resp = get_page)
|
23
28
|
doc = Nokogiri::HTML page_resp(form_resp, text).body
|
@@ -50,17 +55,19 @@ module RelatonUn
|
|
50
55
|
# @return [Array<String>]
|
51
56
|
def form_data(form, text) # rubocop:disable Metrics/CyclomaticComplexity
|
52
57
|
fd = form.xpath(
|
53
|
-
"//input[@type!='radio']"
|
54
|
-
"//input[@type='radio'][@checked]"
|
55
|
-
"//select[@name!='view:_id1:_id2:cbLang']"
|
58
|
+
"//input[@type!='radio']|"\
|
59
|
+
"//input[@type='radio'][@checked]|"\
|
60
|
+
"//select[@name!='view:_id1:_id2:cbLang']|"\
|
56
61
|
"//textarea"
|
57
62
|
).reduce([]) do |m, i|
|
58
63
|
v = case i[:name]
|
59
64
|
when "view:_id1:_id2:txtSymbol" then text
|
65
|
+
when "view:_id1:_id2:rgTrunc" then "R"
|
60
66
|
when "view:_id1:_id2:cbType" then "FP"
|
61
67
|
when "view:_id1:_id2:cbSort" then "R"
|
62
68
|
when "$$xspsubmitid" then "view:_id1:_id2:_id130"
|
63
|
-
when "$$xspsubmitscroll" then "0|
|
69
|
+
when "$$xspsubmitscroll" then "0|102"
|
70
|
+
when "view:_id1" then "view:_id1"
|
64
71
|
else i[:value]
|
65
72
|
end
|
66
73
|
m << %{--#{BOUNDARY}}
|
@@ -77,7 +84,7 @@ module RelatonUn
|
|
77
84
|
form = Nokogiri::HTML form_resp.body
|
78
85
|
req = Net::HTTP::Post.new form.at("//form")[:action]
|
79
86
|
set_headers req
|
80
|
-
req["Content-Type"] = "multipart/form-data
|
87
|
+
req["Content-Type"] = "multipart/form-data; boundary=#{BOUNDARY}"
|
81
88
|
req.body = form_data(form, text).join("\r\n")
|
82
89
|
resp = @http.request req
|
83
90
|
get_page URI.parse(resp["location"]).request_uri
|
@@ -163,15 +170,18 @@ module RelatonUn
|
|
163
170
|
# rubocop:disable Metrics/MethodLength
|
164
171
|
|
165
172
|
# @param req [Net::HTTP::Get, Net::HTTP::Post]
|
166
|
-
def set_headers(req)
|
173
|
+
def set_headers(req) # rubocop:disable Metrics/AbcSize
|
167
174
|
set_cookie req
|
168
175
|
req["Accept"] = "text/html,application/xhtml+xml,application/xml;q=0.9,"\
|
169
|
-
"image/webp,image/apng,*/*;q=0.8,application/signed-exchange;
|
176
|
+
"image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;"\
|
177
|
+
"v=b3;q=0.9"
|
170
178
|
req["Accept-Encoding"] = "gzip, deflate, br"
|
179
|
+
req["Accept-Language"] = "en-US;q=0.8,en;q=0.7"
|
171
180
|
req["Cache-Control"] = "max-age=0"
|
172
181
|
req["Connection"] = "keep-alive"
|
173
182
|
req["Origin"] = "https://documents.un.org"
|
174
183
|
req["Referer"] = "https://documents.un.org/prod/ods.nsf/home.xsp"
|
184
|
+
req["Sec-Fetch-Dest"] = "document"
|
175
185
|
req["Sec-Fetch-Mode"] = "navigate"
|
176
186
|
req["Sec-Fetch-Site"] = "same-origin"
|
177
187
|
req["Sec-Fetch-User"] = "?1"
|
@@ -34,10 +34,13 @@ module RelatonUn
|
|
34
34
|
super **args
|
35
35
|
end
|
36
36
|
|
37
|
-
# @param
|
38
|
-
# @
|
39
|
-
|
40
|
-
|
37
|
+
# @param opts [Hash]
|
38
|
+
# @option opts [Nokogiri::XML::Builder] :builder XML builder
|
39
|
+
# @option opts [Boolean] :bibdata
|
40
|
+
# @option opts [String] :lang language
|
41
|
+
# @return [String] XML
|
42
|
+
def to_xml(**opts) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity
|
43
|
+
super **opts do |b|
|
41
44
|
b.ext do
|
42
45
|
b.doctype doctype if doctype
|
43
46
|
submissionlanguage&.each { |sl| b.submissionlanguage sl }
|
@@ -51,7 +54,7 @@ module RelatonUn
|
|
51
54
|
end
|
52
55
|
|
53
56
|
# @return [Hash]
|
54
|
-
def to_hash
|
57
|
+
def to_hash # rubocop:disable Metrics/AbcSize
|
55
58
|
hash = super
|
56
59
|
if submissionlanguage&.any?
|
57
60
|
hash["submissionlanguage"] = single_element_array submissionlanguage
|
data/lib/relaton_un/version.rb
CHANGED
data/relaton_un.gemspec
CHANGED
@@ -43,7 +43,7 @@ Gem::Specification.new do |spec|
|
|
43
43
|
|
44
44
|
spec.add_dependency "faraday"
|
45
45
|
spec.add_dependency "http-cookie"
|
46
|
-
spec.add_dependency "relaton-bib", "~> 1.
|
46
|
+
spec.add_dependency "relaton-bib", "~> 1.6.0"
|
47
47
|
spec.add_dependency "unf_ext", ">= 0.0.7.7"
|
48
48
|
end
|
49
49
|
# rubocop:enable Metrics/BlockLength
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-un
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debase
|
@@ -156,14 +156,14 @@ dependencies:
|
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 1.
|
159
|
+
version: 1.6.0
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: 1.
|
166
|
+
version: 1.6.0
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: unf_ext
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -223,7 +223,7 @@ licenses:
|
|
223
223
|
metadata:
|
224
224
|
homepage_uri: https://github.com/relaton/relaton-un
|
225
225
|
source_code_uri: https://github.com/relaton/relaton-un
|
226
|
-
post_install_message:
|
226
|
+
post_install_message:
|
227
227
|
rdoc_options: []
|
228
228
|
require_paths:
|
229
229
|
- lib
|
@@ -239,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
239
239
|
version: '0'
|
240
240
|
requirements: []
|
241
241
|
rubygems_version: 3.0.6
|
242
|
-
signing_key:
|
242
|
+
signing_key:
|
243
243
|
specification_version: 4
|
244
244
|
summary: 'RelatonIso: retrieve CC Standards for bibliographic use using the IsoBibliographicItem
|
245
245
|
model'
|