rails-uploader 0.4.4 → 0.5.3
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/README.md +17 -0
- data/Rakefile +2 -1
- data/app/assets/javascripts/uploader/jquery.uploader.js.coffee +1 -0
- data/app/controllers/uploader/attachments_controller.rb +4 -8
- data/app/views/uploader/default/_container.html.erb +1 -0
- data/config/routes.rb +2 -0
- data/lib/generators/uploader/install/install_generator.rb +9 -5
- data/lib/generators/uploader/install/templates/20130905144515_create_assets.rb +2 -0
- data/lib/rails-uploader.rb +2 -1
- data/lib/uploader.rb +3 -1
- data/lib/uploader/asset.rb +19 -2
- data/lib/uploader/authorization.rb +8 -2
- data/lib/uploader/authorization_adapter.rb +2 -0
- data/lib/uploader/chunked_uploads.rb +2 -0
- data/lib/uploader/engine.rb +2 -0
- data/lib/uploader/file_part.rb +2 -0
- data/lib/uploader/fileupload_glue.rb +10 -3
- data/lib/uploader/fileuploads.rb +2 -0
- data/lib/uploader/helpers/field_tag.rb +13 -3
- data/lib/uploader/helpers/form_builder.rb +2 -0
- data/lib/uploader/helpers/form_tag_helper.rb +2 -0
- data/lib/uploader/hooks/active_record.rb +2 -0
- data/lib/uploader/hooks/formtastic.rb +2 -0
- data/lib/uploader/hooks/simple_form.rb +2 -0
- data/lib/uploader/json_rendering.rb +11 -0
- data/lib/uploader/upload_request.rb +5 -2
- data/lib/uploader/version.rb +3 -1
- data/spec/dummy/app/assets/config/manifest.js +3 -0
- data/spec/dummy/app/uploaders/picture_uploader.rb +1 -3
- data/spec/dummy/config/environments/production.rb +1 -1
- data/spec/dummy/config/environments/test.rb +1 -1
- data/spec/requests/attachments_controller_spec.rb +38 -2
- data/vendor/assets/javascripts/uploader/jquery.fileupload-ui.js +7 -0
- metadata +37 -48
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e05f5c580e91d0d0b2702ad285f746f97afeffefd8c114088b96136bde737f8d
|
4
|
+
data.tar.gz: 9b7f11b41d7dc7ec839e570a1889e140f09b0866231fc8a5d4dfe545b1e5ed54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c0f890979f7ae8a766d6a2957a86c390ffa65413e90aaa5d996399728eab61e8398ccab92303010442154c2da261f6123571847f2e7688e110c3c5d657ea5d3
|
7
|
+
data.tar.gz: 3ee71e85c530ca477922d7d591ce5e2bad65c864b3fbd9535acf069d092ccb06c7ee109fa25583f72bebb26e8acd269bd62ea69dd49298f50f6e9216306dc54d
|
data/README.md
CHANGED
@@ -41,6 +41,23 @@ class Picture < Asset
|
|
41
41
|
url(:thumb)
|
42
42
|
end
|
43
43
|
end
|
44
|
+
|
45
|
+
class PictureUploader < CarrierWave::Uploader::Base
|
46
|
+
include CarrierWave::MiniMagick
|
47
|
+
|
48
|
+
# Choose what kind of storage to use for this uploader:
|
49
|
+
storage :file
|
50
|
+
|
51
|
+
EXTENSION_WHITELIST = %w[jpg jpeg gif png].freeze
|
52
|
+
|
53
|
+
version :thumb do
|
54
|
+
process resize_to_fill: [100, 100]
|
55
|
+
end
|
56
|
+
|
57
|
+
def extension_whitelist
|
58
|
+
EXTENSION_WHITELIST
|
59
|
+
end
|
60
|
+
end
|
44
61
|
```
|
45
62
|
|
46
63
|
For example user has one picture:
|
data/Rakefile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Uploader
|
2
4
|
class AttachmentsController < ActionController::Metal
|
3
5
|
include AbstractController::Callbacks
|
@@ -5,8 +7,8 @@ module Uploader
|
|
5
7
|
include Uploader::ChunkedUploads
|
6
8
|
|
7
9
|
before_action :find_klass
|
8
|
-
before_action :build_asset, only:
|
9
|
-
before_action :find_asset, only:
|
10
|
+
before_action :build_asset, only: :create
|
11
|
+
before_action :find_asset, only: :destroy
|
10
12
|
|
11
13
|
def index
|
12
14
|
authorize!(:index, @klass)
|
@@ -67,12 +69,6 @@ module Uploader
|
|
67
69
|
end
|
68
70
|
end
|
69
71
|
|
70
|
-
def render_json(hash_or_object, status = 200)
|
71
|
-
self.status = status
|
72
|
-
self.content_type = request.format
|
73
|
-
self.response_body = hash_or_object.to_json(root: false)
|
74
|
-
end
|
75
|
-
|
76
72
|
def asset_params
|
77
73
|
ActionController::Parameters.new(params).require(:asset).permit(:data)
|
78
74
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<%= content_tag(:div, id: field.id, class: 'uploader-dnd-area', data: { tpml: field.klass.to_s, exists: field.exists? }) do -%>
|
2
2
|
<%= hidden_field(field.object_name, :fileupload_guid, object: field.object) if field.object.new_record? %>
|
3
3
|
|
4
|
+
<p class='uploader-errors'></p>
|
4
5
|
<div class="uploader-files"></div>
|
5
6
|
|
6
7
|
<div class="uploader-dnd-hints">
|
data/config/routes.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'rails/generators/migration'
|
2
4
|
|
3
5
|
module Uploader
|
@@ -5,14 +7,16 @@ module Uploader
|
|
5
7
|
class InstallGenerator < ::Rails::Generators::Base
|
6
8
|
include Rails::Generators::Migration
|
7
9
|
|
8
|
-
source_root File.expand_path('
|
10
|
+
source_root File.expand_path('templates', __dir__)
|
11
|
+
|
9
12
|
desc 'add the migrations'
|
10
|
-
def self.next_migration_number(
|
11
|
-
|
12
|
-
@prev_migration_nr = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i
|
13
|
-
else
|
13
|
+
def self.next_migration_number(_path)
|
14
|
+
if @prev_migration_nr
|
14
15
|
@prev_migration_nr += 1
|
16
|
+
else
|
17
|
+
@prev_migration_nr = Time.now.utc.strftime('%Y%m%d%H%M%S').to_i
|
15
18
|
end
|
19
|
+
|
16
20
|
@prev_migration_nr.to_s
|
17
21
|
end
|
18
22
|
|
data/lib/rails-uploader.rb
CHANGED
data/lib/uploader.rb
CHANGED
data/lib/uploader/asset.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'active_support/concern'
|
2
4
|
|
3
5
|
module Uploader
|
@@ -49,7 +51,22 @@ module Uploader
|
|
49
51
|
#
|
50
52
|
def fileupload_create(params, _request = nil)
|
51
53
|
self[Uploader.guid_column] = params[:guid]
|
52
|
-
update_attributes(self.class.fileupload_assetable_options(params))
|
54
|
+
return false unless update_attributes(self.class.fileupload_assetable_options(params))
|
55
|
+
|
56
|
+
if fileupload_destroy_other_on_singular?(params)
|
57
|
+
self.class.fileupload_find_assets(params).where.not(id: id).destroy_all
|
58
|
+
end
|
59
|
+
true
|
60
|
+
end
|
61
|
+
|
62
|
+
def fileupload_destroy_other_on_singular?(params)
|
63
|
+
return unless params[:singular].to_s.downcase == 'true'
|
64
|
+
return true if params[:guid].present?
|
65
|
+
|
66
|
+
[
|
67
|
+
params["#{Uploader.assetable_column}_id"],
|
68
|
+
params["#{Uploader.assetable_column}_type"]
|
69
|
+
].all?(&:present?)
|
53
70
|
end
|
54
71
|
|
55
72
|
# Destroy asset
|
@@ -80,7 +97,7 @@ module Uploader
|
|
80
97
|
name: filename,
|
81
98
|
content_type: content_type,
|
82
99
|
size: size,
|
83
|
-
url:
|
100
|
+
url: url,
|
84
101
|
thumb_url: thumb_url
|
85
102
|
}
|
86
103
|
end
|
@@ -1,11 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'active_support/concern'
|
4
|
+
require_relative 'json_rendering'
|
2
5
|
|
3
6
|
module Uploader
|
4
7
|
module Authorization
|
5
8
|
extend ActiveSupport::Concern
|
6
9
|
|
7
10
|
included do
|
8
|
-
include
|
11
|
+
include JsonRendering
|
12
|
+
include ActionController::Rescue
|
9
13
|
|
10
14
|
rescue_from Uploader::AccessDenied, with: :dispatch_uploader_access_denied
|
11
15
|
end
|
@@ -21,6 +25,7 @@ module Uploader
|
|
21
25
|
# If the action is not allowd, it raises an Uploader::AccessDenied exception.
|
22
26
|
def authorize!(action, subject = nil)
|
23
27
|
return if authorized?(action, subject)
|
28
|
+
|
24
29
|
raise Uploader::AccessDenied.new(current_uploader_user, action, subject)
|
25
30
|
end
|
26
31
|
|
@@ -41,11 +46,12 @@ module Uploader
|
|
41
46
|
end
|
42
47
|
|
43
48
|
def dispatch_uploader_access_denied(exception)
|
44
|
-
|
49
|
+
render_json({ message: exception.message }, 403)
|
45
50
|
end
|
46
51
|
|
47
52
|
def current_uploader_user
|
48
53
|
return if Uploader.current_user_proc.nil?
|
54
|
+
|
49
55
|
@current_uploader_user ||= Uploader.current_user_proc.call(request)
|
50
56
|
end
|
51
57
|
end
|
data/lib/uploader/engine.rb
CHANGED
data/lib/uploader/file_part.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Uploader
|
2
4
|
class FileuploadGlue
|
3
5
|
attr_reader :record, :record_klass
|
@@ -5,8 +7,8 @@ module Uploader
|
|
5
7
|
delegate :reflect_on_association, to: :record_klass
|
6
8
|
delegate :fileupload_guid, :new_record?, to: :record
|
7
9
|
|
8
|
-
TARGET_TYPE = '_type'
|
9
|
-
TARGET_ID = '_id'
|
10
|
+
TARGET_TYPE = '_type'
|
11
|
+
TARGET_ID = '_id'
|
10
12
|
|
11
13
|
def initialize(record)
|
12
14
|
@record = record
|
@@ -36,6 +38,7 @@ module Uploader
|
|
36
38
|
|
37
39
|
def asset(method_name)
|
38
40
|
return unless available_fileuploads.include?(method_name.to_sym)
|
41
|
+
|
39
42
|
find_asset_by_fileupload_guid(method_name, fileupload_guid) || build_asset(method_name)
|
40
43
|
end
|
41
44
|
|
@@ -47,6 +50,7 @@ module Uploader
|
|
47
50
|
# Find class by reflection
|
48
51
|
def klass(method_name)
|
49
52
|
return if association(method_name).nil?
|
53
|
+
|
50
54
|
association(method_name).klass
|
51
55
|
end
|
52
56
|
|
@@ -62,6 +66,7 @@ module Uploader
|
|
62
66
|
|
63
67
|
def available_fileuploads
|
64
68
|
return [] if @record_klass.fileupload_options.nil?
|
69
|
+
|
65
70
|
@available_fileuploads ||= @record_klass.fileupload_options.keys
|
66
71
|
end
|
67
72
|
|
@@ -97,7 +102,9 @@ module Uploader
|
|
97
102
|
end
|
98
103
|
|
99
104
|
def record_klass_type
|
100
|
-
if @record_klass.respond_to?(:
|
105
|
+
if @record_klass.respond_to?(:polymorphic_name)
|
106
|
+
@record_klass.polymorphic_name
|
107
|
+
elsif @record_klass.respond_to?(:base_class)
|
101
108
|
@record_klass.base_class.name
|
102
109
|
else
|
103
110
|
@record_klass.name
|
data/lib/uploader/fileuploads.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Uploader
|
2
4
|
module Helpers
|
3
5
|
class FieldTag
|
4
|
-
RESERVED_OPTIONS_KEYS = %
|
6
|
+
RESERVED_OPTIONS_KEYS = %w[method_name object_name theme value object sortable].freeze
|
5
7
|
|
6
8
|
attr_reader :template, :object, :theme
|
7
9
|
|
@@ -73,12 +75,20 @@ module Uploader
|
|
73
75
|
def input_html
|
74
76
|
@input_html ||= { multiple: multiple?, class: 'uploader' }.merge(input_html_options)
|
75
77
|
@input_html[:data] ||= {}
|
76
|
-
@input_html[:data][:url] ||= attachments_path
|
78
|
+
@input_html[:data][:url] ||= attachments_path(singular: !multiple?)
|
79
|
+
@input_html[:accept] ||= extension_whitelist
|
77
80
|
@input_html
|
78
81
|
end
|
79
82
|
|
80
83
|
def input_html_options
|
81
|
-
@options.
|
84
|
+
@options.reject { |key, _value| RESERVED_OPTIONS_KEYS.include?(key.to_s) }
|
85
|
+
end
|
86
|
+
|
87
|
+
def extension_whitelist
|
88
|
+
return unless klass.uploaders[:data].try(:const_defined?, :EXTENSION_WHITELIST)
|
89
|
+
|
90
|
+
exts = klass.uploaders[:data]::EXTENSION_WHITELIST
|
91
|
+
".#{exts.join(', .')}" if exts.any?
|
82
92
|
end
|
83
93
|
end
|
84
94
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Uploader
|
4
|
+
module JsonRendering
|
5
|
+
def render_json(hash_or_object, status = 200)
|
6
|
+
self.status = status
|
7
|
+
self.content_type = request.format
|
8
|
+
self.response_body = hash_or_object.to_json(root: false)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'rack/request'
|
2
4
|
require 'fileutils'
|
3
5
|
require 'digest/sha1'
|
@@ -5,7 +7,7 @@ require 'uri'
|
|
5
7
|
|
6
8
|
module Uploader
|
7
9
|
class UploadRequest < Rack::Request
|
8
|
-
SPLITTER = '/'
|
10
|
+
SPLITTER = '/'
|
9
11
|
|
10
12
|
attr_reader :file
|
11
13
|
|
@@ -30,6 +32,7 @@ module Uploader
|
|
30
32
|
|
31
33
|
def total_file_length
|
32
34
|
return content_length.to_i unless chunked?
|
35
|
+
|
33
36
|
@env['HTTP_CONTENT_RANGE'].split(SPLITTER).last.to_i
|
34
37
|
end
|
35
38
|
|
@@ -73,7 +76,7 @@ module Uploader
|
|
73
76
|
|
74
77
|
def extract_filename(value)
|
75
78
|
value = value.match(/filename\s?=\s?\"?([^;"]+)\"?/i)[1]
|
76
|
-
URI.
|
79
|
+
URI.decode_www_form(value.force_encoding('binary'))
|
77
80
|
end
|
78
81
|
end
|
79
82
|
end
|
data/lib/uploader/version.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
class PictureUploader < CarrierWave::Uploader::Base
|
4
|
-
|
5
4
|
# Include RMagick or MiniMagick support:
|
6
5
|
# include CarrierWave::RMagick
|
7
6
|
include CarrierWave::MiniMagick
|
@@ -51,5 +50,4 @@ class PictureUploader < CarrierWave::Uploader::Base
|
|
51
50
|
# def filename
|
52
51
|
# "something.jpg" if original_filename
|
53
52
|
# end
|
54
|
-
|
55
53
|
end
|
@@ -9,7 +9,7 @@ Dummy::Application.configure do
|
|
9
9
|
config.action_controller.perform_caching = true
|
10
10
|
|
11
11
|
# Disable Rails's static asset server (Apache or nginx will already do this)
|
12
|
-
config.
|
12
|
+
config.serve_static_files = false
|
13
13
|
|
14
14
|
# Compress JavaScripts and CSS
|
15
15
|
config.assets.compress = true
|
@@ -8,7 +8,7 @@ Dummy::Application.configure do
|
|
8
8
|
config.cache_classes = true
|
9
9
|
|
10
10
|
# Configure static asset server for tests with Cache-Control for performance
|
11
|
-
config.
|
11
|
+
config.serve_static_files = true
|
12
12
|
config.static_cache_control = "public, max-age=3600"
|
13
13
|
|
14
14
|
# Log error messages when you accidentally call methods on nil
|
@@ -7,16 +7,52 @@ describe Uploader::AttachmentsController do
|
|
7
7
|
Dummy::Application
|
8
8
|
end
|
9
9
|
|
10
|
+
before :each do
|
11
|
+
Picture.destroy_all
|
12
|
+
end
|
13
|
+
|
10
14
|
it "should create new asset" do
|
11
15
|
file = Rack::Test::UploadedFile.new('spec/factories/files/rails.png', "image/png")
|
16
|
+
article = FactoryGirl.create(:article)
|
17
|
+
post "/uploader/attachments", {
|
18
|
+
:klass => "Picture",
|
19
|
+
:assetable_id => article.id,
|
20
|
+
:assetable_type => article.class.name,
|
21
|
+
:guid => "SOMESTRING",
|
22
|
+
:asset => {:data => file}
|
23
|
+
}
|
24
|
+
|
25
|
+
Picture.count.should == 1
|
26
|
+
|
27
|
+
last_response.body.should include('thumb_url')
|
28
|
+
last_response.body.should include('name')
|
29
|
+
end
|
30
|
+
|
31
|
+
it "should destroy old asset on new asset for has_one" do
|
32
|
+
file = Rack::Test::UploadedFile.new('spec/factories/files/rails.png', "image/png")
|
33
|
+
article = FactoryGirl.create(:article)
|
12
34
|
post "/uploader/attachments", {
|
13
35
|
:klass => "Picture",
|
14
|
-
:assetable_id =>
|
15
|
-
:assetable_type =>
|
36
|
+
:assetable_id => article.id,
|
37
|
+
:assetable_type => article.class.name,
|
16
38
|
:guid => "SOMESTRING",
|
39
|
+
:singular => true,
|
17
40
|
:asset => {:data => file}
|
18
41
|
}
|
19
42
|
|
43
|
+
Picture.count.should == 1
|
44
|
+
|
45
|
+
post "/uploader/attachments", {
|
46
|
+
:klass => "Picture",
|
47
|
+
:assetable_id => article.id,
|
48
|
+
:assetable_type => article.class.name,
|
49
|
+
:guid => "SOMESTRING",
|
50
|
+
:singular => true,
|
51
|
+
:asset => {:data => file}
|
52
|
+
}
|
53
|
+
|
54
|
+
Picture.count.should == 1
|
55
|
+
|
20
56
|
last_response.body.should include('thumb_url')
|
21
57
|
last_response.body.should include('name')
|
22
58
|
end
|
@@ -171,6 +171,9 @@
|
|
171
171
|
files = getFilesFromResponse(data),
|
172
172
|
template,
|
173
173
|
deferred;
|
174
|
+
var options = that.options;
|
175
|
+
if (options.singular) { options.filesContainer.html(data.context || '') };
|
176
|
+
options.dropZone.find('.uploader-errors').text('');
|
174
177
|
if (data.context) {
|
175
178
|
data.context.each(function (index) {
|
176
179
|
var file = files[index] ||
|
@@ -218,6 +221,9 @@
|
|
218
221
|
$(this).data('fileupload'),
|
219
222
|
template,
|
220
223
|
deferred;
|
224
|
+
try { var errors = data._response.jqXHR.responseJSON.files[0].error || ''}
|
225
|
+
catch (e) { var errors = '' }
|
226
|
+
that.options.dropZone.find('.uploader-errors').text(errors);
|
221
227
|
if (data.context) {
|
222
228
|
data.context.each(function (index) {
|
223
229
|
if (data.errorThrown !== 'abort') {
|
@@ -237,6 +243,7 @@
|
|
237
243
|
that._trigger('failed', e, data);
|
238
244
|
that._trigger('finished', e, data);
|
239
245
|
deferred.resolve();
|
246
|
+
data.context.remove();
|
240
247
|
}
|
241
248
|
);
|
242
249
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-uploader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Galeta
|
@@ -9,24 +9,10 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-04-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
requirements:
|
18
|
-
- - ">="
|
19
|
-
- !ruby/object:Gem::Version
|
20
|
-
version: '0'
|
21
|
-
type: :runtime
|
22
|
-
prerelease: false
|
23
|
-
version_requirements: !ruby/object:Gem::Requirement
|
24
|
-
requirements:
|
25
|
-
- - ">="
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
version: '0'
|
28
|
-
- !ruby/object:Gem::Dependency
|
29
|
-
name: sqlite3
|
15
|
+
name: carrierwave
|
30
16
|
requirement: !ruby/object:Gem::Requirement
|
31
17
|
requirements:
|
32
18
|
- - ">="
|
@@ -40,7 +26,7 @@ dependencies:
|
|
40
26
|
- !ruby/object:Gem::Version
|
41
27
|
version: '0'
|
42
28
|
- !ruby/object:Gem::Dependency
|
43
|
-
name:
|
29
|
+
name: mongoid
|
44
30
|
requirement: !ruby/object:Gem::Requirement
|
45
31
|
requirements:
|
46
32
|
- - ">="
|
@@ -54,7 +40,7 @@ dependencies:
|
|
54
40
|
- !ruby/object:Gem::Version
|
55
41
|
version: '0'
|
56
42
|
- !ruby/object:Gem::Dependency
|
57
|
-
name:
|
43
|
+
name: sqlite3
|
58
44
|
requirement: !ruby/object:Gem::Requirement
|
59
45
|
requirements:
|
60
46
|
- - ">="
|
@@ -107,10 +93,12 @@ files:
|
|
107
93
|
- lib/uploader/hooks/active_record.rb
|
108
94
|
- lib/uploader/hooks/formtastic.rb
|
109
95
|
- lib/uploader/hooks/simple_form.rb
|
96
|
+
- lib/uploader/json_rendering.rb
|
110
97
|
- lib/uploader/upload_request.rb
|
111
98
|
- lib/uploader/version.rb
|
112
99
|
- spec/dummy/README.rdoc
|
113
100
|
- spec/dummy/Rakefile
|
101
|
+
- spec/dummy/app/assets/config/manifest.js
|
114
102
|
- spec/dummy/app/assets/javascripts/application.js
|
115
103
|
- spec/dummy/app/assets/stylesheets/application.css
|
116
104
|
- spec/dummy/app/controllers/application_controller.rb
|
@@ -183,50 +171,51 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
183
171
|
version: '0'
|
184
172
|
requirements: []
|
185
173
|
rubyforge_project: rails-uploader
|
186
|
-
rubygems_version: 2.6.
|
174
|
+
rubygems_version: 2.7.6.2
|
187
175
|
signing_key:
|
188
176
|
specification_version: 4
|
189
177
|
summary: Rails file upload implementation with jQuery-File-Upload
|
190
178
|
test_files:
|
179
|
+
- spec/fileuploads_spec.rb
|
180
|
+
- spec/requests/attachments_controller_spec.rb
|
181
|
+
- spec/mongoid_spec.rb
|
182
|
+
- spec/factories/assets.rb
|
183
|
+
- spec/factories/articles.rb
|
184
|
+
- spec/factories/files/rails.png
|
185
|
+
- spec/spec_helper.rb
|
186
|
+
- spec/uploader_spec.rb
|
187
|
+
- spec/mongoid.yml
|
188
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
189
|
+
- spec/dummy/app/uploaders/picture_uploader.rb
|
190
|
+
- spec/dummy/app/helpers/application_helper.rb
|
191
|
+
- spec/dummy/app/controllers/application_controller.rb
|
192
|
+
- spec/dummy/app/assets/config/manifest.js
|
191
193
|
- spec/dummy/app/assets/javascripts/application.js
|
192
194
|
- spec/dummy/app/assets/stylesheets/application.css
|
193
|
-
- spec/dummy/app/
|
194
|
-
- spec/dummy/app/helpers/application_helper.rb
|
195
|
+
- spec/dummy/app/models/picture.rb
|
195
196
|
- spec/dummy/app/models/article.rb
|
196
197
|
- spec/dummy/app/models/asset.rb
|
197
|
-
- spec/dummy/
|
198
|
-
- spec/dummy/
|
199
|
-
- spec/dummy/
|
198
|
+
- spec/dummy/README.rdoc
|
199
|
+
- spec/dummy/public/500.html
|
200
|
+
- spec/dummy/public/422.html
|
201
|
+
- spec/dummy/public/404.html
|
202
|
+
- spec/dummy/public/favicon.ico
|
203
|
+
- spec/dummy/Rakefile
|
200
204
|
- spec/dummy/config/application.rb
|
201
205
|
- spec/dummy/config/boot.rb
|
202
|
-
- spec/dummy/config/
|
206
|
+
- spec/dummy/config/initializers/secret_token.rb
|
207
|
+
- spec/dummy/config/initializers/inflections.rb
|
208
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
209
|
+
- spec/dummy/config/initializers/session_store.rb
|
210
|
+
- spec/dummy/config/initializers/mime_types.rb
|
211
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
203
212
|
- spec/dummy/config/environment.rb
|
213
|
+
- spec/dummy/config/database.yml
|
204
214
|
- spec/dummy/config/environments/development.rb
|
205
215
|
- spec/dummy/config/environments/production.rb
|
206
216
|
- spec/dummy/config/environments/test.rb
|
207
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
208
|
-
- spec/dummy/config/initializers/inflections.rb
|
209
|
-
- spec/dummy/config/initializers/mime_types.rb
|
210
|
-
- spec/dummy/config/initializers/secret_token.rb
|
211
|
-
- spec/dummy/config/initializers/session_store.rb
|
212
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
213
217
|
- spec/dummy/config/locales/en.yml
|
214
218
|
- spec/dummy/config/routes.rb
|
215
|
-
- spec/dummy/config.ru
|
216
219
|
- spec/dummy/db/migrate/20120508093830_create_articles.rb
|
217
|
-
- spec/dummy/
|
218
|
-
- spec/dummy/public/422.html
|
219
|
-
- spec/dummy/public/500.html
|
220
|
-
- spec/dummy/public/favicon.ico
|
221
|
-
- spec/dummy/Rakefile
|
222
|
-
- spec/dummy/README.rdoc
|
220
|
+
- spec/dummy/config.ru
|
223
221
|
- spec/dummy/script/rails
|
224
|
-
- spec/factories/articles.rb
|
225
|
-
- spec/factories/assets.rb
|
226
|
-
- spec/factories/files/rails.png
|
227
|
-
- spec/fileuploads_spec.rb
|
228
|
-
- spec/mongoid.yml
|
229
|
-
- spec/mongoid_spec.rb
|
230
|
-
- spec/requests/attachments_controller_spec.rb
|
231
|
-
- spec/spec_helper.rb
|
232
|
-
- spec/uploader_spec.rb
|