jquery.fileupload-rails-new 1.13.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 +7 -0
- data/.gitignore +4 -0
- data/.gitmodules +3 -0
- data/Gemfile +4 -0
- data/Rakefile +40 -0
- data/Readme.md +93 -0
- data/demo/.gitignore +3 -0
- data/demo/Gemfile +8 -0
- data/demo/Rakefile +2 -0
- data/demo/Readme.md +12 -0
- data/demo/app/assets/javascripts/application.js.coffee +9 -0
- data/demo/app/controllers/application_controller.rb +7 -0
- data/demo/app/views/application/basic.html.erb +12 -0
- data/demo/app/views/application/create.html.erb +1 -0
- data/demo/app/views/application/ui.html.erb +1 -0
- data/demo/app/views/layouts/application.html.erb +13 -0
- data/demo/bin/bundle +3 -0
- data/demo/bin/rails +4 -0
- data/demo/bin/rake +4 -0
- data/demo/config/application.rb +21 -0
- data/demo/config/boot.rb +6 -0
- data/demo/config/environment.rb +5 -0
- data/demo/config/routes.rb +6 -0
- data/demo/config.ru +4 -0
- data/demo/log/.gitkeep +0 -0
- data/dependencies.json +4 -0
- data/jquery.fileupload-rails-new.gemspec +17 -0
- data/lib/jquery.fileupload-rails.rb +9 -0
- data/vendor/assets/javascripts/jquery.fileupload.js +1460 -0
- data/vendor/assets/javascripts/jquery.iframe-transport.js +214 -0
- data/vendor/legacy_assets/javascripts/jquery.fileupload-fp.js +219 -0
- data/vendor/legacy_assets/javascripts/jquery.fileupload-ip.js +160 -0
- data/vendor/legacy_assets/javascripts/jquery.fileupload-ui.js +702 -0
- data/vendor/legacy_assets/javascripts/jquery.postmessage-transport.js +117 -0
- data/vendor/legacy_assets/javascripts/jquery.xdr-transport.js +85 -0
- data/vendor/legacy_assets/stylesheets/jquery.fileupload-ui.css +84 -0
- metadata +106 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d994a404ea19af7787f096cd5ac2c54dc017308db3426f57d620947bb5220ffe
|
4
|
+
data.tar.gz: 06d31c5afa4875d9d06d9ce96bcddde004a58b581589d4b76be9ddf3bd5078d0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6c2f408eb7983ea47d19bf8aa25e4c8febeba23e7d7bc9c1af3173c91592d7d31ae8a87b24a71968325a42c2aedafa6d7ec72f15945b50a5e2ae1653678ba490
|
7
|
+
data.tar.gz: 85ae7e7bc8b3a2d9a6a81e8f19ae5c985a019a872fbed11c3ef25a6a92f14211eca7d18a6a48610f58caf5b9f8392a57c5c41893ec9e46b409982a177a7e2176
|
data/.gitignore
ADDED
data/.gitmodules
ADDED
data/Gemfile
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'json'
|
2
|
+
require 'bundler/gem_tasks'
|
3
|
+
|
4
|
+
DEPENDENCY_HASH = JSON.load(File.read('dependencies.json'))
|
5
|
+
PROJECT_NAME = "jQuery-File-Upload"
|
6
|
+
|
7
|
+
task :submodule do
|
8
|
+
sh 'git submodule update --init' unless File.exist?("#{PROJECT_NAME}/README.md")
|
9
|
+
end
|
10
|
+
|
11
|
+
desc "Remove the vendor directory"
|
12
|
+
task :clean do
|
13
|
+
rm_rf 'vendor/assets'
|
14
|
+
end
|
15
|
+
|
16
|
+
desc "Generate the JavaScript assets"
|
17
|
+
task :javascripts => :submodule do
|
18
|
+
target_dir = "vendor/assets/javascripts"
|
19
|
+
mkdir_p target_dir
|
20
|
+
Rake.rake_output_message 'Generating javascripts'
|
21
|
+
DEPENDENCY_HASH.each do |name, dep_modules|
|
22
|
+
path = "#{PROJECT_NAME}/js/#{name}.js"
|
23
|
+
File.open("#{target_dir}/#{name}.js", "w") do |out|
|
24
|
+
dep_modules.each do |mod|
|
25
|
+
out.write("//= require #{mod}\n")
|
26
|
+
end
|
27
|
+
out.write("\n") unless dep_modules.empty?
|
28
|
+
source_code = File.read(path)
|
29
|
+
out.write(source_code)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
desc "Clean and then generate everything (default)"
|
35
|
+
task :assets => [:clean, :javascripts]
|
36
|
+
|
37
|
+
task :build => :assets
|
38
|
+
|
39
|
+
task :default => :assets
|
40
|
+
|
data/Readme.md
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
# jQuery File Upload for Rails
|
2
|
+
|
3
|
+
[jQuery File Upload][1] is a cross-browser javascript library for asynchronus Flash-free file uploading
|
4
|
+
by Sebastian Tschan (@blueimp). This gem packages it for the asset pipeline in Rails.
|
5
|
+
|
6
|
+
You should see the original project page for reference & documentation.
|
7
|
+
There are no instructions here on how to use the library itself.
|
8
|
+
|
9
|
+
## Usage
|
10
|
+
|
11
|
+
Add a line to your Gemfile.
|
12
|
+
|
13
|
+
gem 'jquery.fileupload-rails-new'
|
14
|
+
|
15
|
+
Now you can require the javascript library in application.js:
|
16
|
+
|
17
|
+
//= require jquery.fileupload
|
18
|
+
|
19
|
+
Included (no need to require):
|
20
|
+
|
21
|
+
* jQuery Iframe Transport for IE support.
|
22
|
+
* jQuery UI widget from [jquery-ui-rails][2]
|
23
|
+
|
24
|
+
Example Rails application can be found in "demo" directory.
|
25
|
+
|
26
|
+
## Upgrading 0.1 to 1.0
|
27
|
+
|
28
|
+
You can remove all dependencies of the plugin from you manifest. Before:
|
29
|
+
|
30
|
+
//= require jquery.ui
|
31
|
+
//= require jquery.iframe-transport
|
32
|
+
//= require jquery.fileupload
|
33
|
+
|
34
|
+
After:
|
35
|
+
|
36
|
+
//= require jquery.fileupload
|
37
|
+
|
38
|
+
If you downloaded jquery.ui assets into your project, delete them and use [jquery-ui-rails][2] gem instead.
|
39
|
+
|
40
|
+
## Changelog
|
41
|
+
|
42
|
+
1.12.0. Compatibility with new jQuery UI Rails 6.0 (jQuery UI 1.12.1).
|
43
|
+
|
44
|
+
1.11.0. Core 5.42.0.
|
45
|
+
|
46
|
+
1.10.1. Core 5.41.1.
|
47
|
+
|
48
|
+
1.10.0. Compatibility with new jQuery UI Rails 5.0 (jQuery UI 1.11).
|
49
|
+
|
50
|
+
1.9.0. Core 5.41.0.
|
51
|
+
|
52
|
+
1.8.1. Core 5.40.1.
|
53
|
+
|
54
|
+
1.8.0. Core 5.40.0, updated demo app.
|
55
|
+
|
56
|
+
1.7.0. Core 5.34.0.
|
57
|
+
|
58
|
+
1.6.1. Core 5.32.5, jQuery UI Rails 4 compatibility.
|
59
|
+
|
60
|
+
1.6.0. Core 5.32.2.
|
61
|
+
|
62
|
+
1.5.1. Core 5.31.
|
63
|
+
|
64
|
+
1.5.0. Core 5.30.
|
65
|
+
|
66
|
+
1.4.1. Core 5.28.8.
|
67
|
+
|
68
|
+
1.4.0. Core 5.28.4.
|
69
|
+
|
70
|
+
1.3.0. Core 5.26.
|
71
|
+
|
72
|
+
1.2.0. Core 5.21.1, demo instructions.
|
73
|
+
|
74
|
+
1.1.1. Core 5.19.4, jQuery UI 1.9, added licensing info.
|
75
|
+
|
76
|
+
1.0.0. Core 5.18.
|
77
|
+
|
78
|
+
Now rake task generates assets from official repo and adds dependencies automatically.
|
79
|
+
That means you can just require jquery.fileupload, no extra requires needed.
|
80
|
+
|
81
|
+
0.1.2. Fixed CSS that makes SASS 3.2 raise an error on rake assets:precompile
|
82
|
+
|
83
|
+
0.1.1. Core 5.11.2, UI 6.9.1, minor gemspec change.
|
84
|
+
|
85
|
+
0.1.0. Core 5.9.0, UI 6.6.2, added readme.
|
86
|
+
|
87
|
+
0.0.1. Core 5.5.2, UI 5.1.1.
|
88
|
+
|
89
|
+
[1]: https://github.com/blueimp/jQuery-File-Upload
|
90
|
+
[2]: https://github.com/joliss/jquery-ui-rails
|
91
|
+
|
92
|
+
## License
|
93
|
+
jQuery File Upload as well as this gem are released under the [MIT license](http://www.opensource.org/licenses/MIT).
|
data/demo/.gitignore
ADDED
data/demo/Gemfile
ADDED
data/demo/Rakefile
ADDED
data/demo/Readme.md
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
<p>
|
2
|
+
You can test the most basic functionality of jQuery File Upload on this page.<br />
|
3
|
+
First, open the log in Web Inspector. You shouldn't see any errors there.<br />
|
4
|
+
Try to upload one file, multiple files. You will see a Ruby array of uploaded files below.<br />
|
5
|
+
</p>
|
6
|
+
<p>
|
7
|
+
All browsers except Opera upload only one file per request.<br />
|
8
|
+
That means you will probably see an array of one element for each uploaded file.<br />
|
9
|
+
</p>
|
10
|
+
<%= form_tag "/", method: "post", id: "basic" do %>
|
11
|
+
<div><%= file_field_tag "files[]", multiple: true %></div>
|
12
|
+
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<div style="margin: 1em 0"><%= debug params[:files] %></div>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= javascript_include_tag "jquery.fileupload-ui" %>
|
data/demo/bin/bundle
ADDED
data/demo/bin/rails
ADDED
data/demo/bin/rake
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'action_controller/railtie'
|
4
|
+
require 'sprockets/railtie'
|
5
|
+
Bundler.require
|
6
|
+
|
7
|
+
module Demo
|
8
|
+
class Application < Rails::Application
|
9
|
+
config.cache_classes = false
|
10
|
+
config.eager_load = false
|
11
|
+
config.consider_all_requests_local = true
|
12
|
+
|
13
|
+
config.session_store :disabled
|
14
|
+
config.secret_key_base = "no"
|
15
|
+
config.active_support.deprecation = :log
|
16
|
+
config.action_dispatch.best_standards_support = :builtin
|
17
|
+
|
18
|
+
config.assets.enabled = true
|
19
|
+
config.assets.debug = true
|
20
|
+
end
|
21
|
+
end
|
data/demo/config/boot.rb
ADDED
data/demo/config.ru
ADDED
data/demo/log/.gitkeep
ADDED
File without changes
|
data/dependencies.json
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = "jquery.fileupload-rails-new"
|
5
|
+
s.version = "1.13.0"
|
6
|
+
s.author = "Semyon Perepelitsa"
|
7
|
+
s.email = "sema@sema.in"
|
8
|
+
s.homepage = "https://github.com/topalantt/jquery.fileupload-rails"
|
9
|
+
s.summary = %q{Use jQuery File Upload plugin with Rails 3}
|
10
|
+
s.description = %q{This gem packages jQuery File Upload plugin and it's dependencies for Rails asset pipeline.}
|
11
|
+
s.license = "MIT"
|
12
|
+
|
13
|
+
s.files = File.read('Manifest.txt').split("\n")
|
14
|
+
|
15
|
+
s.add_dependency 'railties', '>= 3.1'
|
16
|
+
s.add_dependency 'jquery-ui-rails', '~> 6.0'
|
17
|
+
end
|