relaton-calconnect 1.19.0 → 1.19.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: bd60ab3efc7281239f73f1d9ef07ff12d82700f910565143e0ef7d436f00f247
4
- data.tar.gz: '0715995eb6c988e1aeacee5c35ab35814fb372814b2d8c5cae03beb8b79caa4f'
3
+ metadata.gz: 9fcb3b4d62f90644c6d413e130c437e25fc5f79e93f4651c0c18b75afd378537
4
+ data.tar.gz: f701752957ca137ecb8cef0c69741279765b20f6a1d14f8b4cffe4de619dc682
5
5
  SHA512:
6
- metadata.gz: 7e23094e1664dc435c5fe3d429ed4c2c53a48fe0515cec37403e4a779679dcb6d3992f935f7dc05be47a8d3354a41764e18c8e9bf487d1fcd10bf15836aecfe4
7
- data.tar.gz: 1487f11339c8085668ab09624b2e891a4517250edc552e161e9a4dcf71c50165ef9cd7b0e646476efc1fe669bc591f8a3e56dd8628ab9ad8594aff2863f38d68
6
+ metadata.gz: 20192f06a9d2136cb690d2de1ae3286840fc8bb03443266f341fe27bafdda868c5223d78ceec9b11e078d15c543e02b78a59cff1575d15618cc26e4457f54d94
7
+ data.tar.gz: e110ed14e5bf719fe138e265f0da3a546db447e7d255da8a4ca3290b029336e68149c7c69d6077909b72d646b809a0fe6a215ff915c2a2a4c438e9d0dfa7d5c3
@@ -55,12 +55,17 @@ module RelatonCalconnect
55
55
  #
56
56
  # @return [Hash]
57
57
  def bib_results_filter(result, year)
58
- missed_years = []
58
+ missed_years = Set.new
59
59
  result.each do |r|
60
60
  item = r.fetch
61
61
  item.fetched = Date.today.to_s
62
62
  return { ret: item } if !year
63
63
 
64
+ /:(?<id_year>\d{4})$/ =~ r.hit[:id]
65
+ return { ret: item } if year.to_i == id_year.to_i
66
+
67
+ missed_years << id_year.to_i if id_year
68
+
64
69
  item.date.select { |d| d.type == "published" }.each do |d|
65
70
  return { ret: item } if year.to_i == d.on(:year)
66
71
 
@@ -74,9 +74,16 @@ module RelatonCalconnect
74
74
  dtps = %w[CC CSD]
75
75
  did = array(doc["docid"]).detect { |id| dtps.include? id["type"].upcase }
76
76
  did["primary"] = true if did
77
+ # date_to_hash doc
77
78
  doc
78
79
  end
79
80
 
81
+ # def date_to_hash(doc)
82
+ # return if doc["date"] || !doc["revdate"]
83
+
84
+ # doc["date"] = { "type" => "published", "on" => doc["revdate"] }
85
+ # end
86
+
80
87
  def update_links(bib, links)
81
88
  links.each do |l|
82
89
  tu = l.transform_keys(&:to_sym)
@@ -1,3 +1,3 @@
1
1
  module RelatonCalconnect
2
- VERSION = "1.19.0".freeze
2
+ VERSION = "1.19.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.19.0
4
+ version: 1.19.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: 2024-07-03 00:00:00.000000000 Z
11
+ date: 2024-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday