dina 0.5.6.0 → 0.5.8.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: 62273e1ca015c3dd396d3b172fbeed70a28c4643596757d90f66c633c55fce8c
4
- data.tar.gz: b7f144bf00746282effeb0fe051311d1cad137ba50723423b21d282ce64f73fe
3
+ metadata.gz: 20d2d7fda55f26506af8e5dd5816b24ef98de6e953eaa641401b3477792d5d77
4
+ data.tar.gz: 9320f715b7a0bf19b0ab109c6983ba224d376e0fc5944d85d36ecd566e928777
5
5
  SHA512:
6
- metadata.gz: b46857817cc32098431b2f26968fed5c1114abd1f7d5c73ad2b0f6712391f3c68aa8b1dc119f3d6738dccfbf650c027fbd269108837c6cc460211769265859a2
7
- data.tar.gz: 49450a8abbb6797d7be3ff0f0d63d1359c61fa1c983898fe39e6644fbbfe70a3d7ee85aad2403f7f05d5d2251e714f5bc55174aa32d333e51514e2ee3e2ec15d
6
+ metadata.gz: 50efcc1f8be5988f7fcb31419dab52dbe77810f26157413bcd40c38b09b72985751af4b6250189562277f35c023203fbad5339adfe63882537c7a14d5112cb2a
7
+ data.tar.gz: b0ddd982984ee09680c7fa1dce3c59d230d51f394b0e05aa8bbf743f89bbb6f974189001f3660d7e3d1d32107ddf1a270f6baa97d9c79f18c88f39927ca32efd
@@ -1,14 +1,23 @@
1
1
  module Dina
2
- class File
2
+ class File < BaseModel
3
3
  attr_accessor :file_path, :group, :is_derivative, :id
4
4
 
5
+ def self.verify_ssl
6
+ begin
7
+ connection_options[:ssl][:verify]
8
+ rescue
9
+ true
10
+ end
11
+ end
12
+
5
13
  def self.find(group:, id:)
6
14
  obj = self.new
7
15
  obj.group = group
8
16
  RestClient::Request.execute(
9
17
  method: :get,
10
18
  headers: { authorization: Dina::Authentication.header },
11
- url: obj.url + "/#{id}"
19
+ url: obj.url + "/#{id}",
20
+ verify_ssl: verify_ssl
12
21
  )
13
22
  end
14
23
 
@@ -44,7 +53,8 @@ module Dina
44
53
  payload: {
45
54
  multipart: true,
46
55
  file: file
47
- }
56
+ },
57
+ verify_ssl: self.class.verify_ssl
48
58
  )
49
59
  json = JSON.parse(response, symbolize_names: true)
50
60
  self.id = json[:uuid]
@@ -1,5 +1,13 @@
1
1
  module Dina
2
- class BaseSearch
2
+ class BaseSearch < BaseModel
3
+
4
+ def self.verify_ssl
5
+ begin
6
+ connection_options[:ssl][:verify]
7
+ rescue
8
+ true
9
+ end
10
+ end
3
11
 
4
12
  def self.endpoint
5
13
  Dina::Authentication.endpoint_url
@@ -36,7 +44,8 @@ module Dina
36
44
  accept: 'application/json',
37
45
  content_type: 'application/json',
38
46
  authorization: Dina::Authentication.header
39
- }
47
+ },
48
+ verify_ssl: verify_ssl
40
49
  )
41
50
  JSON.parse(response, symbolize_names: true)
42
51
  rescue RestClient::ExceptionWithResponse => e
data/lib/dina/version.rb CHANGED
@@ -3,7 +3,7 @@ module Dina
3
3
 
4
4
  MAJOR = 0
5
5
  MINOR = 5
6
- PATCH = 6
6
+ PATCH = 8
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.5.6.0
4
+ version: 0.5.8.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: 2022-12-14 00:00:00.000000000 Z
11
+ date: 2022-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json_api_client