dina 1.0.1.0 → 1.0.3.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: 2d2a097b00eeb5c7b3c635dd0d51aa07522184b1450fd236f04d0fe24f31c327
4
- data.tar.gz: b02dddb19f47c77135c2adc1e14c58438c8f68deebd3bde2090af43f14ae7a72
3
+ metadata.gz: '05538ff29d2c67a83c4782cb3d4c96578efea6c1501e94206014f6551eca7b3e'
4
+ data.tar.gz: 6cfc56ad5e21d3ce960c924fd497f5d19cd2e5a8f6117a58dd88dfa07d411177
5
5
  SHA512:
6
- metadata.gz: d27f56063e50804ded7c43c3a67a0cce731c5473857e0e075f21892204ac8acbf266eae22fae093c90b665b31c263a27532d4316c00451f5d27c2212c344a1ec
7
- data.tar.gz: b22951760cf2a7e3d6c4a3bf13a036d6430d514030ae25aa9ec8bca1b8aa6e4d003da75dcd7462b554c1306cc6a4c7ec83140ef2a2234f963fcb4bbcd6e0c017
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
@@ -3,7 +3,7 @@ module Dina
3
3
 
4
4
  MAJOR = 1
5
5
  MINOR = 0
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: 1.0.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-08 00:00:00.000000000 Z
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