remote_files 3.2.0 → 3.3.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: e90fdccfe48d4c170a693ef51fff589f038c2cf3afa92467c9727e9d6c9ba70f
4
- data.tar.gz: a4058dab1a1db6b9267e20cf3d740dc8cebf1f64787df5cfe9851bd15a90216c
3
+ metadata.gz: f2bdd40ed1be30e3649f6089e603134e8cbc4bf8445d8b355f769b4ce29c2b25
4
+ data.tar.gz: 9a4d13593c4022eff78130eaf61d61e83a6bd8cfaae164636dfd81fca95fd7d2
5
5
  SHA512:
6
- metadata.gz: b8b914ddfb7dd0b129e9f73cc09fd864cb0f27242b630fc93a3e581454ab588ce08efd1be4bb41359fa5380ed0f289ec08d98a9d7937cdb91e3f19d90eaf3374
7
- data.tar.gz: 932b45360d8139742d8389c876628f19b89d42a8aa786a964e424a4cc8399beccdd256e420d8e27afc367ea3c5887931f458c888f6129f3c85ba9d057e45bdc3
6
+ metadata.gz: 648b24549307387c950a8ef5f72b0df42f6274eb53889b8c207e0aaba40618bbe1d1bbb43192baf6b037d43c885d492739994ee204a4e65e041321c4640e5d92
7
+ data.tar.gz: 8ad800c0ddd17a85e4631d6b38e960287c278127b88ec349cb2df890e37442e3fba4239e1219b6b54d66b6cebaf328bb92571607a6e3fd9817e2ef0dbc0ee7c0
@@ -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
@@ -1,3 +1,3 @@
1
1
  module RemoteFiles
2
- VERSION = '3.2.0'
2
+ VERSION = '3.3.0'
3
3
  end
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.2.0
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-15 00:00:00.000000000 Z
11
+ date: 2022-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog-aws