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 +5 -5
- data/app/controllers/effective/assets_controller.rb +2 -1
- data/app/models/effective/iframe_upload.rb +13 -0
- data/app/models/effective/snippets/effective_asset.rb +8 -4
- data/config/effective_assets.rb +1 -0
- data/db/migrate/01_create_effective_assets.rb.erb +4 -0
- data/lib/effective_assets.rb +1 -0
- data/lib/effective_assets/version.rb +1 -1
- metadata +4 -5
- data/app/models/effective/iframe_uploads.rb +0 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 259da306cae2ad7cb0016c97ede0590b1bb1cbd612cfd1e22785d9c67c106309
|
4
|
+
data.tar.gz: b91cc52f732ef79aae08033a4036128075c116bb24c8ce919815d01f47f1db0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 =
|
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
|
@@ -2,10 +2,14 @@ if defined?(EffectiveRegions)
|
|
2
2
|
module Effective
|
3
3
|
module Snippets
|
4
4
|
class EffectiveAsset < Snippet
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
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)
|
data/config/effective_assets.rb
CHANGED
@@ -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
|
data/lib/effective_assets.rb
CHANGED
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.
|
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:
|
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/
|
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
|
-
|
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
|