plupload-rails 1.0.1 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
data/README.md
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
Rails 3.1 Integration for Plupload
|
2
|
+
==
|
3
|
+
|
4
|
+
This gem integrates [Plupload](http://www.plupload.com/) with the Rails 3.1 asset pipeline.
|
5
|
+
|
6
|
+
|
7
|
+
Install
|
8
|
+
--
|
9
|
+
|
10
|
+
Just add it got your Gemfile:
|
11
|
+
|
12
|
+
gem plupload-rails
|
13
|
+
|
14
|
+
|
15
|
+
Quick Start
|
16
|
+
--
|
17
|
+
|
18
|
+
Add to your application.js:
|
19
|
+
|
20
|
+
//= require plupload
|
21
|
+
//= require plupload.settings # optional, but recommended. it sets generic settings like flash url, etc.
|
22
|
+
//= require jquery.plupload.queue # optional, only if you want to use the jquery integration
|
23
|
+
//= require plupload.flash # optional, only needed if you want to use this runtime
|
24
|
+
//= require plupload.silverlight # optional, only needed if you want to use this runtime
|
25
|
+
//= require plupload.html4 # optional, only needed if you want to use this runtime
|
26
|
+
//= require plupload.html5 # optional, only needed if you want to use this runtime
|
27
|
+
//= require plupload.gears # optional, only needed if you want to use this runtime
|
28
|
+
//= require plupload.browserplus # optional, only needed if you want to use this runtime
|
29
|
+
|
30
|
+
|
31
|
+
Add to your application.scss:
|
32
|
+
@import "jquery.plupload.queue";
|
33
|
+
|
34
|
+
|
35
|
+
Simple example haml for your viwws:
|
36
|
+
|
37
|
+
div#uploader
|
38
|
+
javascript:
|
39
|
+
$(function(){
|
40
|
+
$("#uploader").pluploadQueue({
|
41
|
+
runtimes: 'gears,flash,silverlight,browserplus,html5',
|
42
|
+
url: '#{images_path}',
|
43
|
+
multipart_params: {
|
44
|
+
'#{{request_forgery_protection_token}}': '#{{form_authenticity_token}}',
|
45
|
+
'#{{request.session_options[:key]}}': '#{{request.session_options[:id]}}'
|
46
|
+
}
|
47
|
+
});
|
48
|
+
});
|
49
|
+
|
50
|
+
|
51
|
+
Updating
|
52
|
+
--
|
53
|
+
When new versions of Plupload are released, simply update the gem to the latest version. When you notice that there's no gem for the latest plupload, please contact me (or even better, create an issue/ pull request).
|
54
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# sadly there doesn't seem to be any other way to set global settings for plupload...
|
2
|
+
proxied = plupload.Uploader
|
3
|
+
plupload.Uploader = ->
|
4
|
+
settings = $.extend {}, arguments[0],
|
5
|
+
multipart: true
|
6
|
+
flash_swf_url: '<%=asset_path("plupload.flash.swf")%>'
|
7
|
+
silverlight_xap_url: '<%=asset_path("plupload.silverlight.xap")%>'
|
8
|
+
proxied.apply(this, [settings])
|
9
|
+
|
data/plupload-rails.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.authors = ["Corin Langosch"]
|
9
9
|
s.email = ["info@corinlangosch.com"]
|
10
10
|
s.homepage = "https://github.com/gucki/plupload-rails"
|
11
|
-
s.summary = %
|
12
|
-
s.description = %
|
11
|
+
s.summary = %Q{Integration of Plupload #{Plupload::VERSION} with the Rails 3.1 asset pipeline}
|
12
|
+
s.description = %Q{This gem integrates Plupload #{Plupload::VERSION} with the Rails 3.1 asset pipeline.}
|
13
13
|
|
14
14
|
s.rubyforge_project = "plupload-rails"
|
15
15
|
|
@@ -22,3 +22,4 @@ Gem::Specification.new do |s|
|
|
22
22
|
# s.add_development_dependency "rspec"
|
23
23
|
s.add_runtime_dependency "rails", "~>3.1.0"
|
24
24
|
end
|
25
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plupload-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-10-
|
12
|
+
date: 2011-10-17 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
|
-
requirement: &
|
16
|
+
requirement: &14195200 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,8 +21,8 @@ dependencies:
|
|
21
21
|
version: 3.1.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
25
|
-
description: This gem integrates Plupload with the Rails 3.1 asset pipeline.
|
24
|
+
version_requirements: *14195200
|
25
|
+
description: This gem integrates Plupload 1.5.1.1 with the Rails 3.1 asset pipeline.
|
26
26
|
email:
|
27
27
|
- info@corinlangosch.com
|
28
28
|
executables: []
|
@@ -31,7 +31,9 @@ extra_rdoc_files: []
|
|
31
31
|
files:
|
32
32
|
- .gitignore
|
33
33
|
- Gemfile
|
34
|
+
- README.md
|
34
35
|
- Rakefile
|
36
|
+
- app/assets/javascripts/plupload.settings.js.coffee.erb
|
35
37
|
- lib/plupload-rails.rb
|
36
38
|
- lib/plupload/rails.rb
|
37
39
|
- lib/plupload/rails/engine.rb
|
@@ -94,8 +96,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
96
|
version: '0'
|
95
97
|
requirements: []
|
96
98
|
rubyforge_project: plupload-rails
|
97
|
-
rubygems_version: 1.8.
|
99
|
+
rubygems_version: 1.8.10
|
98
100
|
signing_key:
|
99
101
|
specification_version: 3
|
100
|
-
summary: Integration of Plupload with the Rails 3.1 asset pipeline
|
102
|
+
summary: Integration of Plupload 1.5.1.1 with the Rails 3.1 asset pipeline
|
101
103
|
test_files: []
|