dina 3.3.9.0 → 3.4.1.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4d7d02f3d46efd109b725e72885d423d9f856952971f569fce70f882b13ac4c4
|
|
4
|
+
data.tar.gz: ccb58a9e1353946873453c93647d213f9ccbae9812f8a497b20ef4d3e23ea8ab
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9d52d986fe812c0c03dc23ca7803423b23746fee0266648bd0bce46d2f234115587819ef53f61fc5b0e46554ee227c063fba5de45a62fe7c0170094f05c7deed
|
|
7
|
+
data.tar.gz: 77442f6772e76e76d8158d427a82988eabfb2e77e825798ddcec65f8a0908bf9ad4eea0d5e1e155907f3fbf83d3b074ae62670e1f6674bc21414bf45b8aa4fab
|
|
@@ -6,6 +6,7 @@ module Dina
|
|
|
6
6
|
property :version, type: :integer
|
|
7
7
|
property :dwcCatalogNumber, type: :string
|
|
8
8
|
property :materialSampleName, type: :string
|
|
9
|
+
property :identifiers, type: :hash
|
|
9
10
|
property :materialSampleType, type: :string
|
|
10
11
|
property :createdBy, type: :string
|
|
11
12
|
property :createdOn, type: :time
|
|
@@ -42,6 +43,7 @@ module Dina
|
|
|
42
43
|
property :targetOrganismPrimaryScientificName, type: :string
|
|
43
44
|
property :allowDuplicateName, type: :boolean
|
|
44
45
|
|
|
46
|
+
|
|
45
47
|
has_one :collectingEvent, class_name: "CollectingEvent"
|
|
46
48
|
has_one :collection, class_name: "Collection"
|
|
47
49
|
has_one :preparationType, class_name: "PreparationType"
|
|
@@ -16,6 +16,7 @@ module Dina
|
|
|
16
16
|
property :fileName, type: :string
|
|
17
17
|
property :dcFormat, type: :string
|
|
18
18
|
property :isDerivative, type: :boolean
|
|
19
|
+
property :dateTimeDigitized, type: :time
|
|
19
20
|
|
|
20
21
|
validates_presence_of :group, message: "group is required"
|
|
21
22
|
validates_presence_of :filePath, message: "filePath is required"
|
|
@@ -17,8 +17,16 @@ module Dina
|
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
def run(request_method, path, params: nil, headers: {}, body: nil)
|
|
20
|
+
uuid_regex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/
|
|
21
|
+
slug = path[5..].dup
|
|
20
22
|
|
|
21
|
-
if request_method == :get &&
|
|
23
|
+
if request_method == :get && uuid_regex.match?(slug.to_s.downcase)
|
|
24
|
+
path = "object-upload/#{slug}"
|
|
25
|
+
headers[:content_type] = "application/json"
|
|
26
|
+
response = @faraday.run_request(request_method, path, body, headers) do |request|
|
|
27
|
+
end
|
|
28
|
+
response
|
|
29
|
+
elsif request_method == :get && path == "file/download"
|
|
22
30
|
path = "file" + "/#{params[:group].downcase}/#{params[:fileIdentifier]}"
|
|
23
31
|
if params[:isDerivative]
|
|
24
32
|
path = "file" + "/#{params[:group].downcase}/derivative/#{params[:fileIdentifier]}"
|
data/lib/dina/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dina
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.4.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David P. Shorthouse
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-04
|
|
12
|
+
date: 2026-05-04 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: json_api_client
|