dina 1.0.1.0 → 1.0.3.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 +7 -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: '05538ff29d2c67a83c4782cb3d4c96578efea6c1501e94206014f6551eca7b3e'
|
4
|
+
data.tar.gz: 6cfc56ad5e21d3ce960c924fd497f5d19cd2e5a8f6117a58dd88dfa07d411177
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ae4986a7e3b4b14e7bc4ce1ba86442898b07cd12b6c5bb3afef8f7c03dda7adb7e4b0318564fa8721581ed5826fa74386620b5d522b1964518399374e6e173e
|
7
|
+
data.tar.gz: 82b4f74568ead6e68c6c6eef560b7a4f104bde2007309c1975f3d728e91809736a99795ce939865b728b87fa796e0a60894b02a0f621876829cb8801ea6c309a
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Dina
|
2
2
|
class File < BaseModel
|
3
|
-
attr_accessor :id, :file_path, :group, :is_derivative
|
3
|
+
attr_accessor :id, :file_path, :filename, :group, :is_derivative
|
4
4
|
|
5
5
|
def self.verify_ssl
|
6
6
|
begin
|
@@ -32,6 +32,7 @@ module Dina
|
|
32
32
|
@group = attributes[:group] || nil
|
33
33
|
@is_derivative = attributes[:is_derivative] || false
|
34
34
|
@file_path = attributes[:file_path] || nil
|
35
|
+
@filename = attributes[:filename] || File.basename(@file_path) rescue nil
|
35
36
|
end
|
36
37
|
|
37
38
|
def endpoint
|
@@ -51,7 +52,11 @@ module Dina
|
|
51
52
|
end
|
52
53
|
|
53
54
|
def file
|
54
|
-
::File.new(file_path)
|
55
|
+
new_file = ::File.new(file_path)
|
56
|
+
new_file.define_singleton_method(:original_filename) do
|
57
|
+
filename
|
58
|
+
end
|
59
|
+
new_file
|
55
60
|
end
|
56
61
|
|
57
62
|
def save
|
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: 1.0.
|
4
|
+
version: 1.0.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-06-
|
11
|
+
date: 2023-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json_api_client
|