uc3-dmp-id 0.0.111 → 0.0.113

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: a0c720136c3acb7e0eb21577bd728380d7762d17106db062c35175844cfe52a9
4
- data.tar.gz: 0db5c1b66e2feec39866f57452d9aa4f8b6c1f8e99ecec2d4f90377a7da226e2
3
+ metadata.gz: f658015291259fab110eaf6e7cd0b370dcffa4eac8b7bea13bcfbfa64a722f6d
4
+ data.tar.gz: 04d33d78deb7de85d59f3a27ca8f6d1cae6a5e70202f37b674e195504faac04b
5
5
  SHA512:
6
- metadata.gz: 6ff78637b08069dc203c9fbfc4ee87e5b4c810175f3193b02b9506f65eef270307270bcf45e2c77777a2b3aa3a6b8e775c1781fad77b9357d7235e2d5e1e8ad5
7
- data.tar.gz: 5a784f33c4db64d19e88cd2e94b7bc81e231cd660e23e64f3688c79e9ab56eca2c2f52af0e300c52150801f803be7b90e6f256a1536c530e17165a3f00476646
6
+ metadata.gz: 4f66d927a44aba2a07057c354d3afd75eb124cb11be52716ee59afd2cbc027097e4f13f370614862e37a75f34ddbc572b597bc3532ff7cb551ad53b2d6b18317
7
+ data.tar.gz: ee1ee172ba3725d432b627412de0519d35405be9399375b21bc31355fdedc7577de9d7cb2d3474dd61154137dd28b8c60b0164d0ba9a4c41e13d0b883cdac3c0
@@ -147,13 +147,10 @@ module Uc3DmpId
147
147
 
148
148
  args = {
149
149
  index_name: 'dmphub_owner_org_gsi',
150
- query_filter: {
150
+ key_conditions: {
151
151
  dmphub_owner_org: {
152
- attribute_value_list: [
153
- "http://ror.org/#{owner_org.to_s.downcase}",
154
- "https://ror.org/#{owner_org.to_s.downcase}"
155
- ],
156
- comparison_operator: 'IN'
152
+ attribute_value_list: ["https://ror.org/#{owner_org.to_s.downcase}"],
153
+ comparison_operator: 'EQ'
157
154
  }
158
155
  },
159
156
  filter_expression: 'SK = :version',
@@ -48,13 +48,19 @@ module Uc3DmpId
48
48
 
49
49
  # Return the base URL for a DMP ID
50
50
  def dmp_id_base_url
51
- url = ENV.fetch('DMP_ID_BASE_URL', 'https://dmptool-dev.cdlib.org/dmps/')
51
+ url = ENV.fetch('DMP_ID_BASE_URL', 'https://dmphub.uc3dev.cdlib.net/dmps/')
52
+ url&.end_with?('/') ? url : "#{url}/"
53
+ end
54
+
55
+ # The landing page URL (NOT the DOI URL)
56
+ def landing_page_url
57
+ url = api_base_url.gsub('api.', '')
52
58
  url&.end_with?('/') ? url : "#{url}/"
53
59
  end
54
60
 
55
61
  # Return the base URL for the API
56
62
  def api_base_url
57
- url = ENV.fetch('DMP_ID_BASE_URL', 'https://api.dmptool-dev.cdlib.org/dmps/')
63
+ url = ENV.fetch('DMP_ID_BASE_URL', 'https://api.dmphub.uc3dev.cdlib.net/dmps/')
58
64
  url&.end_with?('/') ? url : "#{url}/"
59
65
  end
60
66
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.0.111'
4
+ VERSION = '0.0.113'
5
5
  end
@@ -76,7 +76,7 @@ module Uc3DmpId
76
76
  next if ver['modified'].nil?
77
77
  {
78
78
  timestamp: ver['modified'],
79
- url: "#{Helper.api_base_url}dmps/#{Helper.remove_pk_prefix(p_key: p_key)}?version=#{ver['modified']}"
79
+ url: "#{Helper.landing_page_url}#{Helper.remove_pk_prefix(p_key: p_key)}?version=#{ver['modified']}"
80
80
  }
81
81
  end
82
82
  json['dmp']['dmphub_versions'] = JSON.parse(versions.to_json)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uc3-dmp-id
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.111
4
+ version: 0.0.113
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-12 00:00:00.000000000 Z
11
+ date: 2023-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json