Skip to content

Commit 5cb7550

Browse files
committed
Update README.
1 parent cda400e commit 5cb7550

File tree

6 files changed

+78
-53
lines changed

6 files changed

+78
-53
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
.bundle
33
Gemfile.lock
44
pkg/*
5+
.rvmrc

Gemfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
source "http://rubygems.org"
1+
source 'https://rubygems.org'
22

3-
# Specify your gem's dependencies in jquery-fileupload-rails.gemspec
43
gemspec

README.md

Lines changed: 52 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,29 @@
11
# jQuery File Upload for Rails
22

3-
[jQuery-File-Plugin](https://github.com/blueimp/jQuery-File-Upload) is a file upload plugin written by [Sebastian Tschan](https://github.com/blueimp). jQuery File Upload features multiple file selection, drag&drop support, progress bars and preview images for jQuery. Supports cross-domain, chunked and resumable file uploads and client-side image resizing.
3+
[jQuery-File-Plugin][1] is a file upload plugin written by [Sebastian Tschan][2]. jQuery File Upload features multiple file selection, drag&drop support, progress bars and preview images for jQuery. Supports cross-domain, chunked and resumable file uploads and client-side image resizing.
44

5-
jquery-fileupload-rails is a library that integrates jQuery File Upload for Rails 3.1 Asset Pipeline (Rails 3.2 supported).
5+
`jquery-fileupload-rails` is a library that integrates jQuery File Upload for Rails 3 and 4 Asset Pipeline.
66

77
## Plugin versions
88

9-
* jQuery File Upload User Interface Plugin 6.11
10-
* jQuery File Upload Plugin 5.19.3
11-
* jQuery UI Widget 1.9.1+amd
9+
| jQuery Plugin | Version |
10+
|:------------------------------------------|:----------:|
11+
| File Upload User Interface Plugin | 9.5.2 |
12+
| File Upload Plugin | 5.40.1 |
13+
| UI Widget | 1.10.4+amd |
14+
| File Upload AngularJS Plugin | 2.2.0 |
15+
| File Upload Audio Preview Plugin | 1.0.3 |
16+
| File Upload Image Preview & Resize Plugin | 1.7.1 |
17+
| File Upload Processing Plugin | 1.3.0 |
18+
| File Upload Validation Plugin | 1.1.2 |
19+
| File Upload Video Preview Plugin | 1.0.3 |
1220

1321
## Installing Gem
22+
```ruby
23+
gem 'jquery-fileupload-rails', github: 'futhr/jquery-fileupload-rails'
24+
```
1425

15-
gem "jquery-fileupload-rails"
26+
**NOTE:** _This gem's upstream has not been maintained for long time so its recommended to fork above branch until it been merged._
1627

1728
## Using the javascripts
1829

@@ -22,17 +33,21 @@ Require jquery-fileupload in your app/assets/application.js file.
2233

2334
The snippet above will add the following js files to the mainfest file.
2435

25-
//= require jquery-fileupload/vendor/jquery.ui.widget
26-
//= require jquery-fileupload/vendor/load-image
27-
//= require jquery-fileupload/vendor/canvas-to-blob
28-
//= require jquery-fileupload/vendor/tmpl
29-
//= require jquery-fileupload/jquery.iframe-transport
30-
//= require jquery-fileupload/jquery.fileupload
31-
//= require jquery-fileupload/jquery.fileupload-fp
32-
//= require jquery-fileupload/jquery.fileupload-ui
33-
//= require jquery-fileupload/locale
34-
35-
If you only need the basic files, just add the code below to your application.js file. [Basic setup guide](https://github.com/blueimp/jQuery-File-Upload/wiki/Basic-plugin)
36+
//=require jquery-fileupload/vendor/jquery.ui.widget
37+
//=require jquery-fileupload/vendor/load-image
38+
//=require jquery-fileupload/vendor/canvas-to-blob
39+
//=require jquery-fileupload/vendor/tmpl
40+
//=require jquery-fileupload/jquery.iframe-transport
41+
//=require jquery-fileupload/jquery.fileupload
42+
//=require jquery-fileupload/jquery.fileupload-process
43+
//=require jquery-fileupload/jquery.fileupload-image
44+
//=require jquery-fileupload/jquery.fileupload-audio
45+
//=require jquery-fileupload/jquery.fileupload-video
46+
//=require jquery-fileupload/jquery.fileupload-validate
47+
//=require jquery-fileupload/jquery.fileupload-ui
48+
//=require jquery-fileupload/locale
49+
50+
If you only need the basic files, just add the code below to your application.js file. [Basic setup guide][3]
3651

3752
//= require jquery-fileupload/basic
3853

@@ -48,25 +63,34 @@ Require the stylesheet file to app/assets/stylesheets/application.css
4863

4964
*= require jquery.fileupload-ui
5065

51-
## Using the middleware
52-
53-
The `jquery.iframe-transport` fallback transport has some special caveats regarding the response data type, http status, and character encodings. `jquery-fileupload-rails` includes a middleware that handles these inconsistencies seamlessly. If you decide to use it, create an initializer that adds the middleware to your application's middleware stack.
66+
Additionally you can add support files:
5467

55-
Rails.application.config.middleware.use JQuery::FileUpload::Rails::Middleware
68+
*= require jquery.fileupload-ui-noscript
69+
*= require jquery.fileupload-noscript
70+
*= require jquery.fileupload
5671

57-
## [Example app](https://github.com/tors/jquery-fileupload-rails-paperclip-example)
58-
This app uses paperclip and twitter-bootstrap-rails
72+
## Using the middleware
5973

60-
You can also check out Ryan Bate's RailsCast [jQuery File Upload episode](http://railscasts.com/episodes/381-jquery-file-upload). You will
61-
need a pro account to watch it though.
74+
The `jquery.iframe-transport` fallback transport has some special caveats regarding the response data type, http status, and character encodings. `jquery-fileupload-rails` includes a middleware that handles these inconsistencies seamlessly. If you decide to use it, create an initializer that adds the middleware to your application's middleware stack.
75+
```ruby
76+
Rails.application.config.middleware.use JQuery::FileUpload::Rails::Middleware
77+
```
6278

79+
You can also check out Ryan Bate's RailsCast [jQuery File Upload episode][4]. You will need a pro account to watch it though.
6380

6481
## Thanks
65-
Thanks to [Sebastian Tschan](https://github.com/blueimp) for writing an awesome file upload plugin.
82+
Thanks to [Sebastian Tschan][2] for writing an awesome file upload plugin.
6683

6784
## License
68-
Copyright (c) 2012 Tors Dalid
85+
Copyright (c) 2014 [Tors Dalid][6] and [contributors][5]
6986

70-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
87+
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7188
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7289
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
90+
91+
[1]: https://github.com/blueimp/jQuery-File-Upload
92+
[2]: https://github.com/blueimp
93+
[3]: https://github.com/blueimp/jQuery-File-Upload/wiki/Basic-plugin
94+
[4]: http://railscasts.com/episodes/381-jquery-file-upload?view=comments
95+
[5]: https://github.com/tors/jquery-fileupload-rails/graphs/contributors
96+
[6]: https://github.com/tors

Rakefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
require 'bundler'
33
Bundler::GemHelper.install_tasks
44

5-
desc "Bundle the gem"
5+
desc 'Bundle the gem'
66
task :bundle do
7-
sh('bundle install')
7+
sh 'bundle install'
88
sh 'gem build *.gemspec'
99
sh 'gem install *.gem'
1010
sh 'rm *.gem'
1111
end
1212

1313
task(:default).clear
14-
task :default => :bundle
15-
14+
task default: :bundle

jquery-fileupload-rails.gemspec

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
# -*- encoding: utf-8 -*-
2-
$:.push File.expand_path("../lib", __FILE__)
3-
require "jquery/fileupload/rails/version"
2+
$:.push File.expand_path('../lib', __FILE__)
3+
require 'jquery/fileupload/rails/version'
44

55
Gem::Specification.new do |s|
6-
s.name = "jquery-fileupload-rails"
6+
s.platform = Gem::Platform::RUBY
7+
s.name = 'jquery-fileupload-rails'
78
s.version = JQuery::FileUpload::Rails::VERSION
8-
s.authors = ["Tors Dalid"]
9-
s.email = ["cletedalid@gmail.com"]
10-
s.homepage = "https://github.com/tors/jquery-fileupload-rails"
11-
s.summary = %q{jQuery File Upload for Rails 3.1 Asset Pipeline}
12-
s.description = %q{jQuery File Upload by Sebastian Tschan integrated for Rails 3.1 Asset Pipeline}
9+
s.author = 'Tors Dalid'
10+
s.email = 'cletedalid@gmail.com'
11+
s.homepage = 'https://github.com/tors/jquery-fileupload-rails'
12+
s.summary = %q{jQuery File Upload for Rails 3 and 4 Asset Pipeline}
13+
s.description = %q{jQuery File Upload by Sebastian Tschan integrated for Rails 3 and 4 Asset Pipeline}
1314

14-
s.rubyforge_project = "jquery-fileupload-rails"
15+
s.required_ruby_version = '>= 1.9.3'
16+
s.rubyforge_project = 'jquery-fileupload-rails'
1517

16-
s.files = Dir["lib/**/*"] + Dir["vendor/**/*"] + ["Rakefile", "README.md"]
17-
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18-
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19-
s.require_paths = ["lib"]
18+
s.files = `git ls-files`.split("\n")
19+
s.test_files = `git ls-files -- spec/*`.split("\n")
20+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
21+
s.require_path = 'lib'
2022

21-
s.add_dependency 'railties', '>= 3.1'
22-
s.add_dependency 'actionpack', '>= 3.1'
23-
s.add_development_dependency 'rails', '>= 3.1'
23+
s.add_runtime_dependency 'railties', '>= 3.1'
24+
s.add_runtime_dependency 'actionpack', '>= 3.1'
25+
s.add_development_dependency 'rails', '>= 3.1'
2426
end

lib/jquery/fileupload/rails/upload.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
require "jquery/fileupload/rails/engine"
2-
require "jquery/fileupload/rails/version"
3-
require "jquery/fileupload/rails/middleware"
1+
require 'jquery/fileupload/rails/engine'
2+
require 'jquery/fileupload/rails/version'
3+
require 'jquery/fileupload/rails/middleware'

0 commit comments

Comments
 (0)