remotipart 0.4 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -31,12 +31,12 @@ make sure you have a supported jquery-ujs (rails.js or jquery_ujs.js) version fr
31
31
  [2.]
32
32
  Run the Remotipart install generator to add jquery.form.js and jquery.remotipart.js to public/javascripts/
33
33
 
34
- rails g remotipart:install
34
+ rails g remotipart:install
35
35
 
36
36
  [3.]
37
37
  The necessary js files will be added to your app's javascript <tt>:defaults</tt>, so make sure the following is in your application layout:
38
38
 
39
- <%= javascript_include_tag :defaults %>
39
+ <%= javascript_include_tag :defaults %>
40
40
 
41
41
  === Rails 3.1
42
42
 
@@ -49,13 +49,13 @@ make sure you have a supported jquery-ujs (rails.js or jquery_ujs.js) version fr
49
49
  == Usage
50
50
 
51
51
  * For multipart / forms with file inputs, set your form_for to remote as you would for a normal ajax form:
52
- :remote => true
52
+ :remote => true
53
53
  * When Javascript is enabled in the user's browser, the form, including the file, will be submitted asynchronously to your controller with:
54
- :format == 'js'
54
+ :format == 'js'
55
55
  * In the JS response template for your controller action, wrap all of your response code in one remotipart_response block:
56
- <%= remotipart_response do %> All Javascript response code goes here <% end %>
56
+ <%= remotipart_response do %> All Javascript response code goes here <% end %>
57
57
  * The options available to the text_area_tag[http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html#method-i-text_area_tag] can be passed to remotipart_response for further control over the response. For instance:
58
- <%= remotipart_response({:escape => false}) do %> All Javascript response code goes here <% end %>
58
+ <%= remotipart_response({:escape => false}) do %> All Javascript response code goes here <% end %>
59
59
  * Anything inside the +remotipart_response+ block will be rendered normally, unless the request actually did come from a remotipart-submitted form. So <tt>js.erb</tt> responses can be shared between remotipart and non-remotipart forms.
60
60
  <%= remotipart_response do %>
61
61
  // do stuff here
data/Rakefile CHANGED
@@ -8,10 +8,10 @@ begin
8
8
  gem.name = "remotipart"
9
9
  gem.summary = %Q{Remotipart is a Ruby on Rails gem enabling remote multipart forms (AJAX style file uploads) with jQuery.}
10
10
  gem.description = %Q{Remotipart is a Ruby on Rails gem enabling remote multipart forms (AJAX style file uploads) with jQuery.
11
- This gem augments the native Rails jQuery remote form function enabling asynchronous file uploads with little to no modification to your application.
11
+ This gem augments the native Rails 3 jQuery-UJS remote form function enabling asynchronous file uploads with little to no modification to your application.
12
12
  }
13
13
  gem.email = %w{greg@formasfunction.com steve@alfajango.com}
14
- gem.homepage = "http://github.com/formasfunction/remotipart"
14
+ gem.homepage = "http://www.alfajango.com/blog/remotipart-rails-gem/"
15
15
  gem.authors = ["Greg Leppert", "Steve Schwartz"]
16
16
  gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
17
17
  gem.version = Remotipart::Rails::VERSION
@@ -47,6 +47,7 @@ task :test => :check_dependencies
47
47
  task :default => :test
48
48
 
49
49
  require 'rake/rdoctask'
50
+ require 'lib/remotipart/rails/version'
50
51
  Rake::RDocTask.new do |rdoc|
51
52
  version = Remotipart::Rails::VERSION
52
53
 
@@ -31,8 +31,8 @@
31
31
 
32
32
  2. Run the Remotipart generator to add jquery.remotipart.js to public/javascripts/
33
33
 
34
- rails g remotipart
34
+ rails g remotipart
35
35
 
36
36
  3. Add the Javascript files for jQuery, the Rails jQuery driver, jQuery Form plugin, and Remotipart to your template, making sure to include jquery.remotipart.js *after* jQuery and the Rails jQuery driver
37
37
 
38
- <%= javascript_include_tag 'jquery-1.4.4.min', 'rails', 'jquery.form', 'jquery.remotipart' %>
38
+ <%= javascript_include_tag 'jquery-1.4.4.min', 'rails', 'jquery.form', 'jquery.remotipart' %>
@@ -1,6 +1,6 @@
1
1
  module Remotipart
2
2
  module Rails
3
- VERSION = "0.4"
3
+ VERSION = "0.4.1"
4
4
  FORMJS_VERSION = "2.82"
5
5
  end
6
6
  end
data/remotipart.gemspec CHANGED
@@ -5,13 +5,13 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{remotipart}
8
- s.version = "0.4"
8
+ s.version = "0.4.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Greg Leppert", "Steve Schwartz"]
12
12
  s.date = %q{2011-07-12}
13
13
  s.description = %q{Remotipart is a Ruby on Rails gem enabling remote multipart forms (AJAX style file uploads) with jQuery.
14
- This gem augments the native Rails jQuery remote form function enabling asynchronous file uploads with little to no modification to your application.
14
+ This gem augments the native Rails 3 jQuery-UJS remote form function enabling asynchronous file uploads with little to no modification to your application.
15
15
  }
16
16
  s.email = ["greg@formasfunction.com", "steve@alfajango.com"]
17
17
  s.extra_rdoc_files = [
@@ -40,7 +40,7 @@ Gem::Specification.new do |s|
40
40
  "vendor/assets/javascripts/jquery.form.js",
41
41
  "vendor/assets/javascripts/jquery.remotipart.js"
42
42
  ]
43
- s.homepage = %q{http://github.com/formasfunction/remotipart}
43
+ s.homepage = %q{http://www.alfajango.com/blog/remotipart-rails-gem/}
44
44
  s.rdoc_options = ["--charset=UTF-8"]
45
45
  s.require_paths = ["lib"]
46
46
  s.rubygems_version = %q{1.3.7}
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remotipart
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- version: "0.4"
9
+ - 1
10
+ version: 0.4.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Greg Leppert
@@ -32,7 +33,7 @@ dependencies:
32
33
  version: "0"
33
34
  type: :development
34
35
  version_requirements: *id001
35
- description: "Remotipart is a Ruby on Rails gem enabling remote multipart forms (AJAX style file uploads) with jQuery.\n This gem augments the native Rails jQuery remote form function enabling asynchronous file uploads with little to no modification to your application.\n "
36
+ description: "Remotipart is a Ruby on Rails gem enabling remote multipart forms (AJAX style file uploads) with jQuery.\n This gem augments the native Rails 3 jQuery-UJS remote form function enabling asynchronous file uploads with little to no modification to your application.\n "
36
37
  email:
37
38
  - greg@formasfunction.com
38
39
  - steve@alfajango.com
@@ -65,7 +66,7 @@ files:
65
66
  - vendor/assets/javascripts/jquery.form.js
66
67
  - vendor/assets/javascripts/jquery.remotipart.js
67
68
  has_rdoc: true
68
- homepage: http://github.com/formasfunction/remotipart
69
+ homepage: http://www.alfajango.com/blog/remotipart-rails-gem/
69
70
  licenses: []
70
71
 
71
72
  post_install_message: