effective_assets 1.10.1 → 1.11.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
- SHA1:
3
- metadata.gz: ff3438f4d766dbf9a2056efc8dda66a2e9886020
4
- data.tar.gz: 20e9db275e13ee015cc259f6e8d320c39eb85c54
2
+ SHA256:
3
+ metadata.gz: 259da306cae2ad7cb0016c97ede0590b1bb1cbd612cfd1e22785d9c67c106309
4
+ data.tar.gz: b91cc52f732ef79aae08033a4036128075c116bb24c8ce919815d01f47f1db0f
5
5
  SHA512:
6
- metadata.gz: 85b474c79b5611b8a13d11cb64437b46567b0e6fb05429c4b08625d097b302a7f9861bbcfc97b9144510ad279f8e39883abfa8caf18e5573f009c94376c23027
7
- data.tar.gz: 62cbcd5938962816f1cdd6bcbba9a437a969babebef7183203e24e42b5a145d371518057b7d284a445ce1a30ef533350bfa0d5feee1adea7360f888c2c74435d
6
+ metadata.gz: e3ea04ae3523163153546607ddbf184d2b6897b620f09d115fae21b519858d4ca4ac2bd0d436ac63ebf71af7fe5319af59fce05f6095b776fc9dd24bb5979d60
7
+ data.tar.gz: 2b58a23dc835673c47f110ffa675689c4330cae7899d78d4713deea01141e0bc71db0028d6ee0db93b85333e7e8f006cc0cb474f5a2786c5cfb29119a049d0ae
@@ -21,7 +21,8 @@ module Effective
21
21
  @aws_acl = EffectiveAssets.aws_acl
22
22
  end
23
23
 
24
- @user_uploads = IframeUploads.new(@assets)
24
+ @user_uploads = IframeUpload.new(@assets)
25
+ @user_uploads.add_to_asset_box(:uploads, @assets)
25
26
 
26
27
  render :file => 'effective/assets/iframe'
27
28
  end
@@ -0,0 +1,13 @@
1
+ # This is a class used for the IFrame views
2
+
3
+ module Effective
4
+ class IframeUpload < ActiveRecord::Base
5
+ acts_as_asset_box :uploads
6
+
7
+ def initialize(items = nil)
8
+ super()
9
+ add_to_asset_box(:uploads, items)
10
+ end
11
+
12
+ end
13
+ end
@@ -2,10 +2,14 @@ if defined?(EffectiveRegions)
2
2
  module Effective
3
3
  module Snippets
4
4
  class EffectiveAsset < Snippet
5
- attribute :asset_id, Integer
6
- attribute :html_class, String
7
- attribute :link_title, String
8
- attribute :private_url, Boolean
5
+ # attr_accessor :asset_id #, Integer
6
+ # attr_accessor :html_class #, String
7
+ # attr_accessor :link_title #, String
8
+ # attr_accessor :private_url # , Boolean
9
+
10
+ def snippet_attributes
11
+ super + [:asset_id, :html_class, :link_title, :private_url]
12
+ end
9
13
 
10
14
  def asset
11
15
  @asset ||= (Effective::Asset.where(:id => asset_id).first if asset_id)
@@ -1,6 +1,7 @@
1
1
  EffectiveAssets.setup do |config|
2
2
  config.assets_table_name = :assets
3
3
  config.attachments_table_name = :attachments
4
+ config.iframe_uploads_table_name = :iframe_uploads
4
5
 
5
6
  config.uploader = 'AssetUploader' # Must extend from EffectiveAssetsUploader
6
7
 
@@ -31,6 +31,10 @@ class CreateEffectiveAssets < ActiveRecord::Migration[4.2]
31
31
  t.string :box
32
32
  end
33
33
 
34
+ create_table <%= @iframe_uploads_table_name %> do |t|
35
+ t.timestamps
36
+ end
37
+
34
38
  add_index <%= @attachments_table_name %>, :asset_id
35
39
  add_index <%= @attachments_table_name %>, [:attachable_type, :attachable_id]
36
40
  add_index <%= @attachments_table_name %>, :attachable_id
@@ -11,6 +11,7 @@ module EffectiveAssets
11
11
  # The following are all valid config keys
12
12
  mattr_accessor :assets_table_name
13
13
  mattr_accessor :attachments_table_name
14
+ mattr_accessor :iframe_uploads_table_name
14
15
 
15
16
  mattr_accessor :uploader
16
17
  mattr_accessor :async
@@ -1,3 +1,3 @@
1
1
  module EffectiveAssets
2
- VERSION = '1.10.1'.freeze
2
+ VERSION = '1.11.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.1
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-14 00:00:00.000000000 Z
11
+ date: 2019-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -170,7 +170,7 @@ files:
170
170
  - app/models/effective/access_denied.rb
171
171
  - app/models/effective/asset.rb
172
172
  - app/models/effective/attachment.rb
173
- - app/models/effective/iframe_uploads.rb
173
+ - app/models/effective/iframe_upload.rb
174
174
  - app/models/effective/snippets/effective_asset.rb
175
175
  - app/models/inputs/asset_box.rb
176
176
  - app/models/inputs/asset_box_form_input.rb
@@ -221,8 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
221
221
  - !ruby/object:Gem::Version
222
222
  version: '0'
223
223
  requirements: []
224
- rubyforge_project:
225
- rubygems_version: 2.4.5.1
224
+ rubygems_version: 3.0.3
226
225
  signing_key:
227
226
  specification_version: 4
228
227
  summary: Upload images and files directly to AWS S3 with a custom form input then
@@ -1,27 +0,0 @@
1
- # This is a class used for the IFrame views
2
-
3
- module Effective
4
- class IframeUploads < ActiveRecord::Base
5
- acts_as_asset_box :uploads
6
-
7
- def initialize(items = nil)
8
- super()
9
- @column_types = {}
10
-
11
- add_to_asset_box(:uploads, items)
12
- end
13
-
14
- def self.columns
15
- @columns ||= []
16
- end
17
-
18
- def self.column_defaults
19
- {}
20
- end
21
-
22
- def self.has_attribute?(*args)
23
- false
24
- end
25
-
26
- end
27
- end