effective_assets 1.9.3 → 1.9.4

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
  SHA1:
3
- metadata.gz: de50de960170c291dc68a6ed080085e7fe94b7c3
4
- data.tar.gz: 604c94ab2c3b532ee4cefe65dd4d74477c99d0cd
3
+ metadata.gz: 56e9391eeed760a355bd84613a40c4a12affb3c9
4
+ data.tar.gz: 132a6b5b71a5e8acaab4159f224ec0f86ec705f9
5
5
  SHA512:
6
- metadata.gz: 5556bd6ec9b1d637b6a26e2e0d4570dcfd2b6500036cc674a977bd273a748b08b4b817597e986f164ad0d3c264cd4a57e9ec2306fad937c7eb5fcf1fb701ce38
7
- data.tar.gz: 3c98e8f97e9fd3af581bd7587dde513455dc14851187131ada2486eb89188e2e1a366c3f33393e86a2e7bdeda6bdf860b89b0abc73431529bf8cdc3fef96d01c
6
+ metadata.gz: f09f7b738e5dfd50f728ad08b7d8a4c5e83c37c68d5139400963b206f5e60b25991e9d603f9bc64ded3ef27387a01071ae43ee2a3ca8c20139f1d711f6177272
7
+ data.tar.gz: 78bd86d0afa6a818cab1fea90da212beb5ecfb4a4a56635d2bc4a317090a0d2c9e608973643426f9e721ffe805db6854609d4c908eb40eb55debfe8c8f10902f
@@ -184,8 +184,6 @@ module Effective
184
184
  self[:versions_info] || {}
185
185
  end
186
186
 
187
-
188
-
189
187
  # This method is called asynchronously by an after_commit filter
190
188
  def process!
191
189
  if placeholder?
@@ -217,6 +215,22 @@ module Effective
217
215
  end
218
216
  alias_method :reprocess!, :process!
219
217
 
218
+ # This will set the AWS permission to aws_acl
219
+ def sync_aws_acl!
220
+ if aws_acl == EffectiveAssets::AWS_PRIVATE
221
+ if Net::HTTP.get_response(URI(public_url)).code.to_i != 403 # Forbidden
222
+ self.remote_data_url = public_url
223
+ save!
224
+ end
225
+ else
226
+ # Make sure I can access it at the public url
227
+ if Net::HTTP.get_response(URI(public_url)).code.to_i != 200 # Success
228
+ self.remote_data_url = authenticated_url
229
+ save!
230
+ end
231
+ end
232
+ end
233
+
220
234
  protected
221
235
 
222
236
  def set_content_type
@@ -1,3 +1,3 @@
1
1
  module EffectiveAssets
2
- VERSION = '1.9.3'.freeze
2
+ VERSION = '1.9.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.3
4
+ version: 1.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect