uploader 1.0.3 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +109 -0
- data/README.rdoc +2 -0
- data/VERSION +1 -1
- data/app/helpers/uploader_helper.rb +3 -3
- data/test/rails_root/config/application.rb +52 -0
- data/test/rails_root/config/initializers/backtrace_silencers.rb +7 -0
- data/test/rails_root/config/initializers/secret_token.rb +7 -0
- data/uploader.gemspec +9 -2
- metadata +12 -5
data/Gemfile.lock
ADDED
@@ -0,0 +1,109 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
abstract (1.0.0)
|
5
|
+
actionmailer (3.0.0)
|
6
|
+
actionpack (= 3.0.0)
|
7
|
+
mail (~> 2.2.5)
|
8
|
+
actionpack (3.0.0)
|
9
|
+
activemodel (= 3.0.0)
|
10
|
+
activesupport (= 3.0.0)
|
11
|
+
builder (~> 2.1.2)
|
12
|
+
erubis (~> 2.6.6)
|
13
|
+
i18n (~> 0.4.1)
|
14
|
+
rack (~> 1.2.1)
|
15
|
+
rack-mount (~> 0.6.12)
|
16
|
+
rack-test (~> 0.5.4)
|
17
|
+
tzinfo (~> 0.3.23)
|
18
|
+
activemodel (3.0.0)
|
19
|
+
activesupport (= 3.0.0)
|
20
|
+
builder (~> 2.1.2)
|
21
|
+
i18n (~> 0.4.1)
|
22
|
+
activerecord (3.0.0)
|
23
|
+
activemodel (= 3.0.0)
|
24
|
+
activesupport (= 3.0.0)
|
25
|
+
arel (~> 1.0.0)
|
26
|
+
tzinfo (~> 0.3.23)
|
27
|
+
activeresource (3.0.0)
|
28
|
+
activemodel (= 3.0.0)
|
29
|
+
activesupport (= 3.0.0)
|
30
|
+
activesupport (3.0.0)
|
31
|
+
arel (1.0.1)
|
32
|
+
activesupport (~> 3.0.0)
|
33
|
+
builder (2.1.2)
|
34
|
+
capybara (0.3.9)
|
35
|
+
culerity (>= 0.2.4)
|
36
|
+
mime-types (>= 1.16)
|
37
|
+
nokogiri (>= 1.3.3)
|
38
|
+
rack (>= 1.0.0)
|
39
|
+
rack-test (>= 0.5.4)
|
40
|
+
selenium-webdriver (>= 0.0.3)
|
41
|
+
columnize (0.3.1)
|
42
|
+
culerity (0.2.12)
|
43
|
+
erubis (2.6.6)
|
44
|
+
abstract (>= 1.0.0)
|
45
|
+
factory_girl (1.3.2)
|
46
|
+
ffi (0.6.3)
|
47
|
+
rake (>= 0.8.7)
|
48
|
+
i18n (0.4.1)
|
49
|
+
json_pure (1.4.6)
|
50
|
+
linecache (0.43)
|
51
|
+
mail (2.2.5)
|
52
|
+
activesupport (>= 2.3.6)
|
53
|
+
mime-types
|
54
|
+
treetop (>= 1.4.5)
|
55
|
+
mime-types (1.16)
|
56
|
+
mysql (2.8.1)
|
57
|
+
nokogiri (1.4.3.1)
|
58
|
+
paperclip (2.3.3)
|
59
|
+
activerecord
|
60
|
+
activesupport
|
61
|
+
polyglot (0.3.1)
|
62
|
+
rack (1.2.1)
|
63
|
+
rack-mount (0.6.13)
|
64
|
+
rack (>= 1.0.0)
|
65
|
+
rack-test (0.5.4)
|
66
|
+
rack (>= 1.0)
|
67
|
+
rails (3.0.0)
|
68
|
+
actionmailer (= 3.0.0)
|
69
|
+
actionpack (= 3.0.0)
|
70
|
+
activerecord (= 3.0.0)
|
71
|
+
activeresource (= 3.0.0)
|
72
|
+
activesupport (= 3.0.0)
|
73
|
+
bundler (~> 1.0.0)
|
74
|
+
railties (= 3.0.0)
|
75
|
+
railties (3.0.0)
|
76
|
+
actionpack (= 3.0.0)
|
77
|
+
activesupport (= 3.0.0)
|
78
|
+
rake (>= 0.8.4)
|
79
|
+
thor (~> 0.14.0)
|
80
|
+
rake (0.8.7)
|
81
|
+
ruby-debug (0.10.3)
|
82
|
+
columnize (>= 0.1)
|
83
|
+
ruby-debug-base (~> 0.10.3.0)
|
84
|
+
ruby-debug-base (0.10.3)
|
85
|
+
linecache (>= 0.3)
|
86
|
+
rubyzip (0.9.4)
|
87
|
+
selenium-webdriver (0.0.28)
|
88
|
+
ffi (>= 0.6.1)
|
89
|
+
json_pure
|
90
|
+
rubyzip
|
91
|
+
shoulda (2.11.3)
|
92
|
+
thor (0.14.0)
|
93
|
+
treetop (1.4.8)
|
94
|
+
polyglot (>= 0.3.1)
|
95
|
+
tzinfo (0.3.23)
|
96
|
+
|
97
|
+
PLATFORMS
|
98
|
+
ruby
|
99
|
+
|
100
|
+
DEPENDENCIES
|
101
|
+
capybara (>= 0.3.9)
|
102
|
+
factory_girl
|
103
|
+
mime-types
|
104
|
+
mysql
|
105
|
+
paperclip
|
106
|
+
rack
|
107
|
+
rails (= 3.0.0)
|
108
|
+
ruby-debug (>= 0.10.3)
|
109
|
+
shoulda
|
data/README.rdoc
CHANGED
@@ -5,6 +5,8 @@ Uploader makes it easy to integrate multiple file uploads into your application
|
|
5
5
|
== ----NOTES----
|
6
6
|
SWFUpload hasn't been updated in a while and tends to be buggy. We have added uploadify. We recommend using that instead.
|
7
7
|
|
8
|
+
This branch has been setup to maintain compatibility with Rails2. Future versions of uploader will focus on Rails 3.
|
9
|
+
|
8
10
|
== Installation
|
9
11
|
|
10
12
|
=== Install the gem:
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
2.0.0
|
@@ -28,10 +28,10 @@ module UploaderHelper
|
|
28
28
|
# display_upload_indicators: Indicates whether or not to show the upload progress
|
29
29
|
# container_prefix: Prefixes each id in the html with the specified text. Useful if there is to be more than one form on a page.
|
30
30
|
# Options is a hash containing any valid option for uploadify:
|
31
|
-
#
|
32
|
-
|
31
|
+
# http://www.uploadify.com/documentation/
|
32
|
+
# format: either js or json. js will fire a callback.
|
33
|
+
def uploadify_form(parent, display_upload_indicators = true, container_prefix = '', options = {}, format = 'js')
|
33
34
|
container_prefix = 'uploadify' if container_prefix.blank?
|
34
|
-
format = 'js'
|
35
35
|
uploadify_options = {
|
36
36
|
:uploader => '/swf/uploadify.swf',
|
37
37
|
:script => multiupload_uploads_path({:format => format}),
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require "active_model/railtie"
|
4
|
+
require "active_record/railtie"
|
5
|
+
require "action_controller/railtie"
|
6
|
+
require "action_view/railtie"
|
7
|
+
require "action_mailer/railtie"
|
8
|
+
|
9
|
+
Bundler.require
|
10
|
+
require "uploader"
|
11
|
+
|
12
|
+
# Load a global constant so the initializers can use them
|
13
|
+
require 'ostruct'
|
14
|
+
require 'yaml'
|
15
|
+
|
16
|
+
::GlobalConfig = OpenStruct.new(YAML.load_file("#{RAILS_ROOT}/config/global_config.yml")[RAILS_ENV])
|
17
|
+
|
18
|
+
|
19
|
+
module RailsRoot
|
20
|
+
class Application < Rails::Application
|
21
|
+
# Settings in config/environments/* take precedence over those specified here.
|
22
|
+
# Application configuration should go into files in config/initializers
|
23
|
+
# -- all .rb files in that directory are automatically loaded.
|
24
|
+
|
25
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
26
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
27
|
+
|
28
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
29
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
30
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
31
|
+
|
32
|
+
# Activate observers that should always be running.
|
33
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
34
|
+
|
35
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
36
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
37
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
38
|
+
|
39
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
40
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
41
|
+
# config.i18n.default_locale = :de
|
42
|
+
|
43
|
+
# JavaScript files you want as :defaults (application.js is always included).
|
44
|
+
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
|
45
|
+
|
46
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
47
|
+
config.encoding = "utf-8"
|
48
|
+
|
49
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
50
|
+
config.filter_parameters += [:password]
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
Dummy::Application.config.secret_token = GlobalConfig.session_secret
|
data/uploader.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{uploader}
|
8
|
-
s.version = "
|
8
|
+
s.version = "2.0.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Justin Ball", "Joel Duffin", "David South"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-09-01}
|
13
13
|
s.description = %q{Uploader gem that makes it simple add multiple file uploads to your Rails project using SWFUpload, Uploadify and Paperclip}
|
14
14
|
s.email = %q{justinball@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.files = [
|
20
20
|
".gitignore",
|
21
21
|
"Gemfile",
|
22
|
+
"Gemfile.lock",
|
22
23
|
"MIT-LICENSE",
|
23
24
|
"README.rdoc",
|
24
25
|
"Rakefile",
|
@@ -166,6 +167,7 @@ Gem::Specification.new do |s|
|
|
166
167
|
"test/rails_root/app/views/default/uploadify.html.erb",
|
167
168
|
"test/rails_root/app/views/layouts/application.html.erb",
|
168
169
|
"test/rails_root/config/amazon_s3.yml",
|
170
|
+
"test/rails_root/config/application.rb",
|
169
171
|
"test/rails_root/config/boot.rb",
|
170
172
|
"test/rails_root/config/database.yml",
|
171
173
|
"test/rails_root/config/environment.rb",
|
@@ -173,10 +175,12 @@ Gem::Specification.new do |s|
|
|
173
175
|
"test/rails_root/config/environments/production.rb",
|
174
176
|
"test/rails_root/config/environments/test.rb",
|
175
177
|
"test/rails_root/config/global_config.yml",
|
178
|
+
"test/rails_root/config/initializers/backtrace_silencers.rb",
|
176
179
|
"test/rails_root/config/initializers/inflections.rb",
|
177
180
|
"test/rails_root/config/initializers/mime_types.rb",
|
178
181
|
"test/rails_root/config/initializers/requires.rb",
|
179
182
|
"test/rails_root/config/initializers/s3_credentials.rb",
|
183
|
+
"test/rails_root/config/initializers/secret_token.rb",
|
180
184
|
"test/rails_root/config/initializers/session_store.rb",
|
181
185
|
"test/rails_root/config/initializers/uploader.rb",
|
182
186
|
"test/rails_root/config/routes.rb",
|
@@ -332,15 +336,18 @@ Gem::Specification.new do |s|
|
|
332
336
|
"test/rails_root/app/controllers/uploads_controller.rb",
|
333
337
|
"test/rails_root/app/models/upload.rb",
|
334
338
|
"test/rails_root/app/models/user.rb",
|
339
|
+
"test/rails_root/config/application.rb",
|
335
340
|
"test/rails_root/config/boot.rb",
|
336
341
|
"test/rails_root/config/environment.rb",
|
337
342
|
"test/rails_root/config/environments/development.rb",
|
338
343
|
"test/rails_root/config/environments/production.rb",
|
339
344
|
"test/rails_root/config/environments/test.rb",
|
345
|
+
"test/rails_root/config/initializers/backtrace_silencers.rb",
|
340
346
|
"test/rails_root/config/initializers/inflections.rb",
|
341
347
|
"test/rails_root/config/initializers/mime_types.rb",
|
342
348
|
"test/rails_root/config/initializers/requires.rb",
|
343
349
|
"test/rails_root/config/initializers/s3_credentials.rb",
|
350
|
+
"test/rails_root/config/initializers/secret_token.rb",
|
344
351
|
"test/rails_root/config/initializers/session_store.rb",
|
345
352
|
"test/rails_root/config/initializers/uploader.rb",
|
346
353
|
"test/rails_root/config/routes.rb",
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uploader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
|
-
-
|
7
|
+
- 2
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version:
|
9
|
+
- 0
|
10
|
+
version: 2.0.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Justin Ball
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2010-
|
20
|
+
date: 2010-09-01 00:00:00 -06:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
@@ -88,6 +88,7 @@ extra_rdoc_files:
|
|
88
88
|
files:
|
89
89
|
- .gitignore
|
90
90
|
- Gemfile
|
91
|
+
- Gemfile.lock
|
91
92
|
- MIT-LICENSE
|
92
93
|
- README.rdoc
|
93
94
|
- Rakefile
|
@@ -235,6 +236,7 @@ files:
|
|
235
236
|
- test/rails_root/app/views/default/uploadify.html.erb
|
236
237
|
- test/rails_root/app/views/layouts/application.html.erb
|
237
238
|
- test/rails_root/config/amazon_s3.yml
|
239
|
+
- test/rails_root/config/application.rb
|
238
240
|
- test/rails_root/config/boot.rb
|
239
241
|
- test/rails_root/config/database.yml
|
240
242
|
- test/rails_root/config/environment.rb
|
@@ -242,10 +244,12 @@ files:
|
|
242
244
|
- test/rails_root/config/environments/production.rb
|
243
245
|
- test/rails_root/config/environments/test.rb
|
244
246
|
- test/rails_root/config/global_config.yml
|
247
|
+
- test/rails_root/config/initializers/backtrace_silencers.rb
|
245
248
|
- test/rails_root/config/initializers/inflections.rb
|
246
249
|
- test/rails_root/config/initializers/mime_types.rb
|
247
250
|
- test/rails_root/config/initializers/requires.rb
|
248
251
|
- test/rails_root/config/initializers/s3_credentials.rb
|
252
|
+
- test/rails_root/config/initializers/secret_token.rb
|
249
253
|
- test/rails_root/config/initializers/session_store.rb
|
250
254
|
- test/rails_root/config/initializers/uploader.rb
|
251
255
|
- test/rails_root/config/routes.rb
|
@@ -428,15 +432,18 @@ test_files:
|
|
428
432
|
- test/rails_root/app/controllers/uploads_controller.rb
|
429
433
|
- test/rails_root/app/models/upload.rb
|
430
434
|
- test/rails_root/app/models/user.rb
|
435
|
+
- test/rails_root/config/application.rb
|
431
436
|
- test/rails_root/config/boot.rb
|
432
437
|
- test/rails_root/config/environment.rb
|
433
438
|
- test/rails_root/config/environments/development.rb
|
434
439
|
- test/rails_root/config/environments/production.rb
|
435
440
|
- test/rails_root/config/environments/test.rb
|
441
|
+
- test/rails_root/config/initializers/backtrace_silencers.rb
|
436
442
|
- test/rails_root/config/initializers/inflections.rb
|
437
443
|
- test/rails_root/config/initializers/mime_types.rb
|
438
444
|
- test/rails_root/config/initializers/requires.rb
|
439
445
|
- test/rails_root/config/initializers/s3_credentials.rb
|
446
|
+
- test/rails_root/config/initializers/secret_token.rb
|
440
447
|
- test/rails_root/config/initializers/session_store.rb
|
441
448
|
- test/rails_root/config/initializers/uploader.rb
|
442
449
|
- test/rails_root/config/routes.rb
|