remote_files 3.2.0 → 3.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 +4 -4
- data/lib/remote_files/file.rb +7 -3
- data/lib/remote_files/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: f2bdd40ed1be30e3649f6089e603134e8cbc4bf8445d8b355f769b4ce29c2b25
|
4
|
+
data.tar.gz: 9a4d13593c4022eff78130eaf61d61e83a6bd8cfaae164636dfd81fca95fd7d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 648b24549307387c950a8ef5f72b0df42f6274eb53889b8c207e0aaba40618bbe1d1bbb43192baf6b037d43c885d492739994ee204a4e65e041321c4640e5d92
|
7
|
+
data.tar.gz: 8ad800c0ddd17a85e4631d6b38e960287c278127b88ec349cb2df890e37442e3fba4239e1219b6b54d66b6cebaf328bb92571607a6e3fd9817e2ef0dbc0ee7c0
|
data/lib/remote_files/file.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
module RemoteFiles
|
2
2
|
class File
|
3
|
-
attr_reader :content, :content_type, :identifier, :stored_in, :configuration
|
3
|
+
attr_reader :content, :content_type, :identifier, :stored_in, :configuration, :populate_stored_in
|
4
4
|
|
5
5
|
def initialize(identifier, options = {})
|
6
|
-
known_keys = [:identifier, :stored_in, :content_type, :configuration, :content]
|
6
|
+
known_keys = [:identifier, :stored_in, :content_type, :configuration, :content, :populate_stored_in]
|
7
7
|
known_keys.each do |key|
|
8
8
|
options[key] ||= options.delete(key.to_s)
|
9
9
|
end
|
@@ -14,6 +14,7 @@ module RemoteFiles
|
|
14
14
|
@content_type = options[:content_type]
|
15
15
|
@configuration = RemoteFiles::CONFIGURATIONS[(options[:configuration] || :default).to_sym]
|
16
16
|
@logger = options[:logger]
|
17
|
+
@populate_stored_in = options[:populate_stored_in]
|
17
18
|
@options = options
|
18
19
|
end
|
19
20
|
|
@@ -34,7 +35,8 @@ module RemoteFiles
|
|
34
35
|
:identifier => identifier,
|
35
36
|
:stored_in => stored_in,
|
36
37
|
:content_type => content_type,
|
37
|
-
:configuration => configuration.name
|
38
|
+
:configuration => configuration.name,
|
39
|
+
:populate_stored_in => populate_stored_in
|
38
40
|
)
|
39
41
|
end
|
40
42
|
|
@@ -79,6 +81,8 @@ module RemoteFiles
|
|
79
81
|
next unless file
|
80
82
|
@content = file.content
|
81
83
|
@content_type = file.content_type
|
84
|
+
# :populate_stored_in is a boolean
|
85
|
+
@stored_in = file.stored_in if @populate_stored_in
|
82
86
|
return true
|
83
87
|
rescue Error => e
|
84
88
|
end
|
data/lib/remote_files/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: remote_files
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mick Staugaard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03
|
11
|
+
date: 2022-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog-aws
|