jquery-rails 1.0.17 → 1.0.18

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of jquery-rails might be problematic. Click here for more details.

data/.gitignore CHANGED
@@ -1,4 +1,7 @@
1
1
  pkg/*
2
2
  tmp
3
3
  spec/support/*/Gemfile.lock
4
- spec/support/*/public/javascripts
4
+ spec/support/*/public/javascripts
5
+ .rvmrc
6
+ .bundle
7
+ imports/*
@@ -1,3 +1,10 @@
1
+ ## 1.0.18 (18 November 2011)
2
+
3
+ - Updated to latest jquery-ujs
4
+ - Fixed event parameter for form submit event handlers in IE for
5
+ jQuery 1.6.x
6
+ - Fixed form submit event handlers for jQuery 1.7
7
+
1
8
  ## 1.0.17 (9 November 2011)
2
9
 
3
10
  - Updated to jQuery 1.7
data/README.md CHANGED
@@ -1,12 +1,17 @@
1
- # Jquery-rails
1
+ # jquery-rails
2
2
 
3
3
  jQuery! For Rails! So great.
4
4
 
5
- Also provided is Sam Ruby's assert_select_jquery function, which is automatically included for use in tests.
5
+ This gem provides:
6
+
7
+ * jQuery 1.7
8
+ * jQuery UI 1.8.16
9
+ * the latest jQuery UJS adapter
10
+ * and Sam Ruby's assert_select_jquery function, which is automatically included for use in tests.
6
11
 
7
12
  ## Rails 3.1
8
13
 
9
- This gem vendors jQuery 1.6 and the latest jQuery UJS adapter for Rails 3.1 and greater. The files will be added to the asset pipeline and available for you to use. These two lines will be added to the file `app/assets/javascripts/application.js` by default:
14
+ For Rails 3.1 and greater, the files will be added to the asset pipeline and available for you to use. These two lines will be added to the file `app/assets/javascripts/application.js` by default:
10
15
 
11
16
  //= require jquery
12
17
  //= require jquery_ujs
@@ -41,4 +46,4 @@ Then, run `bundle install`. To invoke the generator, run:
41
46
 
42
47
  rails generate jquery:install #--ui to enable jQuery UI
43
48
 
44
- You're done!
49
+ You're done!
@@ -1,6 +1,7 @@
1
1
  require 'rails'
2
2
 
3
- if ::Rails.version < "3.1"
3
+ # Supply generator for Rails 3.0.x or if asset pipeline is not enabled
4
+ if ::Rails.version < "3.1" || !::Rails.application.config.assets.enabled
4
5
  module Jquery
5
6
  module Generators
6
7
  class InstallGenerator < ::Rails::Generators::Base
@@ -45,9 +46,11 @@ else
45
46
  desc "Just show instructions so people will know what to do when mistakenly using generator for Rails 3.1 apps"
46
47
 
47
48
  def do_nothing
48
- say_status("deprecated", "You are using Rails 3.1, so this generator is no longer needed. The necessary files are already in your asset pipeline.")
49
+ say_status("deprecated", "You are using Rails 3.1 with the asset pipeline enabled, so this generator is not needed.")
50
+ say_status("", "The necessary files are already in your asset pipeline.")
49
51
  say_status("", "Just add `//= require jquery` and `//= require jquery_ujs` to your app/assets/javascripts/application.js")
50
52
  say_status("", "If you upgraded your app from Rails 3.0 and still have jquery.js, rails.js, or jquery_ujs.js in your javascripts, be sure to remove them.")
53
+ say_status("", "If you do not want the asset pipeline enabled, you may turn it off in application.rb and re-run this generator.")
51
54
  # ok, nothing
52
55
  end
53
56
  end
@@ -1,8 +1,8 @@
1
1
  module Jquery
2
2
  module Rails
3
- VERSION = "1.0.17"
3
+ VERSION = "1.0.18"
4
4
  JQUERY_VERSION = "1.7.0"
5
5
  JQUERY_UI_VERSION = "1.8.16"
6
- JQUERY_UJS_VERSION = "17f4004310b6ece3cb240914932b4d6d46032c24"
6
+ JQUERY_UJS_VERSION = "4fe37537cb2d8e71005303d3acb469e6205d26db"
7
7
  end
8
8
  end
@@ -252,11 +252,11 @@
252
252
 
253
253
  // find all the submit events directly bound to the form and
254
254
  // manually invoke them. If anyone returns false then stop the loop
255
- callFormSubmitBindings: function(form) {
255
+ callFormSubmitBindings: function(form, event) {
256
256
  var events = form.data('events'), continuePropagation = true;
257
257
  if (events !== undefined && events['submit'] !== undefined) {
258
258
  $.each(events['submit'], function(i, obj){
259
- if (typeof obj.handler === 'function') return continuePropagation = obj.handler(obj.data);
259
+ if (typeof obj.handler === 'function') return continuePropagation = obj.handler(event);
260
260
  });
261
261
  }
262
262
  return continuePropagation;
@@ -335,7 +335,7 @@
335
335
 
336
336
  // If browser does not support submit bubbling, then this live-binding will be called before direct
337
337
  // bindings. Therefore, we should directly call any direct bindings before remotely submitting form.
338
- if (!$.support.submitBubbles && rails.callFormSubmitBindings(form) === false) return rails.stopEverything(e);
338
+ if (!$.support.submitBubbles && $().jquery < '1.7' && rails.callFormSubmitBindings(form, e) === false) return rails.stopEverything(e);
339
339
 
340
340
  rails.handleRemote(form);
341
341
  return false;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jquery-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.17
4
+ version: 1.0.18
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-11-09 00:00:00.000000000Z
12
+ date: 2011-11-18 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
16
- requirement: &2153494800 !ruby/object:Gem::Requirement
16
+ requirement: &2160594960 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2153494800
24
+ version_requirements: *2160594960
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: thor
27
- requirement: &2153493780 !ruby/object:Gem::Requirement
27
+ requirement: &2160590660 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0.14'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2153493780
35
+ version_requirements: *2160590660
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: bundler
38
- requirement: &2153492640 !ruby/object:Gem::Requirement
38
+ requirement: &2160590180 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.0.0
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *2153492640
46
+ version_requirements: *2160590180
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rails
49
- requirement: &2153491940 !ruby/object:Gem::Requirement
49
+ requirement: &2160589720 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '3.0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *2153491940
57
+ version_requirements: *2160589720
58
58
  description: This gem provides jQuery and the jQuery-ujs driver for your Rails 3 application.
59
59
  email:
60
60
  - andre@arko.net
@@ -96,9 +96,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
96
96
  - - ! '>='
97
97
  - !ruby/object:Gem::Version
98
98
  version: '0'
99
- segments:
100
- - 0
101
- hash: -744928478964605964
102
99
  required_rubygems_version: !ruby/object:Gem::Requirement
103
100
  none: false
104
101
  requirements:
@@ -107,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
104
  version: 1.3.6
108
105
  requirements: []
109
106
  rubyforge_project: jquery-rails
110
- rubygems_version: 1.8.6
107
+ rubygems_version: 1.8.11
111
108
  signing_key:
112
109
  specification_version: 3
113
110
  summary: Use jQuery with Rails 3