dina 0.9.1.0 → 0.9.3.0

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: 8a7b64f70c92c1d4321c50087c9f2fe9b12ef6460f97f96f5ddd0c5104df9b1f
4
- data.tar.gz: 118bdbeb9e1e04df4cf2b127b22f3601d9218e9c7c48ffc7a1e999f08bf11f9f
3
+ metadata.gz: bfef7d758b28bc4f34d911162514d1b60e6910006fc3dc5b3bb2f7161f656bd3
4
+ data.tar.gz: 4b674557b19e9062142863d152b8c0e23adcc84026b8d6da90f7c6a00e57df4a
5
5
  SHA512:
6
- metadata.gz: 64643210a89650b021eb6aee3d8918aaa266cb506ef001c702c17a0f51b59514f9febca4cc421dfd66cc6d352de3e677712867267946554040717558b2fb7a1e
7
- data.tar.gz: 5feadd20765cff3e8728db5d5d9ee53423480d6fffe3dc5c609d3c8995718fba010818b6031e3623a7e34af3b4802eaf97c9f61c17f269253e5f8b03eb31ddb0
6
+ metadata.gz: ec0c717478fc104083152e45bb55a7dec18a48c7daa3f1c58d9a2d891526a89d506277a6a18772b5c992bb8ed0e5ce095aba14cdc640712b20c5e3f8d0616d1c
7
+ data.tar.gz: 8735acc8abb2b2c8494de65602fdfd4ce3a4363b08adec86e66fdc9f730020467fbd73a21bdf73a8693da011da185beef80d89e399cfdfc3016b9ab8a250faa5
@@ -8,7 +8,11 @@ module Dina
8
8
  attr_accessor :country
9
9
  attr_accessor :recordedOn
10
10
 
11
- def initialize
11
+ def initialize(params = {})
12
+ params.each do |key, value|
13
+ setter = "#{key}="
14
+ send(setter, value) if respond_to?(setter.to_sym, false)
15
+ end
12
16
  end
13
17
 
14
18
  def to_hash
@@ -6,7 +6,11 @@ module Dina
6
6
  attr_accessor :remarks
7
7
  attr_accessor :assignedTo
8
8
 
9
- def initialize
9
+ def initialize(params = {})
10
+ params.each do |key, value|
11
+ setter = "#{key}="
12
+ send(setter, value) if respond_to?(setter.to_sym, false)
13
+ end
10
14
  end
11
15
 
12
16
  def to_hash
@@ -3,7 +3,6 @@ require_rel '../base_model'
3
3
  module Dina
4
4
  class Derivative < BaseModel
5
5
  property :id, type: :string, default: SecureRandom.uuid
6
- property :group, type: :string
7
6
  property :bucket, type: :string
8
7
  property :fileIdentifier, type: :string
9
8
  property :fileExtension, type: :string
@@ -15,8 +14,11 @@ module Dina
15
14
 
16
15
  belongs_to :ac_derived_from, shallow_path: true, class_name: "ObjectStore"
17
16
 
18
- validates_presence_of :group, message: "group is required"
19
17
  validates_presence_of :bucket, message: "bucket is required"
18
+ validates_presence_of :dcFormat, message: "dcFormat is required"
19
+ validates_presence_of :dcType, message: "dcType is required"
20
+ validates_presence_of :fileIdentifier, message: "fileIdentifier is required"
21
+ validates_presence_of :fileExtension, message: "fileExtension is required"
20
22
 
21
23
  def self.endpoint_path
22
24
  "objectstore-api/"
@@ -29,9 +31,6 @@ module Dina
29
31
  private
30
32
 
31
33
  def on_before_save
32
- if self.group && self.bucket.nil?
33
- self.bucket = self.group.downcase
34
- end
35
34
  super
36
35
  end
37
36
 
data/lib/dina/version.rb CHANGED
@@ -3,7 +3,7 @@ module Dina
3
3
 
4
4
  MAJOR = 0
5
5
  MINOR = 9
6
- PATCH = 1
6
+ PATCH = 3
7
7
  BUILD = 0
8
8
 
9
9
  def self.version
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dina
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1.0
4
+ version: 0.9.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David P. Shorthouse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-17 00:00:00.000000000 Z
11
+ date: 2023-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json_api_client