effective_assets 1.9.3 → 1.9.4
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/app/models/effective/asset.rb +16 -2
- data/lib/effective_assets/version.rb +1 -1
- metadata +1 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 56e9391eeed760a355bd84613a40c4a12affb3c9
         | 
| 4 | 
            +
              data.tar.gz: 132a6b5b71a5e8acaab4159f224ec0f86ec705f9
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 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
         |