dina 0.5.6.0 → 0.5.7.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: 62273e1ca015c3dd396d3b172fbeed70a28c4643596757d90f66c633c55fce8c
4
- data.tar.gz: b7f144bf00746282effeb0fe051311d1cad137ba50723423b21d282ce64f73fe
3
+ metadata.gz: 4999fc970acb56ad2c4dcacb27124741d65c91b9dc00f13267b6da0f756ee3a9
4
+ data.tar.gz: 461e2ca77f1b4f4e7a675e42fc5f81008e967222211fb7ea4b0aa8435f869700
5
5
  SHA512:
6
- metadata.gz: b46857817cc32098431b2f26968fed5c1114abd1f7d5c73ad2b0f6712391f3c68aa8b1dc119f3d6738dccfbf650c027fbd269108837c6cc460211769265859a2
7
- data.tar.gz: 49450a8abbb6797d7be3ff0f0d63d1359c61fa1c983898fe39e6644fbbfe70a3d7ee85aad2403f7f05d5d2251e714f5bc55174aa32d333e51514e2ee3e2ec15d
6
+ metadata.gz: 2b3573481c0cfffd4fca4f32f8ff521ad357e7eb63598fc3d6ce77441d3a154c1b69bb382ef8473a0ce5525c8268042e4fd936bd203bc7970c720da320aba1b6
7
+ data.tar.gz: eabb87d0e292a17a4cd1769757c5de8e0862e3fc23aaeb81dcb1d3d5613f211e5937d42eddef28098872e195d8814431de9b33771e972ac6e5ab0a58e42ab84b
@@ -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]
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 = 7
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.7.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-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json_api_client