dina 0.5.6.0 → 0.5.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dina/models/object_store/file.rb +13 -3
- data/lib/dina/search/base_search.rb +11 -2
- data/lib/dina/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20d2d7fda55f26506af8e5dd5816b24ef98de6e953eaa641401b3477792d5d77
|
4
|
+
data.tar.gz: 9320f715b7a0bf19b0ab109c6983ba224d376e0fc5944d85d36ecd566e928777
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
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.
|
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-
|
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
|