jquery.fileupload-rails-ui-6 1.12.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.
Files changed (37) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +4 -0
  3. data/.gitmodules +3 -0
  4. data/Gemfile +4 -0
  5. data/Rakefile +40 -0
  6. data/Readme.md +93 -0
  7. data/demo/.gitignore +3 -0
  8. data/demo/Gemfile +8 -0
  9. data/demo/Rakefile +2 -0
  10. data/demo/Readme.md +12 -0
  11. data/demo/app/assets/javascripts/application.js.coffee +9 -0
  12. data/demo/app/controllers/application_controller.rb +7 -0
  13. data/demo/app/views/application/basic.html.erb +12 -0
  14. data/demo/app/views/application/create.html.erb +1 -0
  15. data/demo/app/views/application/ui.html.erb +1 -0
  16. data/demo/app/views/layouts/application.html.erb +13 -0
  17. data/demo/bin/bundle +3 -0
  18. data/demo/bin/rails +4 -0
  19. data/demo/bin/rake +4 -0
  20. data/demo/config/application.rb +21 -0
  21. data/demo/config/boot.rb +6 -0
  22. data/demo/config/environment.rb +5 -0
  23. data/demo/config/routes.rb +6 -0
  24. data/demo/config.ru +4 -0
  25. data/demo/log/.gitkeep +0 -0
  26. data/dependencies.json +4 -0
  27. data/jquery.fileupload-rails-ui-6.gemspec +17 -0
  28. data/lib/jquery.fileupload-rails.rb +9 -0
  29. data/vendor/assets/javascripts/jquery.fileupload.js +1460 -0
  30. data/vendor/assets/javascripts/jquery.iframe-transport.js +214 -0
  31. data/vendor/legacy_assets/javascripts/jquery.fileupload-fp.js +219 -0
  32. data/vendor/legacy_assets/javascripts/jquery.fileupload-ip.js +160 -0
  33. data/vendor/legacy_assets/javascripts/jquery.fileupload-ui.js +702 -0
  34. data/vendor/legacy_assets/javascripts/jquery.postmessage-transport.js +117 -0
  35. data/vendor/legacy_assets/javascripts/jquery.xdr-transport.js +85 -0
  36. data/vendor/legacy_assets/stylesheets/jquery.fileupload-ui.css +84 -0
  37. metadata +106 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 5d0457f955c4b367f46c5073ff3f6dc9b33ff6f06fbb80482213a3eef266fb50
4
+ data.tar.gz: ac419f4c8791e45fe3caf1999369ca3a083e281a715eaafa18e7616671714ee0
5
+ SHA512:
6
+ metadata.gz: 9ee60227b508f6943e7eaefb0868874c7db8b776dd1e0f0e04c480c53aaa33cdf5cfc363ab5c95f3d174a91bf55a93f3d0fcf263b3dbc04d41072728d88e8986
7
+ data.tar.gz: 941e7894c396a4d0130c3a68e089a85bc50169df82e60fa9beab1f837a1cea695e5e598145928073736ff551121e9dbce7e57309f5943c815d71e15b8179d816
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/.gitmodules ADDED
@@ -0,0 +1,3 @@
1
+ [submodule "jQuery-File-Upload"]
2
+ path = jQuery-File-Upload
3
+ url = git://github.com/blueimp/jQuery-File-Upload.git
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in jquery.fileupload-rails.gemspec
4
+ gemspec
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'
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
@@ -0,0 +1,3 @@
1
+ /.bundle
2
+ /log/*.log
3
+ /tmp
data/demo/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'rails', '4.1.4'
4
+
5
+ gem 'coffee-rails', '~> 4.0.0'
6
+ gem 'jquery-rails', '~> 3.1.0'
7
+ gem 'jquery-ui-rails', '~> 6.0.1'
8
+ gem 'jquery.fileupload-rails', path: '..'
data/demo/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require File.expand_path('../config/application', __FILE__)
2
+ Rails.application.load_tasks
data/demo/Readme.md ADDED
@@ -0,0 +1,12 @@
1
+ Start up the app:
2
+
3
+ bundle install
4
+ rails server
5
+
6
+ And head over to the home page: http://localhost:3000
7
+
8
+ Files to look at:
9
+
10
+ app/assets/javascripts/application.js.coffee
11
+ app/controllers/application_controller.rb
12
+ app/views/application/*
@@ -0,0 +1,9 @@
1
+ #= require jquery
2
+ #= require jquery_ujs
3
+ #= require jquery.fileupload
4
+
5
+ $ ->
6
+ $('#basic').fileupload
7
+ done: (e, data)->
8
+ console.log "Done", data.result
9
+ $("body").append(data.result)
@@ -0,0 +1,7 @@
1
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery
3
+
4
+ def create
5
+ render layout: false, content_type: "text/html"
6
+ end
7
+ end
@@ -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" %>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Demo</title>
5
+ <%= javascript_include_tag "application" %>
6
+ <%= csrf_meta_tags %>
7
+ </head>
8
+ <body>
9
+
10
+ <%= yield %>
11
+
12
+ </body>
13
+ </html>
data/demo/bin/bundle ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
data/demo/bin/rails ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
data/demo/bin/rake ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -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
@@ -0,0 +1,6 @@
1
+ require 'rubygems'
2
+
3
+ # Set up gems listed in the Gemfile.
4
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
5
+
6
+ require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
@@ -0,0 +1,5 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ Demo::Application.initialize!
@@ -0,0 +1,6 @@
1
+ Demo::Application.routes.draw do
2
+ get '/' => 'application#basic'
3
+ post '/' => 'application#create'
4
+
5
+ get ':action', controller: "application"
6
+ end
data/demo/config.ru ADDED
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Demo::Application
data/demo/log/.gitkeep ADDED
File without changes
data/dependencies.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "jquery.fileupload": ["jquery-ui/widget", "jquery.iframe-transport"],
3
+ "jquery.iframe-transport": []
4
+ }
@@ -0,0 +1,17 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = "jquery.fileupload-rails-ui-6"
5
+ s.version = "1.12.0"
6
+ s.author = "Anton Topal"
7
+ s.email = "topalantt@gmail.com"
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 = "Apache-2.0"
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
@@ -0,0 +1,9 @@
1
+ require "jquery-ui-rails"
2
+
3
+ module JqueryFileUpload
4
+ module Rails
5
+ class Rails::Engine < ::Rails::Engine
6
+ paths['vendor/assets'] << 'vendor/legacy_assets'
7
+ end
8
+ end
9
+ end