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: abd7f25ac94c235c02846331454cae5895aa4449544a9f12818dfaa5dc148575
4
- data.tar.gz: 0151021f874514e90385b8bc2a2113e5acdaa7742a4af3c8d92afb13d1e95e09
3
+ metadata.gz: 4d7d02f3d46efd109b725e72885d423d9f856952971f569fce70f882b13ac4c4
4
+ data.tar.gz: ccb58a9e1353946873453c93647d213f9ccbae9812f8a497b20ef4d3e23ea8ab
5
5
  SHA512:
6
- metadata.gz: deb986c1621da976754e4d127b6dcd3a24460fa0be1d2a970980fe802fceaad4faa0383c6e3346f51c0e4a593d918bc4b8a7d3a57628fc63b9955d6e84bec4d3
7
- data.tar.gz: ba391acb5d9a626b532ffe347605e045cf818d8c4bb099f1739a555669802b724827cfce1a5eb876d4c6348887bba02379aeb6daaa4f79ea83cb66429edd64ba
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 && path == "file/download"
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
@@ -2,8 +2,8 @@ module Dina
2
2
  class Version
3
3
 
4
4
  MAJOR = 3
5
- MINOR = 3
6
- PATCH = 9
5
+ MINOR = 4
6
+ PATCH = 1
7
7
  BUILD = 0
8
8
 
9
9
  def self.version
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.3.9.0
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-28 00:00:00.000000000 Z
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