relaton-calconnect 1.13.0 → 1.13.1

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: 5f242baa5fa9ecaaf7eb286c78ea9915588c97a43ce6658c2fe79ac09290dc37
4
- data.tar.gz: 86cc1fc1b794e59b43d256b124759dd79694dcb864bbe275e5acc78203958626
3
+ metadata.gz: 472e2e5fa6688de1b2437d22f1ec7cbe720bbfa3f15020083b9667f5cf153863
4
+ data.tar.gz: ee3ea9b65ba53b75aae4fb92b83b147869ea639eed7dddf6b95ddf97fb5bc1a8
5
5
  SHA512:
6
- metadata.gz: 02ec85d64e4a2aa8950e5b6426b39ac49c536bf5b1b566417827a700a847ce641ae31abe314d094c631c5b979a02bd57755e7d2512066c865f8e38b8fc5e0a4b
7
- data.tar.gz: 50b982b4c84673750d5c2b2a243122bc4d1659ca7fd8db6792837e565a2dbb6690f8d42c6da8115c412c894a7cb93dd8e119394f94937b08298209814abc63fe
6
+ metadata.gz: fe3271ea3e47ee2d29b39961062c5c85a9604ed0e5af2ec66240abdeb18233e96d4facfea08ab94bcbae31acb015361b280286dfaf82bc4903efea8b023ef824
7
+ data.tar.gz: 5c284c28bc437bcd77cdf26c1001e12b491e903c810806ac9c207c07093ea1498ca3fad08ba290c11cfc563babc357f46ae21254d985c898615a6a5f1eb43589
@@ -0,0 +1,22 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
+ name: release
4
+
5
+ on:
6
+ workflow_dispatch:
7
+ inputs:
8
+ next_version:
9
+ description: |
10
+ Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
11
+ required: true
12
+ default: 'skip'
13
+ push:
14
+ tags: [ v* ]
15
+
16
+ jobs:
17
+ release:
18
+ uses: relaton/support/.github/workflows/release.yml@master
19
+ with:
20
+ next_version: ${{ github.event.inputs.next_version }}
21
+ secrets:
22
+ rubygems-api-key: ${{ secrets.RELATON_CI_RUBYGEMS_API_KEY }}
@@ -5,8 +5,13 @@ module RelatonCalconnect
5
5
  # DOMAIN = "http://127.0.0.1:4000/".freeze
6
6
 
7
7
  class << self
8
- # papam hit [Hash]
9
- # @return [RelatonOgc::OrcBibliographicItem]
8
+ #
9
+ # Parse document page
10
+ #
11
+ # @papam hit [Hash] document hash
12
+ #
13
+ # @return [RelatonCalconnect::CcBibliographicItem] bibliographic item
14
+ #
10
15
  def parse_page(hit) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
11
16
  links = array(hit["link"])
12
17
  link = links.detect { |l| l["type"] == "rxl" }
@@ -15,6 +20,7 @@ module RelatonCalconnect
15
20
  update_links bib, links
16
21
  # XMLParser.from_xml bib_xml
17
22
  else
23
+ hit.delete "fetched"
18
24
  bib = RelatonCalconnect::CcBibliographicItem.from_hash doc_to_hash hit
19
25
  end
20
26
  bib.link.each do |l|
@@ -25,8 +31,13 @@ module RelatonCalconnect
25
31
 
26
32
  private
27
33
 
28
- # @param url [String]
29
- # @return [String] XML
34
+ #
35
+ # Fetch bibliographic item from XML source
36
+ #
37
+ # @param url [String] URL to fetch
38
+ #
39
+ # @return [RelatonCalconnect::CcBibliographicItem] bibliographic item
40
+ #
30
41
  def fetch_bib_xml(url) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
31
42
  rxl = get_rxl url
32
43
  uri_rxl = rxl.at("uri[@type='rxl']")
@@ -61,7 +72,8 @@ module RelatonCalconnect
61
72
  eg.merge!(tc) if tc
62
73
  end
63
74
  dtps = %w[CC CSD]
64
- array(doc["docid"]).detect { |id| dtps.include? id["type"].upcase }["primary"] = true
75
+ did = array(doc["docid"]).detect { |id| dtps.include? id["type"].upcase }
76
+ did["primary"] = true if did
65
77
  doc
66
78
  end
67
79
 
@@ -1,3 +1,3 @@
1
1
  module RelatonCalconnect
2
- VERSION = "1.13.0".freeze
2
+ VERSION = "1.13.1".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-calconnect
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.0
4
+ version: 1.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-21 00:00:00.000000000 Z
11
+ date: 2022-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equivalent-xml
@@ -145,6 +145,7 @@ extensions: []
145
145
  extra_rdoc_files: []
146
146
  files:
147
147
  - ".github/workflows/rake.yml"
148
+ - ".github/workflows/release.yml"
148
149
  - ".gitignore"
149
150
  - ".rspec"
150
151
  - ".rubocop.yml"