effective_assets 0.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +1 -1
- data/README.md +341 -72
- data/app/assets/javascripts/effective/snippets/effective_asset.js.coffee +53 -0
- data/app/assets/javascripts/effective_assets.js +4 -0
- data/app/assets/javascripts/effective_assets/asset_box.js.coffee +36 -0
- data/app/assets/javascripts/effective_assets/asset_box_dialog.js.coffee +49 -0
- data/app/assets/javascripts/effective_assets/asset_box_drag_and_drop.js.coffee +2 -0
- data/app/assets/javascripts/effective_assets/asset_box_filtering.js.coffee +16 -0
- data/app/assets/javascripts/effective_assets/asset_box_sorting.js.coffee +8 -0
- data/app/assets/javascripts/effective_assets/jquery_ui_sortable.js +813 -585
- data/app/assets/javascripts/effective_assets/s3_uploader.js.coffee +268 -0
- data/app/assets/javascripts/effective_assets_iframe.js.coffee +28 -0
- data/app/assets/stylesheets/active_admin/effective_assets.css.scss +57 -0
- data/app/assets/stylesheets/effective_assets/_asset_box_input.scss +54 -175
- data/app/assets/stylesheets/effective_assets/_iframe_bootstrap.scss +1714 -0
- data/app/assets/stylesheets/effective_assets/_input_bootstrap.scss +508 -0
- data/app/assets/stylesheets/effective_assets_iframe.css.scss +23 -0
- data/app/controllers/effective/assets_controller.rb +41 -0
- data/app/controllers/effective/s3_uploads_controller.rb +58 -74
- data/app/helpers/effective_assets_helper.rb +30 -14
- data/app/helpers/effective_assets_s3_helper.rb +69 -0
- data/app/models/concerns/acts_as_asset_box.rb +75 -11
- data/app/models/effective/access_denied.rb +17 -0
- data/app/models/effective/asset.rb +130 -93
- data/app/models/effective/attachment.rb +2 -7
- data/app/models/effective/delayed_job.rb +33 -78
- data/app/models/effective/snippets/effective_asset.rb +19 -0
- data/app/models/effective/user_uploads.rb +19 -0
- data/app/models/inputs/asset_box.rb +154 -0
- data/app/models/inputs/asset_box_form_input.rb +7 -0
- data/app/models/inputs/asset_box_formtastic_input.rb +9 -0
- data/app/models/inputs/asset_box_input.rb +13 -82
- data/app/models/inputs/asset_box_simple_form_input.rb +7 -0
- data/app/uploaders/effective_assets_uploader.rb +14 -2
- data/app/uploaders/{asset_uploader.rb → test_asset_uploader.rb} +1 -1
- data/app/views/active_admin/effective_assets/_edit.html.haml +3 -3
- data/app/views/active_admin/effective_assets/_new.html.haml +2 -1
- data/app/views/asset_box_input/_attachment_as_list.html.haml +17 -0
- data/app/views/asset_box_input/_attachment_as_table.html.haml +32 -0
- data/app/views/asset_box_input/_attachment_as_thumbnail.html.haml +20 -0
- data/app/views/asset_box_input/_dialog.html.haml +18 -0
- data/app/views/asset_box_input/_progress_bar_template.html.haml +8 -0
- data/app/views/asset_box_input/_uploader.html.haml +21 -115
- data/app/views/effective/assets/iframe.html.haml +17 -0
- data/app/views/effective/snippets/_effective_asset.html.haml +8 -0
- data/config/routes.rb +8 -2
- data/db/migrate/01_create_effective_assets.rb.erb +3 -0
- data/lib/effective_assets.rb +34 -3
- data/lib/effective_assets/engine.rb +11 -8
- data/lib/effective_assets/version.rb +1 -1
- data/lib/generators/templates/asset_uploader.rb +35 -0
- data/lib/generators/templates/effective_assets.rb +31 -4
- data/lib/tasks/effective_assets_tasks.rake +115 -4
- data/spec/internal/config/database.yml +3 -0
- data/spec/internal/config/initializers/effective_assets.rb +18 -0
- data/spec/internal/config/routes.rb +3 -0
- data/spec/internal/db/combustion_test.sqlite +0 -0
- data/spec/internal/db/schema.rb +52 -0
- data/spec/internal/log/test.log +793 -0
- data/spec/{dummy → internal}/public/favicon.ico +0 -0
- data/spec/internal/public/sprites.png +0 -0
- data/spec/models/asset_spec.rb +119 -35
- data/spec/spec_helper.rb +9 -3
- metadata +95 -234
- data/app/assets/images/effective_assets/s3_down_button.gif +0 -0
- data/app/assets/images/effective_assets/s3_over_button.gif +0 -0
- data/app/assets/images/effective_assets/s3_up_button.gif +0 -0
- data/app/assets/images/effective_assets/s3_upload.swf +0 -0
- data/app/assets/javascripts/effective_assets/asset_box_input.js.coffee +0 -71
- data/app/assets/javascripts/effective_assets/asset_box_uploader.js +0 -122
- data/app/assets/javascripts/effective_assets/asset_box_uploader_customization.js +0 -166
- data/app/controllers/effective/attachments_controller.rb +0 -14
- data/app/views/asset_box_input/_attachment_fields.html.haml +0 -14
- data/spec/dummy/README.rdoc +0 -261
- data/spec/dummy/Rakefile +0 -7
- data/spec/dummy/app/assets/javascripts/application.js +0 -15
- data/spec/dummy/app/assets/stylesheets/application.css +0 -13
- data/spec/dummy/app/controllers/application_controller.rb +0 -3
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/views/layouts/application.html.erb +0 -14
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/config/application.rb +0 -65
- data/spec/dummy/config/boot.rb +0 -10
- data/spec/dummy/config/database.yml +0 -25
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -37
- data/spec/dummy/config/environments/production.rb +0 -67
- data/spec/dummy/config/environments/test.rb +0 -37
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/inflections.rb +0 -15
- data/spec/dummy/config/initializers/mime_types.rb +0 -5
- data/spec/dummy/config/initializers/secret_token.rb +0 -7
- data/spec/dummy/config/initializers/session_store.rb +0 -8
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/locales/en.yml +0 -5
- data/spec/dummy/config/routes.rb +0 -58
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +0 -16
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +0 -71
- data/spec/dummy/log/test.log +0 -33
- data/spec/dummy/public/404.html +0 -26
- data/spec/dummy/public/422.html +0 -26
- data/spec/dummy/public/500.html +0 -25
- data/spec/dummy/script/rails +0 -6
- data/spec/dummy/spec_link +0 -3
File without changes
|
Binary file
|
data/spec/models/asset_spec.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
+
require 'factory_girl_rails'
|
2
3
|
|
3
4
|
# Attributes
|
4
5
|
describe Effective::Asset do
|
@@ -9,38 +10,121 @@ describe Effective::Asset do
|
|
9
10
|
end
|
10
11
|
end
|
11
12
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
#
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
#
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
#
|
46
|
-
|
13
|
+
describe Effective::Asset do
|
14
|
+
let(:image_file_string) { File.read(Rails.root.join('public/sprites.png')) }
|
15
|
+
let(:image_url) { 'http://cdn.sstatic.net/stackoverflow/img/sprites.png?v=1' }
|
16
|
+
|
17
|
+
let (:email) do
|
18
|
+
Mail.new do
|
19
|
+
from 'someone@something.com'
|
20
|
+
to 'info@rails-skeleton.agilestyle.com'
|
21
|
+
subject 'Test email'
|
22
|
+
body 'This is the body of the test email'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'should be creatable from URL' do
|
27
|
+
asset = Effective::Asset.create_from_url(image_url, {:title => 'a title', :description => 'a description', :tags => 'a tags', :user_id => 1})
|
28
|
+
|
29
|
+
# A new asset should exist, and it should be unprocessed
|
30
|
+
asset.should_not eq false
|
31
|
+
|
32
|
+
asset.upload_file.should eq image_url
|
33
|
+
asset.processed.should eq false
|
34
|
+
|
35
|
+
# It should have queued up a process_asset task with delayed job
|
36
|
+
Delayed::Job.count.should eq 1
|
37
|
+
|
38
|
+
job = Psych.load(Delayed::Job.first.handler)
|
39
|
+
job.method_name.should eq :process_asset_without_delay
|
40
|
+
job.args.first.should eq asset.id
|
41
|
+
|
42
|
+
# Run DelayedJob
|
43
|
+
Delayed::Worker.new(:max_priority => nil, :min_priority => nil, :quiet => true).work_off
|
44
|
+
Delayed::Job.count.should eq 0
|
45
|
+
|
46
|
+
# We should have a totally processed Asset
|
47
|
+
asset = Effective::Asset.find(asset.id)
|
48
|
+
asset.processed.should eq true
|
49
|
+
asset.data.kind_of?(TestAssetUploader).should eq true
|
50
|
+
asset.title.should eq 'a title'
|
51
|
+
asset.description.should eq 'a description'
|
52
|
+
asset.tags.should eq 'a tags'
|
53
|
+
asset.user_id.should eq 1
|
54
|
+
asset.versions_info.present?.should eq true
|
55
|
+
asset.content_type.should eq 'image/png'
|
56
|
+
asset.height.should eq 1073
|
57
|
+
asset.width.should eq 238
|
58
|
+
end
|
59
|
+
|
60
|
+
it 'should be creatable from a String' do
|
61
|
+
asset = Effective::Asset.create_from_string(image_file_string, :filename => 'sprites1.png', :content_type => 'image/png')
|
62
|
+
|
63
|
+
# A new asset should exist, and it should be unprocessed
|
64
|
+
asset.should_not eq false
|
65
|
+
|
66
|
+
asset.upload_file.should eq "string://sprites1.png"
|
67
|
+
asset.processed.should eq false
|
68
|
+
|
69
|
+
# It should have queued up a process_asset task with delayed job
|
70
|
+
Delayed::Job.count.should eq 1
|
71
|
+
|
72
|
+
job = Psych.load(Delayed::Job.first.handler)
|
73
|
+
job.method_name.should eq :process_asset_without_delay
|
74
|
+
job.args.first.should eq asset.id
|
75
|
+
|
76
|
+
# Run DelayedJob
|
77
|
+
Delayed::Worker.new(:max_priority => nil, :min_priority => nil, :quiet => true).work_off
|
78
|
+
Delayed::Job.count.should eq 0
|
79
|
+
|
80
|
+
# We should have a totally processed Asset
|
81
|
+
asset = Effective::Asset.find(asset.id)
|
82
|
+
asset.processed.should eq true
|
83
|
+
asset.data.kind_of?(TestAssetUploader).should eq true
|
84
|
+
asset.title.should eq 'sprites1.png'
|
85
|
+
asset.user_id.should eq 1
|
86
|
+
asset.versions_info.present?.should eq true
|
87
|
+
asset.content_type.should eq 'image/png'
|
88
|
+
asset.height.should eq 1073
|
89
|
+
asset.width.should eq 238
|
90
|
+
end
|
91
|
+
|
92
|
+
it 'should handle an email decoded string file' do
|
93
|
+
email.add_file({:filename => Rails.root.join('public/sprites.png').to_s})
|
94
|
+
|
95
|
+
attachment = email.attachments.first
|
96
|
+
asset = Effective::Asset.create_from_string(attachment.body.decoded, :filename => attachment.filename, :content_type => attachment.mime_type)
|
97
|
+
|
98
|
+
# A new asset should exist, and it should be unprocessed
|
99
|
+
asset.should_not eq false
|
100
|
+
|
101
|
+
asset.upload_file.include?('public_sprites.png').should eq true
|
102
|
+
asset.upload_file.include?('string://').should eq true
|
103
|
+
asset.processed.should eq false
|
104
|
+
|
105
|
+
|
106
|
+
# It should have queued up a process_asset task with delayed job
|
107
|
+
Delayed::Job.count.should eq 1
|
108
|
+
|
109
|
+
job = Psych.load(Delayed::Job.first.handler)
|
110
|
+
job.method_name.should eq :process_asset_without_delay
|
111
|
+
job.args.first.should eq asset.id
|
112
|
+
|
113
|
+
# Run DelayedJob
|
114
|
+
Delayed::Worker.new(:max_priority => nil, :min_priority => nil, :quiet => true).work_off
|
115
|
+
Delayed::Job.count.should eq 0
|
116
|
+
|
117
|
+
# We should have a totally processed Asset
|
118
|
+
asset = Effective::Asset.find(asset.id)
|
119
|
+
asset.processed.should eq true
|
120
|
+
asset.data.kind_of?(TestAssetUploader).should eq true
|
121
|
+
asset.user_id.should eq 1
|
122
|
+
asset.versions_info.present?.should eq true
|
123
|
+
asset.content_type.should eq 'image/png'
|
124
|
+
asset.height.should eq 1073
|
125
|
+
asset.width.should eq 238
|
126
|
+
|
127
|
+
|
128
|
+
end
|
129
|
+
|
130
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,14 +1,20 @@
|
|
1
1
|
ENV["RAILS_ENV"] ||= 'test'
|
2
2
|
|
3
|
-
require File.expand_path("../dummy/config/environment", __FILE__)
|
3
|
+
#require File.expand_path("../dummy/config/environment", __FILE__)
|
4
|
+
|
5
|
+
require 'rubygems'
|
6
|
+
require 'bundler/setup'
|
7
|
+
require 'factory_girl_rails'
|
8
|
+
require 'combustion'
|
9
|
+
|
10
|
+
Combustion.initialize! :all
|
4
11
|
|
5
12
|
require 'rspec/rails'
|
6
13
|
require 'rspec/autorun'
|
7
|
-
require 'factory_girl_rails'
|
8
14
|
|
9
15
|
# Requires supporting ruby files with custom matchers and macros, etc,
|
10
16
|
# in spec/support/ and its subdirectories.
|
11
|
-
Dir[Rails.root.join("
|
17
|
+
Dir[Rails.root.join("../support/**/*.rb")].each {|f| require f }
|
12
18
|
|
13
19
|
RSpec.configure do |config|
|
14
20
|
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
metadata
CHANGED
@@ -1,289 +1,181 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Code and Effect
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-12-08 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rails
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
19
|
+
version: 3.2.0
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
26
|
+
version: 3.2.0
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: carrierwave
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - ">="
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - ">="
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: coffee-rails
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - ">="
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - ">="
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: delayed_job_active_record
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - ">="
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '0'
|
70
62
|
type: :runtime
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - ">="
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: '0'
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: fog
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - ">="
|
84
74
|
- !ruby/object:Gem::Version
|
85
|
-
version: 1.
|
75
|
+
version: 1.20.0
|
86
76
|
type: :runtime
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- -
|
80
|
+
- - ">="
|
92
81
|
- !ruby/object:Gem::Version
|
93
|
-
version: 1.
|
82
|
+
version: 1.20.0
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
|
-
name:
|
84
|
+
name: jquery-rails
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
|
-
- -
|
87
|
+
- - ">="
|
100
88
|
- !ruby/object:Gem::Version
|
101
89
|
version: '0'
|
102
90
|
type: :runtime
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
|
-
- -
|
94
|
+
- - ">="
|
108
95
|
- !ruby/object:Gem::Version
|
109
96
|
version: '0'
|
110
97
|
- !ruby/object:Gem::Dependency
|
111
|
-
name:
|
98
|
+
name: unf
|
112
99
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
100
|
requirements:
|
115
|
-
- -
|
101
|
+
- - ">="
|
116
102
|
- !ruby/object:Gem::Version
|
117
103
|
version: '0'
|
118
104
|
type: :runtime
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
107
|
requirements:
|
123
|
-
- -
|
108
|
+
- - ">="
|
124
109
|
- !ruby/object:Gem::Version
|
125
110
|
version: '0'
|
126
111
|
- !ruby/object:Gem::Dependency
|
127
|
-
name:
|
112
|
+
name: haml
|
128
113
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
114
|
requirements:
|
131
|
-
- -
|
115
|
+
- - ">="
|
132
116
|
- !ruby/object:Gem::Version
|
133
117
|
version: '0'
|
134
118
|
type: :runtime
|
135
119
|
prerelease: false
|
136
120
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
121
|
requirements:
|
139
|
-
- -
|
122
|
+
- - ">="
|
140
123
|
- !ruby/object:Gem::Version
|
141
124
|
version: '0'
|
142
125
|
- !ruby/object:Gem::Dependency
|
143
126
|
name: migrant
|
144
127
|
requirement: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
128
|
requirements:
|
147
|
-
- -
|
129
|
+
- - ">="
|
148
130
|
- !ruby/object:Gem::Version
|
149
131
|
version: '0'
|
150
132
|
type: :runtime
|
151
133
|
prerelease: false
|
152
134
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
135
|
requirements:
|
155
|
-
- -
|
136
|
+
- - ">="
|
156
137
|
- !ruby/object:Gem::Version
|
157
138
|
version: '0'
|
158
139
|
- !ruby/object:Gem::Dependency
|
159
140
|
name: mini_magick
|
160
141
|
requirement: !ruby/object:Gem::Requirement
|
161
|
-
none: false
|
162
142
|
requirements:
|
163
|
-
- -
|
143
|
+
- - ">="
|
164
144
|
- !ruby/object:Gem::Version
|
165
145
|
version: '0'
|
166
146
|
type: :runtime
|
167
147
|
prerelease: false
|
168
148
|
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
none: false
|
170
149
|
requirements:
|
171
|
-
- -
|
150
|
+
- - ">="
|
172
151
|
- !ruby/object:Gem::Version
|
173
152
|
version: '0'
|
174
153
|
- !ruby/object:Gem::Dependency
|
175
|
-
name:
|
154
|
+
name: jquery-fileupload-rails
|
176
155
|
requirement: !ruby/object:Gem::Requirement
|
177
|
-
none: false
|
178
156
|
requirements:
|
179
|
-
- -
|
157
|
+
- - ">="
|
180
158
|
- !ruby/object:Gem::Version
|
181
159
|
version: '0'
|
182
160
|
type: :runtime
|
183
161
|
prerelease: false
|
184
162
|
version_requirements: !ruby/object:Gem::Requirement
|
185
|
-
none: false
|
186
|
-
requirements:
|
187
|
-
- - ! '>='
|
188
|
-
- !ruby/object:Gem::Version
|
189
|
-
version: '0'
|
190
|
-
- !ruby/object:Gem::Dependency
|
191
|
-
name: factory_girl_rails
|
192
|
-
requirement: !ruby/object:Gem::Requirement
|
193
|
-
none: false
|
194
|
-
requirements:
|
195
|
-
- - ! '>='
|
196
|
-
- !ruby/object:Gem::Version
|
197
|
-
version: '0'
|
198
|
-
type: :development
|
199
|
-
prerelease: false
|
200
|
-
version_requirements: !ruby/object:Gem::Requirement
|
201
|
-
none: false
|
202
|
-
requirements:
|
203
|
-
- - ! '>='
|
204
|
-
- !ruby/object:Gem::Version
|
205
|
-
version: '0'
|
206
|
-
- !ruby/object:Gem::Dependency
|
207
|
-
name: rspec-rails
|
208
|
-
requirement: !ruby/object:Gem::Requirement
|
209
|
-
none: false
|
210
|
-
requirements:
|
211
|
-
- - ! '>='
|
212
|
-
- !ruby/object:Gem::Version
|
213
|
-
version: '0'
|
214
|
-
type: :development
|
215
|
-
prerelease: false
|
216
|
-
version_requirements: !ruby/object:Gem::Requirement
|
217
|
-
none: false
|
218
|
-
requirements:
|
219
|
-
- - ! '>='
|
220
|
-
- !ruby/object:Gem::Version
|
221
|
-
version: '0'
|
222
|
-
- !ruby/object:Gem::Dependency
|
223
|
-
name: shoulda-matchers
|
224
|
-
requirement: !ruby/object:Gem::Requirement
|
225
|
-
none: false
|
226
|
-
requirements:
|
227
|
-
- - ! '>='
|
228
|
-
- !ruby/object:Gem::Version
|
229
|
-
version: '0'
|
230
|
-
type: :development
|
231
|
-
prerelease: false
|
232
|
-
version_requirements: !ruby/object:Gem::Requirement
|
233
|
-
none: false
|
234
163
|
requirements:
|
235
|
-
- -
|
164
|
+
- - ">="
|
236
165
|
- !ruby/object:Gem::Version
|
237
166
|
version: '0'
|
238
|
-
|
239
|
-
|
240
|
-
requirement: !ruby/object:Gem::Requirement
|
241
|
-
none: false
|
242
|
-
requirements:
|
243
|
-
- - ! '>='
|
244
|
-
- !ruby/object:Gem::Version
|
245
|
-
version: '0'
|
246
|
-
type: :development
|
247
|
-
prerelease: false
|
248
|
-
version_requirements: !ruby/object:Gem::Requirement
|
249
|
-
none: false
|
250
|
-
requirements:
|
251
|
-
- - ! '>='
|
252
|
-
- !ruby/object:Gem::Version
|
253
|
-
version: '0'
|
254
|
-
- !ruby/object:Gem::Dependency
|
255
|
-
name: psych
|
256
|
-
requirement: !ruby/object:Gem::Requirement
|
257
|
-
none: false
|
258
|
-
requirements:
|
259
|
-
- - ! '>='
|
260
|
-
- !ruby/object:Gem::Version
|
261
|
-
version: '0'
|
262
|
-
type: :development
|
263
|
-
prerelease: false
|
264
|
-
version_requirements: !ruby/object:Gem::Requirement
|
265
|
-
none: false
|
266
|
-
requirements:
|
267
|
-
- - ! '>='
|
268
|
-
- !ruby/object:Gem::Version
|
269
|
-
version: '0'
|
270
|
-
description: A full solution for managing assets (images, files, videos, etc). Attach
|
271
|
-
one or more assets to any model with validations. Includes an upload direct to Amazon
|
272
|
-
S3 implementation based on s3_swf_upload and image processing in the background
|
273
|
-
with CarrierWave and DelayedJob Formtastic input for displaying, organizing, and
|
274
|
-
uploading assets direct to s3. Includes (optional but recommended) integration with
|
275
|
-
ActiveAdmin
|
167
|
+
description: Upload images and files directly to AWS S3 with a custom form input then
|
168
|
+
seamlessly organize and attach them to any ActiveRecord object.
|
276
169
|
email:
|
277
170
|
- info@codeandeffect.com
|
278
171
|
executables: []
|
279
172
|
extensions: []
|
280
173
|
extra_rdoc_files: []
|
281
174
|
files:
|
175
|
+
- MIT-LICENSE
|
176
|
+
- README.md
|
177
|
+
- Rakefile
|
282
178
|
- app/assets/images/effective_assets/icon_close.png
|
283
|
-
- app/assets/images/effective_assets/s3_down_button.gif
|
284
|
-
- app/assets/images/effective_assets/s3_over_button.gif
|
285
|
-
- app/assets/images/effective_assets/s3_up_button.gif
|
286
|
-
- app/assets/images/effective_assets/s3_upload.swf
|
287
179
|
- app/assets/images/effective_assets/spinner.gif
|
288
180
|
- app/assets/images/mime-types/excel.jpg
|
289
181
|
- app/assets/images/mime-types/file.png
|
@@ -292,140 +184,109 @@ files:
|
|
292
184
|
- app/assets/images/mime-types/video.png
|
293
185
|
- app/assets/images/mime-types/word.jpg
|
294
186
|
- app/assets/images/mime-types/zip.png
|
295
|
-
- app/assets/javascripts/
|
296
|
-
- app/assets/javascripts/effective_assets/asset_box_uploader.js
|
297
|
-
- app/assets/javascripts/effective_assets/asset_box_uploader_customization.js
|
298
|
-
- app/assets/javascripts/effective_assets/jquery_ui_sortable.js
|
187
|
+
- app/assets/javascripts/effective/snippets/effective_asset.js.coffee
|
299
188
|
- app/assets/javascripts/effective_assets.js
|
300
|
-
- app/assets/
|
189
|
+
- app/assets/javascripts/effective_assets/asset_box.js.coffee
|
190
|
+
- app/assets/javascripts/effective_assets/asset_box_dialog.js.coffee
|
191
|
+
- app/assets/javascripts/effective_assets/asset_box_drag_and_drop.js.coffee
|
192
|
+
- app/assets/javascripts/effective_assets/asset_box_filtering.js.coffee
|
193
|
+
- app/assets/javascripts/effective_assets/asset_box_sorting.js.coffee
|
194
|
+
- app/assets/javascripts/effective_assets/jquery_ui_sortable.js
|
195
|
+
- app/assets/javascripts/effective_assets/s3_uploader.js.coffee
|
196
|
+
- app/assets/javascripts/effective_assets_iframe.js.coffee
|
197
|
+
- app/assets/stylesheets/active_admin/effective_assets.css.scss
|
301
198
|
- app/assets/stylesheets/effective_assets.css.scss
|
302
|
-
- app/
|
199
|
+
- app/assets/stylesheets/effective_assets/_asset_box_input.scss
|
200
|
+
- app/assets/stylesheets/effective_assets/_iframe_bootstrap.scss
|
201
|
+
- app/assets/stylesheets/effective_assets/_input_bootstrap.scss
|
202
|
+
- app/assets/stylesheets/effective_assets_iframe.css.scss
|
203
|
+
- app/controllers/effective/assets_controller.rb
|
303
204
|
- app/controllers/effective/s3_uploads_controller.rb
|
304
205
|
- app/helpers/effective_assets_helper.rb
|
206
|
+
- app/helpers/effective_assets_s3_helper.rb
|
305
207
|
- app/models/concerns/acts_as_asset_box.rb
|
208
|
+
- app/models/effective/access_denied.rb
|
306
209
|
- app/models/effective/asset.rb
|
307
210
|
- app/models/effective/attachment.rb
|
308
211
|
- app/models/effective/delayed_job.rb
|
212
|
+
- app/models/effective/snippets/effective_asset.rb
|
213
|
+
- app/models/effective/user_uploads.rb
|
214
|
+
- app/models/inputs/asset_box.rb
|
215
|
+
- app/models/inputs/asset_box_form_input.rb
|
216
|
+
- app/models/inputs/asset_box_formtastic_input.rb
|
309
217
|
- app/models/inputs/asset_box_input.rb
|
218
|
+
- app/models/inputs/asset_box_simple_form_input.rb
|
310
219
|
- app/models/validators/asset_box_length_validator.rb
|
311
220
|
- app/models/validators/asset_box_presence_validator.rb
|
312
|
-
- app/uploaders/asset_uploader.rb
|
313
221
|
- app/uploaders/effective_assets_uploader.rb
|
222
|
+
- app/uploaders/test_asset_uploader.rb
|
314
223
|
- app/views/active_admin/effective_assets/_edit.html.haml
|
315
224
|
- app/views/active_admin/effective_assets/_form.html.haml
|
316
225
|
- app/views/active_admin/effective_assets/_new.html.haml
|
317
|
-
- app/views/asset_box_input/
|
226
|
+
- app/views/asset_box_input/_attachment_as_list.html.haml
|
227
|
+
- app/views/asset_box_input/_attachment_as_table.html.haml
|
228
|
+
- app/views/asset_box_input/_attachment_as_thumbnail.html.haml
|
229
|
+
- app/views/asset_box_input/_dialog.html.haml
|
230
|
+
- app/views/asset_box_input/_progress_bar_template.html.haml
|
318
231
|
- app/views/asset_box_input/_uploader.html.haml
|
319
232
|
- app/views/assets/_video.html.erb
|
233
|
+
- app/views/effective/assets/iframe.html.haml
|
234
|
+
- app/views/effective/snippets/_effective_asset.html.haml
|
320
235
|
- config/routes.rb
|
321
236
|
- db/migrate/01_create_effective_assets.rb.erb
|
237
|
+
- lib/effective_assets.rb
|
322
238
|
- lib/effective_assets/engine.rb
|
323
239
|
- lib/effective_assets/version.rb
|
324
|
-
- lib/effective_assets.rb
|
325
240
|
- lib/generators/effective_assets/install_generator.rb
|
241
|
+
- lib/generators/templates/README
|
326
242
|
- lib/generators/templates/asset_uploader.rb
|
327
243
|
- lib/generators/templates/effective_assets.rb
|
328
|
-
- lib/generators/templates/README
|
329
244
|
- lib/tasks/effective_assets_tasks.rake
|
330
|
-
-
|
331
|
-
-
|
332
|
-
-
|
333
|
-
- spec/
|
334
|
-
- spec/
|
335
|
-
- spec/
|
336
|
-
- spec/
|
337
|
-
- spec/
|
338
|
-
- spec/dummy/config/application.rb
|
339
|
-
- spec/dummy/config/boot.rb
|
340
|
-
- spec/dummy/config/database.yml
|
341
|
-
- spec/dummy/config/environment.rb
|
342
|
-
- spec/dummy/config/environments/development.rb
|
343
|
-
- spec/dummy/config/environments/production.rb
|
344
|
-
- spec/dummy/config/environments/test.rb
|
345
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
346
|
-
- spec/dummy/config/initializers/inflections.rb
|
347
|
-
- spec/dummy/config/initializers/mime_types.rb
|
348
|
-
- spec/dummy/config/initializers/secret_token.rb
|
349
|
-
- spec/dummy/config/initializers/session_store.rb
|
350
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
351
|
-
- spec/dummy/config/locales/en.yml
|
352
|
-
- spec/dummy/config/routes.rb
|
353
|
-
- spec/dummy/config.ru
|
354
|
-
- spec/dummy/db/development.sqlite3
|
355
|
-
- spec/dummy/db/schema.rb
|
356
|
-
- spec/dummy/db/test.sqlite3
|
357
|
-
- spec/dummy/log/development.log
|
358
|
-
- spec/dummy/log/test.log
|
359
|
-
- spec/dummy/public/404.html
|
360
|
-
- spec/dummy/public/422.html
|
361
|
-
- spec/dummy/public/500.html
|
362
|
-
- spec/dummy/public/favicon.ico
|
363
|
-
- spec/dummy/Rakefile
|
364
|
-
- spec/dummy/README.rdoc
|
365
|
-
- spec/dummy/script/rails
|
366
|
-
- spec/dummy/spec_link
|
245
|
+
- spec/internal/config/database.yml
|
246
|
+
- spec/internal/config/initializers/effective_assets.rb
|
247
|
+
- spec/internal/config/routes.rb
|
248
|
+
- spec/internal/db/combustion_test.sqlite
|
249
|
+
- spec/internal/db/schema.rb
|
250
|
+
- spec/internal/log/test.log
|
251
|
+
- spec/internal/public/favicon.ico
|
252
|
+
- spec/internal/public/sprites.png
|
367
253
|
- spec/models/asset_spec.rb
|
368
254
|
- spec/spec_helper.rb
|
369
255
|
- spec/support/factories.rb
|
370
256
|
homepage: https://github.com/code-and-effect/effective_assets
|
371
|
-
licenses:
|
257
|
+
licenses:
|
258
|
+
- MIT
|
259
|
+
metadata: {}
|
372
260
|
post_install_message:
|
373
261
|
rdoc_options: []
|
374
262
|
require_paths:
|
375
263
|
- lib
|
376
264
|
required_ruby_version: !ruby/object:Gem::Requirement
|
377
|
-
none: false
|
378
265
|
requirements:
|
379
|
-
- -
|
266
|
+
- - ">="
|
380
267
|
- !ruby/object:Gem::Version
|
381
268
|
version: '0'
|
382
269
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
383
|
-
none: false
|
384
270
|
requirements:
|
385
|
-
- -
|
271
|
+
- - ">="
|
386
272
|
- !ruby/object:Gem::Version
|
387
273
|
version: '0'
|
388
274
|
requirements: []
|
389
275
|
rubyforge_project:
|
390
|
-
rubygems_version:
|
276
|
+
rubygems_version: 2.4.3
|
391
277
|
signing_key:
|
392
|
-
specification_version:
|
393
|
-
summary:
|
278
|
+
specification_version: 4
|
279
|
+
summary: Upload images and files directly to AWS S3 with a custom form input then
|
280
|
+
seamlessly organize and attach them to any ActiveRecord object.
|
394
281
|
test_files:
|
395
|
-
- spec/
|
396
|
-
- spec/
|
397
|
-
- spec/
|
398
|
-
- spec/
|
399
|
-
- spec/
|
400
|
-
- spec/
|
401
|
-
- spec/
|
402
|
-
- spec/
|
403
|
-
- spec/dummy/config/environment.rb
|
404
|
-
- spec/dummy/config/environments/development.rb
|
405
|
-
- spec/dummy/config/environments/production.rb
|
406
|
-
- spec/dummy/config/environments/test.rb
|
407
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
408
|
-
- spec/dummy/config/initializers/inflections.rb
|
409
|
-
- spec/dummy/config/initializers/mime_types.rb
|
410
|
-
- spec/dummy/config/initializers/secret_token.rb
|
411
|
-
- spec/dummy/config/initializers/session_store.rb
|
412
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
413
|
-
- spec/dummy/config/locales/en.yml
|
414
|
-
- spec/dummy/config/routes.rb
|
415
|
-
- spec/dummy/config.ru
|
416
|
-
- spec/dummy/db/development.sqlite3
|
417
|
-
- spec/dummy/db/schema.rb
|
418
|
-
- spec/dummy/db/test.sqlite3
|
419
|
-
- spec/dummy/log/development.log
|
420
|
-
- spec/dummy/log/test.log
|
421
|
-
- spec/dummy/public/404.html
|
422
|
-
- spec/dummy/public/422.html
|
423
|
-
- spec/dummy/public/500.html
|
424
|
-
- spec/dummy/public/favicon.ico
|
425
|
-
- spec/dummy/Rakefile
|
426
|
-
- spec/dummy/README.rdoc
|
427
|
-
- spec/dummy/script/rails
|
428
|
-
- spec/dummy/spec_link
|
282
|
+
- spec/internal/config/database.yml
|
283
|
+
- spec/internal/config/initializers/effective_assets.rb
|
284
|
+
- spec/internal/config/routes.rb
|
285
|
+
- spec/internal/db/combustion_test.sqlite
|
286
|
+
- spec/internal/db/schema.rb
|
287
|
+
- spec/internal/log/test.log
|
288
|
+
- spec/internal/public/favicon.ico
|
289
|
+
- spec/internal/public/sprites.png
|
429
290
|
- spec/models/asset_spec.rb
|
430
291
|
- spec/spec_helper.rb
|
431
292
|
- spec/support/factories.rb
|