From 1eaccc4be792a3453a42aea6b0b085e9c8120fed Mon Sep 17 00:00:00 2001
From: jasl
Date: Mon, 11 Nov 2013 10:43:12 +0800
Subject: [PATCH 1/5] init commit
---
.gitignore | 1 +
CHANGELOG.md | 276 ------------
CONTRIBUTING.md | 36 --
LICENSE | 4 +-
README.md | 65 +--
Rakefile | 6 +-
VERSIONS.md | 42 --
jquery-middleman.gemspec | 22 +
jquery-rails.gemspec | 24 --
.../jquery/install/install_generator.rb | 50 ---
lib/jquery-middleman.rb | 0
lib/jquery-rails.rb | 1 -
lib/jquery/assert_select.rb | 99 -----
lib/jquery/rails.rb | 10 -
lib/jquery/rails/engine.rb | 6 -
lib/jquery/rails/railtie.rb | 18 -
lib/jquery/rails/version.rb | 7 -
lib/jquery/version.rb | 4 +
vendor/assets/javascripts/jquery_ujs.js | 394 ------------------
19 files changed, 40 insertions(+), 1025 deletions(-)
delete mode 100644 CHANGELOG.md
delete mode 100644 CONTRIBUTING.md
delete mode 100644 VERSIONS.md
create mode 100644 jquery-middleman.gemspec
delete mode 100644 jquery-rails.gemspec
delete mode 100644 lib/generators/jquery/install/install_generator.rb
create mode 100644 lib/jquery-middleman.rb
delete mode 100644 lib/jquery-rails.rb
delete mode 100644 lib/jquery/assert_select.rb
delete mode 100644 lib/jquery/rails.rb
delete mode 100644 lib/jquery/rails/engine.rb
delete mode 100644 lib/jquery/rails/railtie.rb
delete mode 100644 lib/jquery/rails/version.rb
create mode 100644 lib/jquery/version.rb
delete mode 100644 vendor/assets/javascripts/jquery_ujs.js
diff --git a/.gitignore b/.gitignore
index 94d39f3b..8006cdb7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@ spec/support/*/public/javascripts
.bundle
imports/*
Gemfile.lock
+.idea
diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index 40b440ca..00000000
--- a/CHANGELOG.md
+++ /dev/null
@@ -1,276 +0,0 @@
-## 3.0.4 (10 July 2013)
-
- - Fixed jQuery source map
-
-## 3.0.3 (10 July 2013)
-
- - Updated to jQuery 1.10.2
-
-## 3.0.2 (04 July 2013)
-
- - Updated to latest jquery-ujs
-
-## 3.0.1 (07 June 2013)
-
- - Updated to jQuery 1.10.1
- - Removed jQuery UI from generator
-
-## 3.0.0 (29 May 2013)
-
- - Removed jQuery UI
-
-## 2.3.0 (29 May 2013)
-
- - Updated to jQuery 1.10.0
- - Updated to jQuery UI 1.10.3
-
-## 2.2.2 (29 May 2013)
-
- - Updated to latest jquery-ujs
-
-## 2.2.1 (08 February 2013)
-
- - Updated to jQuery 1.9.1
- - Updated to latest jquery-ujs
-
-## 2.2.0 (19 January 2013)
-
- - Updated to jQuery 1.9.0
- - Updated to latest jquery-ujs
-
-## 2.1.4 (26 November 2012)
-
- - Updated to jQuery 1.8.3
- - Updated to jQuery UI 1.9.2
- - Rails 4 compatibility
- - Rails 3.1 compatibility (without asset pipeline)
- - Rails 3.0 compatibility
-
-## 2.1.3 (24 September 2012)
-
- - Updated to latest jquery-ujs
- - Updated to jQuery 1.8.2
-
-## 2.1.2 (06 September 2012)
-
- - Updated to latest jquery-ujs
- - required radio bugfix
- - Updated to jQuery 1.8.1
-
-## 2.1.1 (18 August 2012)
-
- - Updated to latest jquery-ujs
- - ajax:aborted:file bugfixes
-
-## 2.1.0 (16 August 2012)
-
- - Updated to latest jquery-ujs
- - jQuery 1.8.0 compatibility
- - Updated to jQuery 1.8.0
- - Updated to jQuery UI 1.8.23
-
-## 2.0.3 (16 August 2012)
-
- - Updated to latest jquery-ujs
- - created `rails:attachBindings` to allow for customization of $.rails object settings
- - created `ajax:send` event to provide access to jqXHR object from ajax requests
- - added support for `data-with-credentials`
-
-## 2.0.2 (03 April 2012)
-
- - Updated to jQuery 1.7.2
- - Updated to jQuery UI 1.8.18
- - Updated to latest jquery-ujs
- - Override provided for obtaining `href`
- - Edit `crossDomain` and `dataType` from `ajax:before` event
-
-## 2.0.1 (28 February 2012)
-
- - Fixed Rails 3.2 dependency issue
-
-## 2.0 (20 December 2011)
-
- - Minimum dependency set to Rails 3.2
-
-## 1.0.19 (26 November 2011)
-
- - Updated to jQuery 1.7.1
- - Updated to latest jquery-ujs
- - Fixed disabled links to re-enable when `ajax:before` or
- `ajax:beforeSend` are canceled
- - Switched from deprecated `live` to `delegate`
-
-## 1.0.18 (18 November 2011)
-
- - Updated to latest jquery-ujs
- - Fixed event parameter for form submit event handlers in IE for
- jQuery 1.6.x
- - Fixed form submit event handlers for jQuery 1.7
-
-## 1.0.17 (9 November 2011)
-
- - Updated to jQuery 1.7
- - Updated to latest jquery-ujs
- - Moved file comment above function so it won't be included in
- compressed version
-
-## 1.0.16 (12 October 2011)
-
- - Updated to jQuery 1.6.4
- - Updated to jQuery UI 1.8.16
-
-## 1.0.15 (12 October 2011)
-
- - Updated to latest jquery-ujs
- - Fixed formInputClickSelector `button[type]` for IE7
- - Copy target attribute to generated form for `a[data-method]` links
- - Return true (abort ajax) for ctrl- and meta-clicks on remote links
- - Use jQuery `.prop()` for disabling/enabling elements
-
-## 1.0.14 (08 September 2011)
-
- - Updated to latest jquery-ujs
- - Added `disable-with` support for links
- - minor bug fixes
- - Added `data-remote` support for change events of all input types
- - Added install generator for Rails 3.1 with instructional message
-
-## 1.0.13 (11 August 2011)
-
- - Updated to latest jquery-ujs with `novalidate` support
- - No more support for jquery older than v1.6
-
-## 1.0.12 (23 June 2011)
-
- - Updated to latest jquery-ujs with 'blank form action' and
- data-remote support for select elements
-
-## 1.0.11 (15 June 2011)
-
- - Updated to latest jqueyr-ujs with cross-domain support
-
-[See jquery-ujs issue 167](https://github.com/rails/jquery-ujs/pull/167) for relevant discussion
-
-## 1.0.10 (13 June 2011)
-
- - Updated to latest jqueyr-ujs with bug fixes
-
-## 1.0.9 (25 May 2011)
-
- - Merged with new rails repo (3.1 fix)
-
-## 1.0.8 (25 May 2011)
-
- - Updated to latest jquery-ujs with `[disabled][required]` fix
-
-## 1.0.7 (21 May 2011)
-
- - Fix assert_select_jquery's bad call to unescape_rjs
-
-## 1.0.6 (21 May 2011)
-
- - Updated to latest jquery-ujs with `data-params` support
-
-## 1.0.5 (17 May 2011)
-
- - Updated to latest jquery-ujs
- - Remove old rails.js in Rails 3.0 generator
-
-## 1.0.4 (17 May 2011)
-
- - Fix exception in Rails 3.0 generator
-
-## 1.0.3 (17 May 2011)
-
- - Update to jQuery 1.6.1
- - Remove useless --version generator option
-
-## 1.0.2 (12 May 2011)
-
- - Fix Rails 3.0 now that rails.js is named jquery_ujs.js
-
-## 1.0.1 (10 May 2011)
-
- - Stop downloading rails.js from GitHub
- - Vendor jQuery UI for those who want it
- - Fix assert_select_jquery now that Rails 3.1 has no RJS at all
- - Fix rails dependency to just be railties
-
-## 1.0.rc (3 May 2011)
-
- - Rails 3.1 asset pipeline edition
- - Removes generators and railties
- - Just provides jquery.js and jquery_ujs.js
- - Still compatible with Rails 3.0 via the old generator code
-
-## 0.2.7 (5 February 2011)
-
- - Updated to use jQuery 1.5 by default
-
-## 0.2.6 (1 December 2010)
-
-Feature:
-
- - Updated to use jQuery 1.4.4 by default
-
-## 0.2.5 (4 November 2010)
-
-Bugfix:
-
- - Download JQuery Rails UJS via HTTPS since Github is now HTTPS only
-
-## 0.2.4 (16 October 2010)
-
-Features:
-
- - Updated to use the new jQuery 1.4.3 by default, with the IE .live() bug fixed
- - Always download the newest 1.x release of jQuery UI
- - Try to install unknown versions of jQuery, with fallback to the default
- - Print informative messages in the correct Generator style
-
-## 0.2.3 (13 October 2010)
-
-Features:
-
- - Support Edge Rails 3.1 by depending on Rails ~>3.0
- - Add Sam Ruby's assert_select_jquery test helper method
- - Use jquery.min only in production (and not in the test env)
-
-## 0.2.2 (8 October 2010)
-
-Feature:
-
- - Depend on Rails >=3.0 && <4.0 for edge Rails compatibility
-
-## 0.2.1 (2 October 2010)
-
-Bugfix:
-
- - Default to jQuery 1.4.1 as recommended by jQuery-ujs
- due to a bug in 1.4.2 (http://jsbin.com/uboxu3/7/)
-
-## 0.2 (2 October 2010)
-
-Features:
-
- - Allow specifying which version of jQuery to install
- - Add generator tests (thanks, Louis T.)
- - Automatically use non-minified JS in development mode
-
-## 0.1.3 (16 September 2010)
-
-Bugfix:
-
- - allow javascript :defaults tag to be overridden
-
-## 0.1.2 (18 August 2010)
-
-Bugfix:
-
- - check for jQueryUI in the right place
-
-## 0.1.1 (16 August 2010)
-
-Bugfix:
-
- - fix generator by resolving namespace conflict between Jquery::Rails and ::Rails
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index 0c3f40e4..00000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,36 +0,0 @@
-Thanks for taking the time to contribute to jquery-rails! Please
-take a moment to read the following brief guidelines to help streamline
-the merging process.
-
-## Updating jQuery
-
-If the jquery or jquery-ui scripts are outdated (i.e. maybe a new version of jquery was released yesterday), feel free to open an issue and prod us to get that thing updated. However, for security reasons, we won't be accepting pull requests with updated jquery or jquery-ui scripts.
-
-## Changes to jquery_ujs.js
-
-**If it's an issue pertaining to the jquery-ujs javascript, please
-report it to the [rails/jquery-ujs project](https://github.com/rails/jquery-ujs/issues).**
-
-## Tests
-
-This is a gem that simply includes jQuery and jQuery UJS into the Rails
-asset pipeline. The asset pipeline functionality is well tested within the
-Rails framework. And jQuery and jQuery UJS each have their own extensive
-test suites. Thus, there's not a lot to actually test here.
-
-That being said, we do have a few integration-level tests to make sure
-everything is being included and basic UJS functionality works within a
-sample Rails app.
-
-If you're making changes to the actual gem, run the tests as follows:
-
-1. Checkout the demo Rails app: `git clone git://github.com/JangoSteve/Rails-jQuery-Demo.git`
-
-2. Install the gems: `bundle install`
-
-3. Change the jquery-rails gem in the Gemfile to use your local
-version of the gem with your updates: `gem 'rspec-rails', :path => '../path/to/jquery-rails'`
-
-4. Update your bundled jquery-rails gem: `bundle update jquery-rails`
-
-5. Run the tests: `bundle exec rspec spec/`
diff --git a/LICENSE b/LICENSE
index d4c1838a..fcd04ae2 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
The MIT License
-Copyright (c) 2010 Andre Arko
+Copyright (c) 2010 Jasl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ 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.
\ No newline at end of file
+THE SOFTWARE.
diff --git a/README.md b/README.md
index cf4adc8a..aa97eb17 100644
--- a/README.md
+++ b/README.md
@@ -1,86 +1,37 @@
-# jquery-rails
+# jquery-middleman
-jQuery! For Rails! So great.
+jQuery for Middleman! forked from [jquery-rails](https://github.com/rails/jquery-rails)
This gem provides:
* jQuery 1.10.2
- * the jQuery UJS adapter
- * assert_select_jquery to test jQuery responses in Ruby tests
-
-## Versions
-
-Starting with v2.1, the jquery-rails gem follows these version guidelines
-to provide more control over your app's jquery version from your Gemfile:
-
-```
-patch version bump = updates to jquery-ujs, jquery-rails, and patch-level updates to jquery
-minor version bump = minor-level updates to jquery
-major version bump = major-level updates to jquery and updates to rails which may be backwards-incompatible
-```
-
-See [VERSIONS.md](VERSIONS.md) to see which versions of jquery-rails bundle which
-versions of jQuery.
## Installation
-Apps generated with Rails 3.1 or later include jquery-rails in the Gemfile by default. So just make a new app:
-
-```sh
-rails new myapp
-```
-
-If upgrading from an older version of rails, or for rails 3.0 apps,
-add the jquery-rails gem to your Gemfile.
+add the jquery-middleman gem to your Gemfile.
```ruby
-gem "jquery-rails"
+gem "jquery-middleman"
```
-And run `bundle install`. The rest of the installation depends on
-whether the asset pipeline is being used.
-
-### Rails 3.1 or greater (with asset pipeline *enabled*)
+And run `bundle install`.
-The jquery and jquery-ujs files will be added to the asset pipeline and available for you to use. If they're not already in `app/assets/javascripts/application.js` by default, add these lines:
+add these lines to your javascript:
```js
//= require jquery
-//= require jquery_ujs
-```
-
-For jQuery UI, we recommend the [jquery-ui-rails](https://github.com/joliss/jquery-ui-rails) gem, as it includes the jquery-ui css and allows easier customization.
-
-*As of v3.0, jquery-rails no longer includes jQuery UI. Use the
-jquery-ui-rails gem above.*
-
-### Rails 3.0 (or greater with asset pipeline *disabled*)
-
-This gem adds a single generator: `jquery:install`. Running the generator will remove any Prototype JS files you may happen to have, and copy jQuery and the jQuery-ujs driver for Rails to the `public/javascripts` directory.
-
-This gem will also hook into the Rails configuration process, removing Prototype and adding jQuery to the javascript files included by the `javascript_include_tag(:defaults)` call. While this gem contains the minified and un-minified versions of jQuery, only the minified versions will be included in the `:defaults` when Rails is run in `production` or `test` mode (un-minified versions will be included when Rails is run in `development` mode).
-
-To invoke the generator, run:
-
-```sh
-rails generate jquery:install
```
You're done!
-*As of v3.0, jquery-rails no longer includes jQuery UI, you will need to
-install it by yourself as needed.*
-
## Contributing
Feel free to open an issue ticket if you find something that could be improved. A couple notes:
-* If it's an issue pertaining to the jquery-ujs javascript, please report it to the [jquery-ujs project](https://github.com/rails/jquery-ujs).
-
* If the jquery scripts are outdated (i.e. maybe a new version of jquery was released yesterday), feel free to open an issue and prod us to get that thing updated. However, for security reasons, we won't be accepting pull requests with updated jquery scripts.
## Acknowledgements
-Many thanks are due to all of [the jquery-rails contributors](https://github.com/rails/jquery-rails/graphs/contributors). Special thanks to [JangoSteve](http://github.com/JangoSteve) for tirelessly answering questions and accepting patches, and the [Rails Core Team](https://github.com/organizations/rails/teams/617) for making jquery-rails an official part of Rails 3.1.
+Great thank for [André Arko](http://arko.net), this gem is forked by his [jquery-rails](https://github.com/rails/jquery-rails).
-Copyright [André Arko](http://arko.net), released under the MIT License.
+Copyright [jasl](https://github.com/jasl), released under the MIT License.
diff --git a/Rakefile b/Rakefile
index 7b17de96..ba29ddd7 100644
--- a/Rakefile
+++ b/Rakefile
@@ -10,10 +10,10 @@ task :guard_version do
body = File.read("vendor/assets/javascripts/#{file}")
match = body.match(pattern) or abort "Version check failed: no pattern matched in #{file}"
file_version = body.match(pattern)[1]
- constant_version = Jquery::Rails.const_get(constant)
+ constant_version = Jquery.const_get(constant)
unless constant_version == file_version
- abort "Jquery::Rails::#{constant} was #{constant_version} but it should be #{file_version}"
+ abort "Jquery::#{constant} was #{constant_version} but it should be #{file_version}"
end
end
@@ -36,7 +36,7 @@ task :update_jquery do
break if version
end
- version_path = 'lib/jquery/rails/version.rb'
+ version_path = 'lib/jquery/version.rb'
lines = IO.readlines(version_path).map do |line|
line.gsub(/JQUERY_VERSION = "([\d\.]+)"/, "JQUERY_VERSION = \"#{version}\"")
end
diff --git a/VERSIONS.md b/VERSIONS.md
deleted file mode 100644
index 82020a04..00000000
--- a/VERSIONS.md
+++ /dev/null
@@ -1,42 +0,0 @@
-# Bundled Versions
-
-| Gem | jQuery | jQuery UI |
-|--------|--------|-----------|
-| 3.0.4 | ↾ | - |
-| 3.0.3 | 1.10.2 | - |
-| 3.0.2 | ↾ | - |
-| 3.0.1 | 1.10.1 | - |
-| 3.0.0 | ↾ | - |
-| 2.3.0 | 1.10.0 | 1.10.3 |
-| 2.2.2 | ↾ | ↾ |
-| 2.2.1 | 1.9.1 | ↾ |
-| 2.2.0 | 1.9.0 | ↾ |
-| 2.1.4 | 1.8.3 | 1.9.2 |
-| 2.1.3 | 1.8.2 | ↾ |
-| 2.1.2 | 1.8.1 | ↾ |
-| 2.1.1 | ↾ | ↾ |
-| 2.1.0 | 1.8.0 | 1.8.23 |
-| 2.0.3 | ↾ | ↾ |
-| 2.0.2 | 1.7.2 | 1.8.18 |
-| 2.0.1 | ↾ | ↾ |
-| 2.0.0 | ↾ | ↾ |
-| 1.0.19 | 1.7.1 | ↾ |
-| 1.0.18 | ↾ | ↾ |
-| 1.0.17 | 1.7.0 | ↾ |
-| 1.0.16 | 1.6.4 | 1.8.16 |
-| 1.0.15 | ↾ | ↾ |
-| 1.0.14 | ↾ | ↾ |
-| 1.0.13 | 1.6.2 | 1.8.14 |
-| 1.0.12 | ↾ | ↾ |
-| 1.0.11 | ↾ | ↾ |
-| 1.0.10 | ↾ | ↾ |
-| 1.0.9 | ↾ | ↾ |
-| 1.0.8 | ↾ | ↾ |
-| 1.0.7 | ↾ | ↾ |
-| 1.0.6 | ↾ | ↾ |
-| 1.0.5 | ↾ | ↾ |
-| 1.0.4 | ↾ | ↾ |
-| 1.0.3 | 1.6.1 | ↾ |
-| 1.0.2 | ↾ | ↾ |
-| 1.0.1 | ↾ | 1.8.12 |
-| 1.0.0 | 1.6.0 | - |
diff --git a/jquery-middleman.gemspec b/jquery-middleman.gemspec
new file mode 100644
index 00000000..f1f5fb95
--- /dev/null
+++ b/jquery-middleman.gemspec
@@ -0,0 +1,22 @@
+# -*- encoding: utf-8 -*-
+require File.expand_path('../lib/jquery/version', __FILE__)
+
+Gem::Specification.new do |s|
+ s.name = "jquery-middleman"
+ s.version = Jquery::VERSION
+ s.platform = Gem::Platform::RUBY
+ s.authors = ["Jasl"]
+ s.email = ["jasl9187@hotmail.com"]
+ s.homepage = "http://rubygems.org/gems/jquery-middleman"
+ s.summary = "Use jQuery with Middleman"
+ s.description = "This gem provides jQuery for your Middleman application."
+ s.license = "MIT"
+
+ s.required_rubygems_version = ">= 1.3.6"
+
+ s.add_dependency "thor", ">= 0.14", "< 2.0"
+
+ s.files = `git ls-files`.split("\n")
+ s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
+ s.require_path = 'lib'
+end
diff --git a/jquery-rails.gemspec b/jquery-rails.gemspec
deleted file mode 100644
index fc3d2c40..00000000
--- a/jquery-rails.gemspec
+++ /dev/null
@@ -1,24 +0,0 @@
-# -*- encoding: utf-8 -*-
-require File.expand_path('../lib/jquery/rails/version', __FILE__)
-
-Gem::Specification.new do |s|
- s.name = "jquery-rails"
- s.version = Jquery::Rails::VERSION
- s.platform = Gem::Platform::RUBY
- s.authors = ["André Arko"]
- s.email = ["andre@arko.net"]
- s.homepage = "http://rubygems.org/gems/jquery-rails"
- s.summary = "Use jQuery with Rails 3"
- s.description = "This gem provides jQuery and the jQuery-ujs driver for your Rails 3 application."
- s.license = "MIT"
-
- s.required_rubygems_version = ">= 1.3.6"
- s.rubyforge_project = "jquery-rails"
-
- s.add_dependency "railties", ">= 3.0", "< 5.0"
- s.add_dependency "thor", ">= 0.14", "< 2.0"
-
- s.files = `git ls-files`.split("\n")
- s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
- s.require_path = 'lib'
-end
diff --git a/lib/generators/jquery/install/install_generator.rb b/lib/generators/jquery/install/install_generator.rb
deleted file mode 100644
index 39c0cbd3..00000000
--- a/lib/generators/jquery/install/install_generator.rb
+++ /dev/null
@@ -1,50 +0,0 @@
-require 'rails'
-
-# Supply generator for Rails 3.0.x or if asset pipeline is not enabled
-if ::Rails.version < "3.1" || !::Rails.application.config.assets.enabled
- module Jquery
- module Generators
- class InstallGenerator < ::Rails::Generators::Base
-
- desc "This generator installs jQuery #{Jquery::Rails::JQUERY_VERSION} and jQuery-ujs"
- source_root File.expand_path('../../../../../vendor/assets/javascripts', __FILE__)
-
- def remove_prototype
- Rails::PROTOTYPE_JS.each do |name|
- remove_file "public/javascripts/#{name}.js"
- end
- end
-
- def copy_jquery
- say_status("copying", "jQuery (#{Jquery::Rails::JQUERY_VERSION})", :green)
- copy_file "jquery.js", "public/javascripts/jquery.js"
- copy_file "jquery.min.js", "public/javascripts/jquery.min.js"
- end
-
- def copy_ujs_driver
- say_status("copying", "jQuery UJS adapter (#{Jquery::Rails::JQUERY_UJS_VERSION[0..5]})", :green)
- remove_file "public/javascripts/rails.js"
- copy_file "jquery_ujs.js", "public/javascripts/jquery_ujs.js"
- end
-
- end
- end
- end
-else
- module Jquery
- module Generators
- class InstallGenerator < ::Rails::Generators::Base
- desc "Just show instructions so people will know what to do when mistakenly using generator for Rails 3.1 apps"
-
- def do_nothing
- say_status("deprecated", "You are using Rails 3.1 with the asset pipeline enabled, so this generator is not needed.")
- say_status("", "The necessary files are already in your asset pipeline.")
- say_status("", "Just add `//= require jquery` and `//= require jquery_ujs` to your app/assets/javascripts/application.js")
- 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.")
- say_status("", "If you do not want the asset pipeline enabled, you may turn it off in application.rb and re-run this generator.")
- # ok, nothing
- end
- end
- end
- end
-end
diff --git a/lib/jquery-middleman.rb b/lib/jquery-middleman.rb
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/jquery-rails.rb b/lib/jquery-rails.rb
deleted file mode 100644
index a0fcf9a2..00000000
--- a/lib/jquery-rails.rb
+++ /dev/null
@@ -1 +0,0 @@
-require 'jquery/rails'
\ No newline at end of file
diff --git a/lib/jquery/assert_select.rb b/lib/jquery/assert_select.rb
deleted file mode 100644
index 7cdf8fdc..00000000
--- a/lib/jquery/assert_select.rb
+++ /dev/null
@@ -1,99 +0,0 @@
-module ActionDispatch
- module Assertions
- module SelectorAssertions
- # Selects content from a JQuery response. Patterned loosely on
- # assert_select_rjs.
- #
- # === Narrowing down
- #
- # With no arguments, asserts that one or more method calls are made.
- #
- # Use the +method+ argument to narrow down the assertion to only
- # statements that call that specific method.
- #
- # Use the +opt+ argument to narrow down the assertion to only statements
- # that pass +opt+ as the first argument.
- #
- # Use the +id+ argument to narrow down the assertion to only statements
- # that invoke methods on the result of using that identifier as a
- # selector.
- #
- # === Using blocks
- #
- # Without a block, +assert_select_jquery_ merely asserts that the
- # response contains one or more statements that match the conditions
- # specified above
- #
- # With a block +assert_select_jquery_ also asserts that the method call
- # passes a javascript escaped string containing HTML. All such HTML
- # fragments are selected and passed to the block. Nested assertions are
- # supported.
- #
- # === Examples
- #
- # # asserts that the #notice element is hidden
- # assert_select :hide, '#notice'
- #
- # # asserts that the #cart element is shown with a blind parameter
- # assert_select :show, :blind, '#cart'
- #
- # # asserts that #cart content contains a #current_item
- # assert_select :html, '#cart' do
- # assert_select '#current_item'
- # end
-
- PATTERN_HTML = "\"((\\\\\"|[^\"])*)\""
- PATTERN_UNICODE_ESCAPED_CHAR = /\\u([0-9a-zA-Z]{4})/
-
- def assert_select_jquery(*args, &block)
- jquery_method = args.first.is_a?(Symbol) ? args.shift : nil
- jquery_opt = args.first.is_a?(Symbol) ? args.shift : nil
- id = args.first.is_a?(String) ? args.shift : nil
-
- pattern = "\\.#{jquery_method || '\\w+'}\\("
- pattern = "#{pattern}['\"]#{jquery_opt}['\"],?\\s*" if jquery_opt
- pattern = "#{pattern}#{PATTERN_HTML}"
- pattern = "(?:jQuery|\\$)\\(['\"]#{id}['\"]\\)#{pattern}" if id
-
- fragments = []
- response.body.scan(Regexp.new(pattern)).each do |match|
- doc = HTML::Document.new(unescape_js(match.first))
- doc.root.children.each do |child|
- fragments.push child if child.tag?
- end
- end
-
- if fragments.empty?
- opts = [jquery_method, jquery_opt, id].compact
- flunk "No JQuery call matches #{opts.inspect}"
- end
-
- if block
- begin
- in_scope, @selected = @selected, fragments
- yield
- ensure
- @selected = in_scope
- end
- end
- end
-
- private
-
- # Unescapes a JS string.
- def unescape_js(js_string)
- # js encodes double quotes and line breaks.
- unescaped= js_string.gsub('\"', '"')
- unescaped.gsub!('\\\'', "'")
- unescaped.gsub!(/\\\//, '/')
- unescaped.gsub!('\n', "\n")
- unescaped.gsub!('\076', '>')
- unescaped.gsub!('\074', '<')
- # js encodes non-ascii characters.
- unescaped.gsub!(PATTERN_UNICODE_ESCAPED_CHAR) {|u| [$1.hex].pack('U*')}
- unescaped
- end
-
- end
- end
-end
diff --git a/lib/jquery/rails.rb b/lib/jquery/rails.rb
deleted file mode 100644
index 13ea0861..00000000
--- a/lib/jquery/rails.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require 'jquery/assert_select' if ::Rails.env.test?
-require 'jquery/rails/engine' if ::Rails.version >= '3.1'
-require 'jquery/rails/railtie'
-require 'jquery/rails/version'
-
-module Jquery
- module Rails
- PROTOTYPE_JS = %w{prototype effects dragdrop controls}
- end
-end
diff --git a/lib/jquery/rails/engine.rb b/lib/jquery/rails/engine.rb
deleted file mode 100644
index ce6a099a..00000000
--- a/lib/jquery/rails/engine.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-module Jquery
- module Rails
- class Engine < ::Rails::Engine
- end
- end
-end
diff --git a/lib/jquery/rails/railtie.rb b/lib/jquery/rails/railtie.rb
deleted file mode 100644
index b55a12c9..00000000
--- a/lib/jquery/rails/railtie.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# Used to ensure that Rails 3.0.x, as well as Rails >= 3.1 with asset pipeline disabled
-# get the minified version of the scripts included into the layout in production.
-module Jquery
- module Rails
- class Railtie < ::Rails::Railtie
- config.before_configuration do
- if config.action_view.javascript_expansions
- jq_defaults = ::Rails.env.production? || ::Rails.env.test? ? %w(jquery.min) : %w(jquery)
-
- # Merge the jQuery scripts, remove the Prototype defaults and finally add 'jquery_ujs'
- # at the end, because load order is important
- config.action_view.javascript_expansions[:defaults] -= PROTOTYPE_JS + ['rails']
- config.action_view.javascript_expansions[:defaults] |= jq_defaults + ['jquery_ujs']
- end
- end
- end
- end
-end
diff --git a/lib/jquery/rails/version.rb b/lib/jquery/rails/version.rb
deleted file mode 100644
index 44b564da..00000000
--- a/lib/jquery/rails/version.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-module Jquery
- module Rails
- VERSION = "3.0.4"
- JQUERY_VERSION = "1.10.2"
- JQUERY_UJS_VERSION = "e9e8b8fd3abb1571781bca7640e5c0c4d9cea2e3"
- end
-end
diff --git a/lib/jquery/version.rb b/lib/jquery/version.rb
new file mode 100644
index 00000000..0f5328f8
--- /dev/null
+++ b/lib/jquery/version.rb
@@ -0,0 +1,4 @@
+module Jquery
+ VERSION = "3.0.4"
+ JQUERY_VERSION = "1.10.2"
+end
diff --git a/vendor/assets/javascripts/jquery_ujs.js b/vendor/assets/javascripts/jquery_ujs.js
deleted file mode 100644
index 84f9e6bc..00000000
--- a/vendor/assets/javascripts/jquery_ujs.js
+++ /dev/null
@@ -1,394 +0,0 @@
-(function($, undefined) {
-
-/**
- * Unobtrusive scripting adapter for jQuery
- * https://github.com/rails/jquery-ujs
- *
- * Requires jQuery 1.7.0 or later.
- *
- * Released under the MIT license
- *
- */
-
- // Cut down on the number of issues from people inadvertently including jquery_ujs twice
- // by detecting and raising an error when it happens.
- if ( $.rails !== undefined ) {
- $.error('jquery-ujs has already been loaded!');
- }
-
- // Shorthand to make it a little easier to call public rails functions from within rails.js
- var rails;
- var $document = $(document);
-
- $.rails = rails = {
- // Link elements bound by jquery-ujs
- linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]',
-
- // Button elements boud jquery-ujs
- buttonClickSelector: 'button[data-remote]',
-
- // Select elements bound by jquery-ujs
- inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',
-
- // Form elements bound by jquery-ujs
- formSubmitSelector: 'form',
-
- // Form input elements bound by jquery-ujs
- formInputClickSelector: 'form input[type=submit], form input[type=image], form button[type=submit], form button:not([type])',
-
- // Form input elements disabled during form submission
- disableSelector: 'input[data-disable-with], button[data-disable-with], textarea[data-disable-with]',
-
- // Form input elements re-enabled after form submission
- enableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled',
-
- // Form required input elements
- requiredInputSelector: 'input[name][required]:not([disabled]),textarea[name][required]:not([disabled])',
-
- // Form file input elements
- fileInputSelector: 'input[type=file]',
-
- // Link onClick disable selector with possible reenable after remote submission
- linkDisableSelector: 'a[data-disable-with]',
-
- // Make sure that every Ajax request sends the CSRF token
- CSRFProtection: function(xhr) {
- var token = $('meta[name="csrf-token"]').attr('content');
- if (token) xhr.setRequestHeader('X-CSRF-Token', token);
- },
-
- // Triggers an event on an element and returns false if the event result is false
- fire: function(obj, name, data) {
- var event = $.Event(name);
- obj.trigger(event, data);
- return event.result !== false;
- },
-
- // Default confirm dialog, may be overridden with custom confirm dialog in $.rails.confirm
- confirm: function(message) {
- return confirm(message);
- },
-
- // Default ajax function, may be overridden with custom function in $.rails.ajax
- ajax: function(options) {
- return $.ajax(options);
- },
-
- // Default way to get an element's href. May be overridden at $.rails.href.
- href: function(element) {
- return element.attr('href');
- },
-
- // Submits "remote" forms and links with ajax
- handleRemote: function(element) {
- var method, url, data, elCrossDomain, crossDomain, withCredentials, dataType, options;
-
- if (rails.fire(element, 'ajax:before')) {
- elCrossDomain = element.data('cross-domain');
- crossDomain = elCrossDomain === undefined ? null : elCrossDomain;
- withCredentials = element.data('with-credentials') || null;
- dataType = element.data('type') || ($.ajaxSettings && $.ajaxSettings.dataType);
-
- if (element.is('form')) {
- method = element.attr('method');
- url = element.attr('action');
- data = element.serializeArray();
- // memoized value from clicked submit button
- var button = element.data('ujs:submit-button');
- if (button) {
- data.push(button);
- element.data('ujs:submit-button', null);
- }
- } else if (element.is(rails.inputChangeSelector)) {
- method = element.data('method');
- url = element.data('url');
- data = element.serialize();
- if (element.data('params')) data = data + "&" + element.data('params');
- } else if (element.is(rails.buttonClickSelector)) {
- method = element.data('method') || 'get';
- url = element.data('url');
- data = element.serialize();
- if (element.data('params')) data = data + "&" + element.data('params');
- } else {
- method = element.data('method');
- url = rails.href(element);
- data = element.data('params') || null;
- }
-
- options = {
- type: method || 'GET', data: data, dataType: dataType,
- // stopping the "ajax:beforeSend" event will cancel the ajax request
- beforeSend: function(xhr, settings) {
- if (settings.dataType === undefined) {
- xhr.setRequestHeader('accept', '*/*;q=0.5, ' + settings.accepts.script);
- }
- return rails.fire(element, 'ajax:beforeSend', [xhr, settings]);
- },
- success: function(data, status, xhr) {
- element.trigger('ajax:success', [data, status, xhr]);
- },
- complete: function(xhr, status) {
- element.trigger('ajax:complete', [xhr, status]);
- },
- error: function(xhr, status, error) {
- element.trigger('ajax:error', [xhr, status, error]);
- },
- crossDomain: crossDomain
- };
-
- // There is no withCredentials for IE6-8 when
- // "Enable native XMLHTTP support" is disabled
- if (withCredentials) {
- options.xhrFields = {
- withCredentials: withCredentials
- };
- }
-
- // Only pass url to `ajax` options if not blank
- if (url) { options.url = url; }
-
- var jqxhr = rails.ajax(options);
- element.trigger('ajax:send', jqxhr);
- return jqxhr;
- } else {
- return false;
- }
- },
-
- // Handles "data-method" on links such as:
- // Delete
- handleMethod: function(link) {
- var href = rails.href(link),
- method = link.data('method'),
- target = link.attr('target'),
- csrf_token = $('meta[name=csrf-token]').attr('content'),
- csrf_param = $('meta[name=csrf-param]').attr('content'),
- form = $(''),
- metadata_input = '';
-
- if (csrf_param !== undefined && csrf_token !== undefined) {
- metadata_input += '';
- }
-
- if (target) { form.attr('target', target); }
-
- form.hide().append(metadata_input).appendTo('body');
- form.submit();
- },
-
- /* Disables form elements:
- - Caches element value in 'ujs:enable-with' data store
- - Replaces element text with value of 'data-disable-with' attribute
- - Sets disabled property to true
- */
- disableFormElements: function(form) {
- form.find(rails.disableSelector).each(function() {
- var element = $(this), method = element.is('button') ? 'html' : 'val';
- element.data('ujs:enable-with', element[method]());
- element[method](element.data('disable-with'));
- element.prop('disabled', true);
- });
- },
-
- /* Re-enables disabled form elements:
- - Replaces element text with cached value from 'ujs:enable-with' data store (created in `disableFormElements`)
- - Sets disabled property to false
- */
- enableFormElements: function(form) {
- form.find(rails.enableSelector).each(function() {
- var element = $(this), method = element.is('button') ? 'html' : 'val';
- if (element.data('ujs:enable-with')) element[method](element.data('ujs:enable-with'));
- element.prop('disabled', false);
- });
- },
-
- /* For 'data-confirm' attribute:
- - Fires `confirm` event
- - Shows the confirmation dialog
- - Fires the `confirm:complete` event
-
- Returns `true` if no function stops the chain and user chose yes; `false` otherwise.
- Attaching a handler to the element's `confirm` event that returns a `falsy` value cancels the confirmation dialog.
- Attaching a handler to the element's `confirm:complete` event that returns a `falsy` value makes this function
- return false. The `confirm:complete` event is fired whether or not the user answered true or false to the dialog.
- */
- allowAction: function(element) {
- var message = element.data('confirm'),
- answer = false, callback;
- if (!message) { return true; }
-
- if (rails.fire(element, 'confirm')) {
- answer = rails.confirm(message);
- callback = rails.fire(element, 'confirm:complete', [answer]);
- }
- return answer && callback;
- },
-
- // Helper function which checks for blank inputs in a form that match the specified CSS selector
- blankInputs: function(form, specifiedSelector, nonBlank) {
- var inputs = $(), input, valueToCheck,
- selector = specifiedSelector || 'input,textarea',
- allInputs = form.find(selector);
-
- allInputs.each(function() {
- input = $(this);
- valueToCheck = input.is('input[type=checkbox],input[type=radio]') ? input.is(':checked') : input.val();
- // If nonBlank and valueToCheck are both truthy, or nonBlank and valueToCheck are both falsey
- if (!valueToCheck === !nonBlank) {
-
- // Don't count unchecked required radio if other radio with same name is checked
- if (input.is('input[type=radio]') && allInputs.filter('input[type=radio]:checked[name="' + input.attr('name') + '"]').length) {
- return true; // Skip to next input
- }
-
- inputs = inputs.add(input);
- }
- });
- return inputs.length ? inputs : false;
- },
-
- // Helper function which checks for non-blank inputs in a form that match the specified CSS selector
- nonBlankInputs: function(form, specifiedSelector) {
- return rails.blankInputs(form, specifiedSelector, true); // true specifies nonBlank
- },
-
- // Helper function, needed to provide consistent behavior in IE
- stopEverything: function(e) {
- $(e.target).trigger('ujs:everythingStopped');
- e.stopImmediatePropagation();
- return false;
- },
-
- // replace element's html with the 'data-disable-with' after storing original html
- // and prevent clicking on it
- disableElement: function(element) {
- element.data('ujs:enable-with', element.html()); // store enabled state
- element.html(element.data('disable-with')); // set to disabled state
- element.bind('click.railsDisable', function(e) { // prevent further clicking
- return rails.stopEverything(e);
- });
- },
-
- // restore element to its original state which was disabled by 'disableElement' above
- enableElement: function(element) {
- if (element.data('ujs:enable-with') !== undefined) {
- element.html(element.data('ujs:enable-with')); // set to old enabled state
- element.removeData('ujs:enable-with'); // clean up cache
- }
- element.unbind('click.railsDisable'); // enable element
- }
-
- };
-
- if (rails.fire($document, 'rails:attachBindings')) {
-
- $.ajaxPrefilter(function(options, originalOptions, xhr){ if ( !options.crossDomain ) { rails.CSRFProtection(xhr); }});
-
- $document.delegate(rails.linkDisableSelector, 'ajax:complete', function() {
- rails.enableElement($(this));
- });
-
- $document.delegate(rails.linkClickSelector, 'click.rails', function(e) {
- var link = $(this), method = link.data('method'), data = link.data('params');
- if (!rails.allowAction(link)) return rails.stopEverything(e);
-
- if (link.is(rails.linkDisableSelector)) rails.disableElement(link);
-
- if (link.data('remote') !== undefined) {
- if ( (e.metaKey || e.ctrlKey) && (!method || method === 'GET') && !data ) { return true; }
-
- var handleRemote = rails.handleRemote(link);
- // response from rails.handleRemote() will either be false or a deferred object promise.
- if (handleRemote === false) {
- rails.enableElement(link);
- } else {
- handleRemote.error( function() { rails.enableElement(link); } );
- }
- return false;
-
- } else if (link.data('method')) {
- rails.handleMethod(link);
- return false;
- }
- });
-
- $document.delegate(rails.buttonClickSelector, 'click.rails', function(e) {
- var button = $(this);
- if (!rails.allowAction(button)) return rails.stopEverything(e);
-
- rails.handleRemote(button);
- return false;
- });
-
- $document.delegate(rails.inputChangeSelector, 'change.rails', function(e) {
- var link = $(this);
- if (!rails.allowAction(link)) return rails.stopEverything(e);
-
- rails.handleRemote(link);
- return false;
- });
-
- $document.delegate(rails.formSubmitSelector, 'submit.rails', function(e) {
- var form = $(this),
- remote = form.data('remote') !== undefined,
- blankRequiredInputs = rails.blankInputs(form, rails.requiredInputSelector),
- nonBlankFileInputs = rails.nonBlankInputs(form, rails.fileInputSelector);
-
- if (!rails.allowAction(form)) return rails.stopEverything(e);
-
- // skip other logic when required values are missing or file upload is present
- if (blankRequiredInputs && form.attr("novalidate") == undefined && rails.fire(form, 'ajax:aborted:required', [blankRequiredInputs])) {
- return rails.stopEverything(e);
- }
-
- if (remote) {
- if (nonBlankFileInputs) {
- // slight timeout so that the submit button gets properly serialized
- // (make it easy for event handler to serialize form without disabled values)
- setTimeout(function(){ rails.disableFormElements(form); }, 13);
- var aborted = rails.fire(form, 'ajax:aborted:file', [nonBlankFileInputs]);
-
- // re-enable form elements if event bindings return false (canceling normal form submission)
- if (!aborted) { setTimeout(function(){ rails.enableFormElements(form); }, 13); }
-
- return aborted;
- }
-
- rails.handleRemote(form);
- return false;
-
- } else {
- // slight timeout so that the submit button gets properly serialized
- setTimeout(function(){ rails.disableFormElements(form); }, 13);
- }
- });
-
- $document.delegate(rails.formInputClickSelector, 'click.rails', function(event) {
- var button = $(this);
-
- if (!rails.allowAction(button)) return rails.stopEverything(event);
-
- // register the pressed submit button
- var name = button.attr('name'),
- data = name ? {name:name, value:button.val()} : null;
-
- button.closest('form').data('ujs:submit-button', data);
- });
-
- $document.delegate(rails.formSubmitSelector, 'ajax:beforeSend.rails', function(event) {
- if (this == event.target) rails.disableFormElements($(this));
- });
-
- $document.delegate(rails.formSubmitSelector, 'ajax:complete.rails', function(event) {
- if (this == event.target) rails.enableFormElements($(this));
- });
-
- $(function(){
- // making sure that all forms have actual up-to-date token(cached forms contain old one)
- var csrf_token = $('meta[name=csrf-token]').attr('content');
- var csrf_param = $('meta[name=csrf-param]').attr('content');
- $('form input[name="' + csrf_param + '"]').val(csrf_token);
- });
- }
-
-})( jQuery );
From c009f0b3076ca330cfea155e89ff68256408c7b4 Mon Sep 17 00:00:00 2001
From: Chase
Date: Thu, 12 Mar 2015 18:43:18 -0400
Subject: [PATCH 2/5] upgrade to 1.11.2
---
.DS_Store | Bin 0 -> 6148 bytes
README.md | 4 +-
VERSIONS.md | 1 +
lib/.DS_Store | Bin 0 -> 6148 bytes
lib/jquery/.DS_Store | Bin 0 -> 6148 bytes
vendor/.DS_Store | Bin 0 -> 6148 bytes
vendor/assets/.DS_Store | Bin 0 -> 6148 bytes
vendor/assets/javascripts/.DS_Store | Bin 0 -> 6148 bytes
vendor/assets/javascripts/jquery.js | 188 ++++++++++++++---------
vendor/assets/javascripts/jquery.min.js | 9 +-
vendor/assets/javascripts/jquery.min.map | 2 +-
11 files changed, 121 insertions(+), 83 deletions(-)
create mode 100644 .DS_Store
create mode 100644 lib/.DS_Store
create mode 100644 lib/jquery/.DS_Store
create mode 100644 vendor/.DS_Store
create mode 100644 vendor/assets/.DS_Store
create mode 100644 vendor/assets/javascripts/.DS_Store
diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000000000000000000000000000000000000..16d3222d4dfe5be4f15e424276ba487f663ca5cd
GIT binary patch
literal 6148
zcmeHK%Wl&^6ur}g)=gL#@lYi;UV>Dr@KRZ(X#+omNSo5aoTPXLUXN|b7$t>v3!m_;~^r}=m*z{Y$CEy1ePnPPB1Yp
z$}yYLJ!gST&cP|7uoWd+esnC_bQlH<1OFNW;@h2}dlb?udQM~CZ{lM_EDLv0t{g~%
zM>Iz-=r#3`k<*LmsC97ruP>9>ugk+tSad2i#KY!O?s_Cgv+4lapVJVr>zH!VV5l
z6X_^_koEjX&h^{xMLf%EwO?$iR6a93W6f5o!t8UEr*1bHxVe}2vxb*Gku4sCzV_F=
zynEgEQIgJjT1`f-qLx@x`+9^~DQeQ_-fcaXZ~
z#o;>7xX&Y=?^?6MI`*Z#y~P`~dFR$}-cjD2#hb&S{l>B`U%kDw`nWfI`|kaRkDoq&
z`T9*hE-@^q(#~r76}SMYgW?@X2s@rJO*@!9#;cJ~T8x$Q?jwFm%Ug&wA`6iVluSrn
zrFDqVhRiK`DCIsu5GEua7X;0M=~v9E7J5y?Fkl!k45&@T0TE)IsB0W4luHLHc?1BK
z(Jc+W_-PP1j>fvikwT2Xm`VkzRHly@Or@jW(Q$Q+BZVrRm_B?keP^amC`{fR^E)z}
zSY4s14FiUOA_FDWw8j44JpKG%OfoIQfMMXjVt|!b+?56%N$;)49!~7F4$3nWVIpp%
mP^O^L+p%=SRy>Cy4P%aQfOU-{h3J8q9|1{&sSE>um4QD|jvXEV
literal 0
HcmV?d00001
diff --git a/README.md b/README.md
index d3bfe1e5..4caf92ae 100644
--- a/README.md
+++ b/README.md
@@ -4,12 +4,12 @@ jQuery for Middleman! forked from [jquery-rails](https://github.com/rails/jquery
This gem provides:
- * jQuery 1.11.1
+ * jQuery 1.11.2
* assert_select_jquery to test jQuery responses in Ruby tests
## Versions
-the gem's version follows it's upstream [jquery-rails](https://github.com/rails/jquery-rails)
+the gem's version follows it's upstream [jquery-rails](https://github.com/rails/jquery-rails)
See [VERSIONS.md](VERSIONS.md) to see which versions of jquery-middleman bundle which
versions of jQuery.
diff --git a/VERSIONS.md b/VERSIONS.md
index 3b9a1188..73d0c44f 100644
--- a/VERSIONS.md
+++ b/VERSIONS.md
@@ -2,6 +2,7 @@
| Gem | jQuery | jQuery UI |
|--------|--------|-----------|
+| 3.1.2 | 1.11.2 | - |
| 3.1.1 | 1.11.1 | - |
| 3.1.0 | 1.11.0 | - |
| 3.0.5 | 1.11.0 | - |
diff --git a/lib/.DS_Store b/lib/.DS_Store
new file mode 100644
index 0000000000000000000000000000000000000000..3fc9a582311ab2d722e2ce1645274b805dc4a8bd
GIT binary patch
literal 6148
zcmeHK&2G~`5S~p#>$Df67KFsb$5v`l_^Ha#4F!n1&Rgru{
z;xYJt4Ft!&K%azTIc~R(k;BpBRK1K+6-~9~z~86<&D|`#h6CtB0+aJcAH^fIWi&AwVfjprAsVvH7^HkJk>Q`pxoW}eD!M!@a7j)GiD8sT}w8H$kuE{uwtltjH?z#U|sr14R
zqivZCI_}Z~m6f5)l6)+6cSmNi8njeDi;LaB^tU79vfFX5we#c&M3%cbco-z2T~7y!#t>heP*`<{fCdAK7aZ8O%ECbe%>03
zme1)sIur6826>jM>=ni-XK`FwSc83#5aTaJvG*Z_3~r(5(b%7cL_a}W9%-P*Uw||z>|3r3>!kw=eFZ?KW26T9bb_HA&$4g1GK^0U
z!lWXbRAH|e!lYx|v+aD#m0^<(!d^aveY3DP6rtaa{d>AO2;VT5tN<%8slbe>y0rg4
z{QdoZGKp)f04wlcDIn@w!Bz{0WcSvo!O>ppp}jyOP`k?TMG884E5^3872iP9z_>>a
VvTwOEj1dGM1hfoXumXQnfinsEe;NP)
literal 0
HcmV?d00001
diff --git a/lib/jquery/.DS_Store b/lib/jquery/.DS_Store
new file mode 100644
index 0000000000000000000000000000000000000000..41b3b165136c6ed56f8cd3d07996f2b08b5238d7
GIT binary patch
literal 6148
zcmeHKJxfDD5S-N%L7SA8S6T`FgCit@wSPdO7DDiWLF-rfyYkO;_5(3IZ3G*ch26Q^
zw{w>_#oH_ZTfW?10t*0hx+C5^OwFIWPwc2NMx^tMM+|tv1)i~)RDYjv?g?J;K+f(f
z|9U&zZMK7-<3H|-e*PZDl}rjq0VyB_q<|FotpeVAY4g)WMJXT!q`;>F{(We4$6h!l
z#;1cJMgZcB=`gNimLN7y5PRX6$PCSrN=&NNh+#=*zExc>921ici<@~)-E1|XSlrHh
zi*i^`RFncz;820%+%CNTujxO`|A!>)q<|FoR|?o{b+cOXm8!Q+Ue0@Mqu0tH
pIw%a$j)~EZx$$;<7DZXte9h;*a7+w3^Fb%-&w%S9lLCLOzz2Cu8-@S?
literal 0
HcmV?d00001
diff --git a/vendor/.DS_Store b/vendor/.DS_Store
new file mode 100644
index 0000000000000000000000000000000000000000..2aed80cdc1686515e92299530c3fd4a308b001ce
GIT binary patch
literal 6148
zcmeHK&1%~~5Z<+&L{2UW`61AYjxFTiwh75mQQSZe1%paLse>z3qFxYMW63tb7<3Ed
zF`A$DHA?#ud6FE{nccOC%pek*o0j4|%@qSuVsj4=xou~Y@~gy415
z87Y}a8IY?na+bYMCK=8*whyG0hT41O`2UO#*(jzC|6^80(Rk8;C7)-h{+
z7j_bn<+a)^FO@3`i%V8@c?HE@T|V{Oa^UAd-pjn8`&s=HQ5+h-5#;T$|53_h;s@ce
zhzBiu{ZOWPAkw(|ptN}+(ntFe=MM3lE%_C}){_o1{Ar17!HL?{xGpIKFu
zmc2O~?!BpPJ3FIoM|=BwZ$~5h+_GN0+CBL2sWZCxetC6$^W*2Q-)ho~!|SbN&EOdR
zfHOs3-|wc0Ous>VTrsg+^V@xM@DPxidE%3RicB
z@g0@UxT}#YF+dDVGl0Dxh>hp}yMOopDv1m+Kn(n!4Dd?buX`{zbGFXR63i!S&U&VFqTt(Q3Y3^hxY$06??{@j8GD01i4~t%2b$M)%2Q
ztY$}+5QUzjfCI=uLLbVRY99C(6`*(5gf9@n5dHf5E8eE+AWBt)74&($L4SfSE-x|8
zWksW+Z&?>nKb1wsCWlvd*tN<&(3M^0oy9GJT1+K|Uu>!2X|Dgcw4<0(9
zZ?Q6{w+;-t1wgFhur|!;XOTFbMc-m&5bvM~Lq#-HVOtDg=s51#I^SYt(9l8H=0n((
zh3!y;ULEK6bU6s$AV*e!6}YJY^?qnBo&VeO`+r@;ffZl{Zl?mGz7=e>@!9OzI`fot
v)_Ull(8;K-GI&M7L?6XiOGoh|bZt29QG)1OtPJ7^8vh7r891;43sv9`@-lK5
literal 0
HcmV?d00001
diff --git a/vendor/assets/javascripts/.DS_Store b/vendor/assets/javascripts/.DS_Store
new file mode 100644
index 0000000000000000000000000000000000000000..a5d14ea78247b7f46d6bc9a4eb915f0d22c9ae87
GIT binary patch
literal 6148
zcmeHKyGjF55IvJ@5fLGcV0nMQK>Pq%LM*K9tTbv7iN*&h?Dlu`Tl}YZ<`HqtRu+OX
z12gA7=G?n`VDH@lAd}Vg7#IQ=&=o}+9j3#bQ@u#;6UEke!V3;D#)$qmOrL!pw|K+~
zH~9Me`W8p@JIrx!c!`J8#qw&lSkB0zWO7b?qgU%SBe2t2X~f=hn}K6yz0!NZ*!#xV
z?6%E(4`x4@?53pxsX!`_3Zw!*P=I%~+F;i)V=9meqynD`==o6SigjS)Xh#Qwl>o$w
z!)9!2EuoweSO+$aoS}(RiB6R$F~sQ{FOgRVHjYk*MDZc9^QL$a+nwtdONZ2s8B>8&
zpsj$`zO
<|0n!pI*WWu$&d=90{>M3sitSs3EwX6)~)x{ySC6T=xUnRXoJRf>nDI6
hJx2~~(&vk|nO6rkj=GAD8=aUx0wzd?RNxmB_yDN*F2eu-
literal 0
HcmV?d00001
diff --git a/vendor/assets/javascripts/jquery.js b/vendor/assets/javascripts/jquery.js
index d4b67f7e..1c3aa822 100644
--- a/vendor/assets/javascripts/jquery.js
+++ b/vendor/assets/javascripts/jquery.js
@@ -1,5 +1,5 @@
/*!
- * jQuery JavaScript Library v1.11.1
+ * jQuery JavaScript Library v1.11.2
* http://jquery.com/
*
* Includes Sizzle.js
@@ -9,7 +9,7 @@
* Released under the MIT license
* http://jquery.org/license
*
- * Date: 2014-05-01T17:42Z
+ * Date: 2014-12-17T15:27Z
*/
(function( global, factory ) {
@@ -64,7 +64,7 @@ var support = {};
var
- version = "1.11.1",
+ version = "1.11.2",
// Define a local copy of jQuery
jQuery = function( selector, context ) {
@@ -269,7 +269,8 @@ jQuery.extend({
// parseFloat NaNs numeric-cast false positives (null|true|false|"")
// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
// subtraction forces infinities to NaN
- return !jQuery.isArray( obj ) && obj - parseFloat( obj ) >= 0;
+ // adding 1 corrects loss of precision from parseFloat (#15100)
+ return !jQuery.isArray( obj ) && (obj - parseFloat( obj ) + 1) >= 0;
},
isEmptyObject: function( obj ) {
@@ -584,14 +585,14 @@ function isArraylike( obj ) {
}
var Sizzle =
/*!
- * Sizzle CSS Selector Engine v1.10.19
+ * Sizzle CSS Selector Engine v2.2.0-pre
* http://sizzlejs.com/
*
- * Copyright 2013 jQuery Foundation, Inc. and other contributors
+ * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
- * Date: 2014-04-18
+ * Date: 2014-12-16
*/
(function( window ) {
@@ -618,7 +619,7 @@ var i,
contains,
// Instance-specific data
- expando = "sizzle" + -(new Date()),
+ expando = "sizzle" + 1 * new Date(),
preferredDoc = window.document,
dirruns = 0,
done = 0,
@@ -633,7 +634,6 @@ var i,
},
// General-purpose constants
- strundefined = typeof undefined,
MAX_NEGATIVE = 1 << 31,
// Instance methods
@@ -643,12 +643,13 @@ var i,
push_native = arr.push,
push = arr.push,
slice = arr.slice,
- // Use a stripped-down indexOf if we can't use a native one
- indexOf = arr.indexOf || function( elem ) {
+ // Use a stripped-down indexOf as it's faster than native
+ // http://jsperf.com/thor-indexof-vs-for/5
+ indexOf = function( list, elem ) {
var i = 0,
- len = this.length;
+ len = list.length;
for ( ; i < len; i++ ) {
- if ( this[i] === elem ) {
+ if ( list[i] === elem ) {
return i;
}
}
@@ -688,6 +689,7 @@ var i,
")\\)|)",
// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+ rwhitespace = new RegExp( whitespace + "+", "g" ),
rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
@@ -739,6 +741,14 @@ var i,
String.fromCharCode( high + 0x10000 ) :
// Supplemental Plane codepoint (surrogate pair)
String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
+ },
+
+ // Used for iframes
+ // See setDocument()
+ // Removing the function wrapper causes a "Permission Denied"
+ // error in IE
+ unloadHandler = function() {
+ setDocument();
};
// Optimize for push.apply( _, NodeList )
@@ -781,19 +791,18 @@ function Sizzle( selector, context, results, seed ) {
context = context || document;
results = results || [];
+ nodeType = context.nodeType;
- if ( !selector || typeof selector !== "string" ) {
- return results;
- }
+ if ( typeof selector !== "string" || !selector ||
+ nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
- if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
- return [];
+ return results;
}
- if ( documentIsHTML && !seed ) {
+ if ( !seed && documentIsHTML ) {
- // Shortcuts
- if ( (match = rquickExpr.exec( selector )) ) {
+ // Try to shortcut find operations when possible (e.g., not under DocumentFragment)
+ if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
// Speed-up: Sizzle("#ID")
if ( (m = match[1]) ) {
if ( nodeType === 9 ) {
@@ -825,7 +834,7 @@ function Sizzle( selector, context, results, seed ) {
return results;
// Speed-up: Sizzle(".CLASS")
- } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {
+ } else if ( (m = match[3]) && support.getElementsByClassName ) {
push.apply( results, context.getElementsByClassName( m ) );
return results;
}
@@ -835,7 +844,7 @@ function Sizzle( selector, context, results, seed ) {
if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
nid = old = expando;
newContext = context;
- newSelector = nodeType === 9 && selector;
+ newSelector = nodeType !== 1 && selector;
// qSA works strangely on Element-rooted queries
// We can work around this by specifying an extra ID on the root
@@ -1022,7 +1031,7 @@ function createPositionalPseudo( fn ) {
* @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
*/
function testContext( context ) {
- return context && typeof context.getElementsByTagName !== strundefined && context;
+ return context && typeof context.getElementsByTagName !== "undefined" && context;
}
// Expose support vars for convenience
@@ -1046,9 +1055,8 @@ isXML = Sizzle.isXML = function( elem ) {
* @returns {Object} Returns the current document
*/
setDocument = Sizzle.setDocument = function( node ) {
- var hasCompare,
- doc = node ? node.ownerDocument || node : preferredDoc,
- parent = doc.defaultView;
+ var hasCompare, parent,
+ doc = node ? node.ownerDocument || node : preferredDoc;
// If no document and documentElement is available, return
if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
@@ -1058,9 +1066,7 @@ setDocument = Sizzle.setDocument = function( node ) {
// Set our document
document = doc;
docElem = doc.documentElement;
-
- // Support tests
- documentIsHTML = !isXML( doc );
+ parent = doc.defaultView;
// Support: IE>8
// If iframe document is assigned to "document" variable and if iframe has been reloaded,
@@ -1069,21 +1075,22 @@ setDocument = Sizzle.setDocument = function( node ) {
if ( parent && parent !== parent.top ) {
// IE11 does not have attachEvent, so all must suffer
if ( parent.addEventListener ) {
- parent.addEventListener( "unload", function() {
- setDocument();
- }, false );
+ parent.addEventListener( "unload", unloadHandler, false );
} else if ( parent.attachEvent ) {
- parent.attachEvent( "onunload", function() {
- setDocument();
- });
+ parent.attachEvent( "onunload", unloadHandler );
}
}
+ /* Support tests
+ ---------------------------------------------------------------------- */
+ documentIsHTML = !isXML( doc );
+
/* Attributes
---------------------------------------------------------------------- */
// Support: IE<8
- // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
+ // Verify that getAttribute really returns attributes and not properties
+ // (excepting IE8 booleans)
support.attributes = assert(function( div ) {
div.className = "i";
return !div.getAttribute("className");
@@ -1098,17 +1105,8 @@ setDocument = Sizzle.setDocument = function( node ) {
return !div.getElementsByTagName("*").length;
});
- // Check if getElementsByClassName can be trusted
- support.getElementsByClassName = rnative.test( doc.getElementsByClassName ) && assert(function( div ) {
- div.innerHTML = "