jquery-rails 2.1.4 → 4.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +1 -1
- data/.travis.yml +32 -0
- data/CHANGELOG.md +153 -1
- data/CONTRIBUTING.md +132 -0
- data/Gemfile +19 -1
- data/{LICENSE → MIT-LICENSE} +2 -2
- data/README.md +36 -39
- data/Rakefile +57 -0
- data/VERSIONS.md +68 -0
- data/jquery-rails.gemspec +8 -5
- data/lib/jquery/assert_select.rb +141 -89
- data/lib/jquery/rails/version.rb +5 -4
- data/lib/jquery/rails.rb +1 -3
- data/test/assert_select_jquery_test.rb +91 -0
- data/test/test_helper.rb +6 -0
- data/vendor/assets/javascripts/jquery.js +9332 -7796
- data/vendor/assets/javascripts/jquery.min.js +5 -2
- data/vendor/assets/javascripts/jquery.min.map +1 -0
- data/vendor/assets/javascripts/jquery2.js +9814 -0
- data/vendor/assets/javascripts/jquery2.min.js +4 -0
- data/vendor/assets/javascripts/jquery2.min.map +1 -0
- data/vendor/assets/javascripts/jquery3.js +10704 -0
- data/vendor/assets/javascripts/jquery3.min.js +2 -0
- data/vendor/assets/javascripts/jquery3.min.map +1 -0
- data/vendor/assets/javascripts/jquery_ujs.js +296 -160
- metadata +59 -42
- data/lib/generators/jquery/install/install_generator.rb +0 -59
- data/lib/jquery/rails/railtie.rb +0 -27
- data/vendor/assets/javascripts/jquery-ui.js +0 -14912
- data/vendor/assets/javascripts/jquery-ui.min.js +0 -5
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ab13d042048cc568bf3c47322a53992a86c26e153beb4298008a61b1bf26b772
|
4
|
+
data.tar.gz: 2e1b815b3f09adc49539628fe5331222f71dcbb7101a3a3e4591fca79241087b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 51c887d6c520f1366d0982280c6516825b1cb9561a8a310661e984e1d6d47806edeff197d085e5edf704b9754e8d57c9f8fb449446032f9e6e429e9c40986aa4
|
7
|
+
data.tar.gz: 9bf9832f9a1ba125d7a36aef545c84b692284a586c7aa50c64ea4dc75f25dce69d762749fcb7bbba1612cf9c1a5483d317ab4a36d9a59717007089ee1c7dac18
|
data/.gitignore
CHANGED
data/.travis.yml
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
sudo: false
|
2
|
+
cache: bundler
|
3
|
+
language: ruby
|
4
|
+
rvm:
|
5
|
+
- 1.9.3
|
6
|
+
- 2.0.0
|
7
|
+
- 2.1.10
|
8
|
+
- 2.2.9
|
9
|
+
- 2.3.6
|
10
|
+
- 2.4.10
|
11
|
+
- 2.5.8
|
12
|
+
- 2.6.6
|
13
|
+
- 2.7.1
|
14
|
+
- jruby
|
15
|
+
- ruby-head
|
16
|
+
matrix:
|
17
|
+
fast_finish: true
|
18
|
+
allow_failures:
|
19
|
+
- rvm: jruby
|
20
|
+
- rvm: ruby-head
|
21
|
+
notifications:
|
22
|
+
email: false
|
23
|
+
irc:
|
24
|
+
on_success: change
|
25
|
+
on_failure: always
|
26
|
+
channels:
|
27
|
+
- "irc.freenode.org#rails-contrib"
|
28
|
+
campfire:
|
29
|
+
on_success: change
|
30
|
+
on_failure: always
|
31
|
+
rooms:
|
32
|
+
- secure: "p58t43P+64c1g0Av88DNM9XxMnmXM/PzRFU4yeo53i7lDY77PqKOVY+swc8eibn6cMgfyw2vqI7UFri4WLxwdN5jN5QaByHtXT2STFaJV4ORyyOBqQLuJTFWzMn8+Zil3rW/0Xv6tHoeAjsToZyYFefyjM3qemAmUqI8jLqU1sM="
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,162 @@
|
|
1
|
+
## unreleased
|
2
|
+
|
3
|
+
## 4.6.0
|
4
|
+
|
5
|
+
- update jquery to 3.7.0
|
6
|
+
|
7
|
+
## 4.5.1
|
8
|
+
|
9
|
+
- update jquery to 3.6.1
|
10
|
+
- update jquery-ujs to 1.2.3
|
11
|
+
|
12
|
+
## 4.5.0
|
13
|
+
|
14
|
+
- update jquery to 3.6.0
|
15
|
+
|
16
|
+
## 4.4.0
|
17
|
+
|
18
|
+
- update jquery to 3.5.1 (note: [3.5.0 contains important security updates](https://github.com/advisories/GHSA-jpcq-cgw6-v4j6))
|
19
|
+
- unescape dollar signs and backticks in `assert_select_jquery` to match
|
20
|
+
Rails updated behavior.
|
21
|
+
|
22
|
+
## 4.3.5
|
23
|
+
|
24
|
+
- update jquery to 3.4.1
|
25
|
+
|
26
|
+
## 4.3.4
|
27
|
+
|
28
|
+
- update jquery to 3.4.0
|
29
|
+
|
30
|
+
## 4.3.3
|
31
|
+
|
32
|
+
- update jquery to 3.3.1
|
33
|
+
|
34
|
+
## 4.3.2
|
35
|
+
|
36
|
+
- update jquery to 3.3.0
|
37
|
+
- Add possibility to test HTML: all, attribute prefix, attribute contains,
|
38
|
+
attribute ends with, child, and class selectors
|
39
|
+
- Fix matching multiple calls for the same selector/function exception
|
40
|
+
|
41
|
+
## 4.3.1
|
42
|
+
|
43
|
+
- update jquery to 3.2.1
|
44
|
+
|
45
|
+
## 4.3.0
|
46
|
+
|
47
|
+
- update jquery to 3.2.0
|
48
|
+
- Add possibility to test HTML attribute selectors
|
49
|
+
|
50
|
+
## 4.2.2
|
51
|
+
|
52
|
+
- update jquery to 3.1.1
|
53
|
+
|
54
|
+
## 4.2.1
|
55
|
+
|
56
|
+
- update jquery to 3.1.0
|
57
|
+
|
58
|
+
## 4.2.0
|
59
|
+
|
60
|
+
- Support jQuery 3.x
|
61
|
+
- Update jquery-ujs to 1.2.2
|
62
|
+
- Update jQuery to 1.12.4 and 2.2.4
|
63
|
+
|
64
|
+
## 4.1.1
|
65
|
+
|
66
|
+
- Update jQuery to 1.12.1 and 2.2.1
|
67
|
+
- Update jquery-ujs to 1.2.1
|
68
|
+
|
69
|
+
## 4.1.0
|
70
|
+
|
71
|
+
- Update jQuery to 1.12.0 and 2.2.0
|
72
|
+
- Update jquery-ujs to 1.2.0
|
73
|
+
|
74
|
+
## 4.0.5
|
75
|
+
|
76
|
+
- Specify that Ruby version 1.9.3+ is required
|
77
|
+
- Test on Ruby 2.2
|
78
|
+
- Update jquery-ujs from 1.0.4 to 1.1.0
|
79
|
+
|
80
|
+
## 4.0.4
|
81
|
+
|
82
|
+
- Fix CSP bypass vulnerability. CVE-2015-1840
|
83
|
+
|
84
|
+
## 4.0.1
|
85
|
+
|
86
|
+
- Fix RubyGems permission problem.
|
87
|
+
|
88
|
+
## 4.0.0
|
89
|
+
|
90
|
+
- Minimum dependency set to Rails 4.2
|
91
|
+
- Updated to jquery-ujs 1.0.2
|
92
|
+
- Support jQuery 1.x and 2.x
|
93
|
+
|
94
|
+
## 3.1.3 (16 June 2015)
|
95
|
+
|
96
|
+
- Fix CSP bypass vulnerability. CVE-2015-1840
|
97
|
+
|
98
|
+
## 3.1.2 (1 September 2014)
|
99
|
+
|
100
|
+
- Updated to jquery-ujs 1.0.1
|
101
|
+
|
102
|
+
## 3.1.1 (23 June 2014)
|
103
|
+
|
104
|
+
- Updated to jQuery 1.11.1
|
105
|
+
- Updated to jquery-ujs 1.0.0
|
106
|
+
|
107
|
+
## 3.1.0 (29 January 2014)
|
108
|
+
|
109
|
+
- Updated to jQuery 1.11.0
|
110
|
+
- Updated to latest jquery-ujs
|
111
|
+
- Added development rake task for updating jQuery
|
112
|
+
|
113
|
+
## 3.0.4 (10 July 2013)
|
114
|
+
|
115
|
+
- Fixed jQuery source map
|
116
|
+
|
117
|
+
## 3.0.3 (10 July 2013)
|
118
|
+
|
119
|
+
- Updated to jQuery 1.10.2
|
120
|
+
|
121
|
+
## 3.0.2 (04 July 2013)
|
122
|
+
|
123
|
+
- Updated to latest jquery-ujs
|
124
|
+
|
125
|
+
## 3.0.1 (07 June 2013)
|
126
|
+
|
127
|
+
- Updated to jQuery 1.10.1
|
128
|
+
- Removed jQuery UI from generator
|
129
|
+
|
130
|
+
## 3.0.0 (29 May 2013)
|
131
|
+
|
132
|
+
- Removed jQuery UI
|
133
|
+
|
134
|
+
## 2.3.0 (29 May 2013)
|
135
|
+
|
136
|
+
- Updated to jQuery 1.10.0
|
137
|
+
- Updated to jQuery UI 1.10.3
|
138
|
+
|
139
|
+
## 2.2.2 (29 May 2013)
|
140
|
+
|
141
|
+
- Updated to latest jquery-ujs
|
142
|
+
|
143
|
+
## 2.2.1 (08 February 2013)
|
144
|
+
|
145
|
+
- Updated to jQuery 1.9.1
|
146
|
+
- Updated to latest jquery-ujs
|
147
|
+
|
148
|
+
## 2.2.0 (19 January 2013)
|
149
|
+
|
150
|
+
- Updated to jQuery 1.9.0
|
151
|
+
- Updated to latest jquery-ujs
|
152
|
+
|
1
153
|
## 2.1.4 (26 November 2012)
|
2
154
|
|
3
155
|
- Updated to jQuery 1.8.3
|
4
156
|
- Updated to jQuery UI 1.9.2
|
5
157
|
- Rails 4 compatibility
|
158
|
+
- Rails 3.1 compatibility (without asset pipeline)
|
6
159
|
- Rails 3.0 compatibility
|
7
|
-
- Rails 3.1 (without asset pipeline) compatibility
|
8
160
|
|
9
161
|
## 2.1.3 (24 September 2012)
|
10
162
|
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,132 @@
|
|
1
|
+
Contributing to jquery-rails
|
2
|
+
=====================
|
3
|
+
|
4
|
+
[![Build Status](https://travis-ci.org/rails/jquery-rails.svg?branch=master)](https://travis-ci.org/rails/jquery-rails)
|
5
|
+
|
6
|
+
jquery-rails is work of [many contributors](https://github.com/rails/jquery-rails/graphs/contributors). You're encouraged to submit [pull requests](https://github.com/rails/jquery-rails/pulls), [propose features and discuss issues](https://github.com/rails/jquery-rails/issues).
|
7
|
+
|
8
|
+
#### Updating jQuery
|
9
|
+
|
10
|
+
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.
|
11
|
+
|
12
|
+
#### Changes to jquery_ujs.js
|
13
|
+
|
14
|
+
**If it's an issue pertaining to the jquery-ujs javascript, please
|
15
|
+
report it to the [rails/jquery-ujs project](https://github.com/rails/jquery-ujs/issues).**
|
16
|
+
|
17
|
+
#### Fork the Project
|
18
|
+
|
19
|
+
Fork the [project on Github](https://github.com/rails/jquery-rails) and check out your copy.
|
20
|
+
|
21
|
+
```
|
22
|
+
git clone https://github.com/contributor/jquery-rails.git
|
23
|
+
cd jquery-rails
|
24
|
+
git remote add upstream https://github.com/rails/jquery-rails.git
|
25
|
+
```
|
26
|
+
|
27
|
+
#### Create a Topic Branch
|
28
|
+
|
29
|
+
Make sure your fork is up-to-date and create a topic branch for your feature or bug fix.
|
30
|
+
|
31
|
+
```
|
32
|
+
git checkout master
|
33
|
+
git pull upstream master
|
34
|
+
git checkout -b my-feature-branch
|
35
|
+
```
|
36
|
+
|
37
|
+
#### Bundle Install and Test
|
38
|
+
|
39
|
+
Ensure that you can build the project and run tests.
|
40
|
+
|
41
|
+
```
|
42
|
+
bundle install
|
43
|
+
bundle exec rake test
|
44
|
+
```
|
45
|
+
|
46
|
+
#### Write Tests
|
47
|
+
|
48
|
+
Try to write a test that reproduces the problem you're trying to fix or describes a feature that you want to build. Add to [test](test).
|
49
|
+
|
50
|
+
#### Testing
|
51
|
+
|
52
|
+
This is a gem that simply includes jQuery and jQuery UJS into the Rails
|
53
|
+
asset pipeline. The asset pipeline functionality is well tested within the
|
54
|
+
Rails framework. And jQuery and jQuery UJS each have their own extensive
|
55
|
+
test suites. Thus, there's not a lot to actually test here.
|
56
|
+
|
57
|
+
That being said, we do have a few integration-level tests to make sure
|
58
|
+
everything is being included and basic UJS functionality works within a
|
59
|
+
sample Rails app.
|
60
|
+
|
61
|
+
If you're making changes to the actual gem, run the tests as follows:
|
62
|
+
|
63
|
+
1. Checkout the demo Rails app: `git clone git://github.com/JangoSteve/Rails-jQuery-Demo.git`
|
64
|
+
|
65
|
+
2. Install the gems: `bundle install`
|
66
|
+
|
67
|
+
3. Change the jquery-rails gem in the Gemfile to use your local
|
68
|
+
version of the gem with your updates: `gem 'jquery-rails', :path => '../path/to/jquery-rails'`
|
69
|
+
|
70
|
+
4. Update your bundled jquery-rails gem: `bundle update jquery-rails`
|
71
|
+
|
72
|
+
5. Run the tests: `bundle exec rspec spec/`
|
73
|
+
|
74
|
+
We definitely appreciate pull requests that highlight or reproduce a problem, even without a fix.
|
75
|
+
|
76
|
+
#### Write Code
|
77
|
+
|
78
|
+
Implement your feature or bug fix.
|
79
|
+
|
80
|
+
Make sure that `bundle exec rake test` completes without errors.
|
81
|
+
|
82
|
+
#### Write Documentation
|
83
|
+
|
84
|
+
Document any external behavior in the [README](README.md).
|
85
|
+
|
86
|
+
#### Commit Changes
|
87
|
+
|
88
|
+
Make sure git knows your name and email address:
|
89
|
+
|
90
|
+
```
|
91
|
+
git config --global user.name "Your Name"
|
92
|
+
git config --global user.email "contributor@example.com"
|
93
|
+
```
|
94
|
+
|
95
|
+
Writing good commit logs is important. A commit log should describe what changed and why.
|
96
|
+
|
97
|
+
```
|
98
|
+
git add ...
|
99
|
+
git commit
|
100
|
+
```
|
101
|
+
|
102
|
+
#### Push
|
103
|
+
|
104
|
+
```
|
105
|
+
git push origin my-feature-branch
|
106
|
+
```
|
107
|
+
|
108
|
+
#### Make a Pull Request
|
109
|
+
|
110
|
+
Go to https://github.com/contributor/jquery-rails and select your feature branch. Click the 'Pull Request' button and fill out the form. Pull requests are usually reviewed within a few days.
|
111
|
+
|
112
|
+
#### Rebase
|
113
|
+
|
114
|
+
If you've been working on a change for a while, rebase with upstream/master.
|
115
|
+
|
116
|
+
```
|
117
|
+
git fetch upstream
|
118
|
+
git rebase upstream/master
|
119
|
+
git push origin my-feature-branch -f
|
120
|
+
```
|
121
|
+
|
122
|
+
#### Check on Your Pull Request
|
123
|
+
|
124
|
+
Go back to your pull request after a few minutes and see whether it passed muster with Travis-CI. Everything should look green, otherwise fix issues and amend your commit as described above.
|
125
|
+
|
126
|
+
#### Be Patient
|
127
|
+
|
128
|
+
It's likely that your change will not be merged and that the nitpicky maintainers will ask you to do more, or fix seemingly benign problems. Hang on there!
|
129
|
+
|
130
|
+
#### Thank You
|
131
|
+
|
132
|
+
Please do know that we really appreciate and value your time and work. We love you, really.
|
data/Gemfile
CHANGED
@@ -1,4 +1,22 @@
|
|
1
|
-
source
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gem "mime-types", "< 3", group: :test
|
4
|
+
|
5
|
+
if RUBY_VERSION >= '2.2.2'
|
6
|
+
gem 'rails'
|
7
|
+
gem 'rack'
|
8
|
+
gem 'json', '>= 2'
|
9
|
+
else
|
10
|
+
gem 'rails', '~> 4.2.0'
|
11
|
+
gem 'rack', '~>1.6'
|
12
|
+
gem 'json', '~> 1.8.0'
|
13
|
+
end
|
14
|
+
|
15
|
+
if RUBY_VERSION >= '2.1'
|
16
|
+
gem 'nokogiri'
|
17
|
+
else
|
18
|
+
gem 'nokogiri', '~> 1.6.0'
|
19
|
+
end
|
2
20
|
|
3
21
|
# Specify your gem's dependencies in jquery-rails.gemspec
|
4
22
|
gemspec
|
data/{LICENSE → MIT-LICENSE}
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License
|
2
2
|
|
3
|
-
Copyright (c) 2010 Andre Arko
|
3
|
+
Copyright (c) 2010-2016 Andre Arko
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
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
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
21
|
+
THE SOFTWARE.
|
data/README.md
CHANGED
@@ -4,41 +4,31 @@ jQuery! For Rails! So great.
|
|
4
4
|
|
5
5
|
This gem provides:
|
6
6
|
|
7
|
-
* jQuery 1
|
8
|
-
* jQuery UI 1.8.23 (javascript only)
|
7
|
+
* jQuery 1, 2 and 3
|
9
8
|
* the jQuery UJS adapter
|
10
9
|
* assert_select_jquery to test jQuery responses in Ruby tests
|
11
10
|
|
12
11
|
## Versions
|
13
12
|
|
14
13
|
Starting with v2.1, the jquery-rails gem follows these version guidelines
|
15
|
-
to provide more control over your app's
|
14
|
+
to provide more control over your app's jQuery version from your Gemfile:
|
16
15
|
|
17
16
|
```
|
18
|
-
patch version bump = updates to jquery-ujs, jquery-rails, and patch-level updates to
|
19
|
-
minor version bump = minor-level updates to
|
20
|
-
major version bump = major-level updates to
|
17
|
+
patch version bump = updates to jquery-ujs, jquery-rails, and patch-level updates to jQuery
|
18
|
+
minor version bump = minor-level updates to jQuery
|
19
|
+
major version bump = major-level updates to jQuery and updates to Rails which may be backwards-incompatible
|
21
20
|
```
|
22
21
|
|
23
|
-
|
22
|
+
See [VERSIONS.md](VERSIONS.md) to see which versions of jquery-rails bundle which
|
23
|
+
versions of jQuery.
|
24
24
|
|
25
|
-
|
25
|
+
## Installation
|
26
26
|
|
27
|
-
|
28
|
-
rails new myapp
|
27
|
+
Add
|
29
28
|
```
|
30
|
-
|
31
|
-
If upgrading from an older version of rails, or for rails 3.0 apps,
|
32
|
-
add the jquery-rails gem to your Gemfile.
|
33
|
-
|
34
|
-
```ruby
|
35
|
-
gem "jquery-rails"
|
29
|
+
gem 'jquery-rails'
|
36
30
|
```
|
37
|
-
|
38
|
-
And run `bundle install`. The rest of the installation depends on
|
39
|
-
whether the asset pipeline is being used.
|
40
|
-
|
41
|
-
### Rails 3.1 or greater (with asset pipeline *enabled*)
|
31
|
+
to your Gemfile.
|
42
32
|
|
43
33
|
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:
|
44
34
|
|
@@ -47,38 +37,45 @@ The jquery and jquery-ujs files will be added to the asset pipeline and availabl
|
|
47
37
|
//= require jquery_ujs
|
48
38
|
```
|
49
39
|
|
50
|
-
|
40
|
+
If you are running Rails 5.1 and up, and if you have included `//= require rails-ujs`, then `jquery_ujs` is not needed anymore. You can just add:
|
51
41
|
|
52
42
|
```js
|
53
|
-
//= require jquery
|
43
|
+
//= require jquery
|
54
44
|
```
|
55
45
|
|
56
|
-
|
57
|
-
|
58
|
-
### Rails 3.0 (or greater with asset pipeline *disabled*)
|
59
|
-
|
60
|
-
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 (and optionally, jQuery UI) to the `public/javascripts` directory.
|
46
|
+
If you want to use jQuery 2, you can require `jquery2` instead:
|
61
47
|
|
62
|
-
|
48
|
+
```js
|
49
|
+
//= require jquery2
|
50
|
+
//= require jquery_ujs
|
51
|
+
```
|
63
52
|
|
64
|
-
|
53
|
+
And if you want to use jQuery 3, you can require `jquery3`:
|
65
54
|
|
66
|
-
```
|
67
|
-
|
55
|
+
```js
|
56
|
+
//= require jquery3
|
57
|
+
//= require jquery_ujs
|
68
58
|
```
|
69
59
|
|
70
|
-
|
60
|
+
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.
|
71
61
|
|
72
|
-
|
62
|
+
*As of v3.0, jquery-rails no longer includes jQuery UI. Use the
|
63
|
+
jquery-ui-rails gem above.*
|
73
64
|
|
74
|
-
|
65
|
+
## Contributing to jquery-rails
|
66
|
+
|
67
|
+
jquery-rails is work of many contributors. You're encouraged to submit pull requests, propose
|
68
|
+
features and discuss issues.
|
75
69
|
|
76
70
|
* 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).
|
77
71
|
|
78
|
-
* If the
|
72
|
+
* 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.
|
79
73
|
|
80
|
-
|
74
|
+
See [CONTRIBUTING](CONTRIBUTING.md).
|
81
75
|
|
82
|
-
|
76
|
+
## License
|
77
|
+
jquery-rails is released under the [MIT License](MIT-LICENSE).
|
78
|
+
|
79
|
+
## Acknowledgements
|
83
80
|
|
84
|
-
|
81
|
+
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/orgs/rails/people) for making jquery-rails an official part of Rails 3.1.
|
data/Rakefile
CHANGED
@@ -1,2 +1,59 @@
|
|
1
1
|
require 'bundler'
|
2
|
+
require 'rake/testtask'
|
2
3
|
Bundler::GemHelper.install_tasks
|
4
|
+
|
5
|
+
task default: :test
|
6
|
+
|
7
|
+
Rake::TestTask.new(:test) do |t|
|
8
|
+
t.libs << 'lib'
|
9
|
+
t.pattern = 'test/**/*_test.rb'
|
10
|
+
t.warning = true
|
11
|
+
t.verbose = true
|
12
|
+
end
|
13
|
+
|
14
|
+
# Check if versions are correct between VERSION constants and .js files
|
15
|
+
#
|
16
|
+
task :release => [:guard_version]
|
17
|
+
|
18
|
+
task :guard_version do
|
19
|
+
def check_version(file, pattern, constant)
|
20
|
+
body = File.read("vendor/assets/javascripts/#{file}")
|
21
|
+
match = body.match(pattern) or abort "Version check failed: no pattern matched in #{file}"
|
22
|
+
file_version = match[1]
|
23
|
+
constant_version = Jquery::Rails.const_get(constant)
|
24
|
+
|
25
|
+
unless constant_version == file_version
|
26
|
+
abort "Jquery::Rails::#{constant} was #{constant_version} but it should be #{file_version}"
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
check_version('jquery.js', /jQuery JavaScript Library v([\S]+)/, 'JQUERY_VERSION')
|
31
|
+
check_version('jquery2.js', /jQuery JavaScript Library v([\S]+)/, 'JQUERY_2_VERSION')
|
32
|
+
check_version('jquery3.js', /jQuery JavaScript Library v([\S]+)/, 'JQUERY_3_VERSION')
|
33
|
+
end
|
34
|
+
|
35
|
+
desc "Update jQuery versions"
|
36
|
+
task :update_jquery do
|
37
|
+
def download_jquery(filename, version)
|
38
|
+
suffix = "-#{version}"
|
39
|
+
|
40
|
+
puts "Downloading #{filename}.js"
|
41
|
+
puts `curl -o vendor/assets/javascripts/#{filename}.js https://code.jquery.com/jquery#{suffix}.js`
|
42
|
+
puts "Downloading #{filename}.min.js"
|
43
|
+
puts `curl -o vendor/assets/javascripts/#{filename}.min.js https://code.jquery.com/jquery#{suffix}.min.js`
|
44
|
+
puts "Downloading #{filename}.min.map"
|
45
|
+
puts `curl -o vendor/assets/javascripts/#{filename}.min.map https://code.jquery.com/jquery#{suffix}.min.map`
|
46
|
+
end
|
47
|
+
|
48
|
+
download_jquery('jquery', Jquery::Rails::JQUERY_VERSION)
|
49
|
+
download_jquery('jquery2', Jquery::Rails::JQUERY_2_VERSION)
|
50
|
+
download_jquery('jquery3', Jquery::Rails::JQUERY_3_VERSION)
|
51
|
+
puts "\e[32mDone!\e[0m"
|
52
|
+
end
|
53
|
+
|
54
|
+
desc "Update jQuery UJS version"
|
55
|
+
task :update_jquery_ujs do
|
56
|
+
puts "Downloading jquery_ujs.js"
|
57
|
+
puts `curl -o vendor/assets/javascripts/jquery_ujs.js https://raw.githubusercontent.com/rails/jquery-ujs/v#{Jquery::Rails::JQUERY_UJS_VERSION}/src/rails.js`
|
58
|
+
puts "\e[32mDone!\e[0m"
|
59
|
+
end
|
data/VERSIONS.md
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
# Bundled Versions
|
2
|
+
|
3
|
+
| Gem | jQuery | jQuery UJS | jQuery UI |
|
4
|
+
|--------|--------|------------| ----------|
|
5
|
+
| 4.6.0 | 1.12.4 & 2.2.4 & 3.7.0 | 1.2.3 | - |
|
6
|
+
| 4.5.1 | 1.12.4 & 2.2.4 & 3.6.1 | 1.2.3 | - |
|
7
|
+
| 4.5.0 | 1.12.4 & 2.2.4 & 3.6.0 | 1.2.2 | - |
|
8
|
+
| 4.4.0 | 1.12.4 & 2.2.4 & 3.5.1 | 1.2.2 | - |
|
9
|
+
| 4.3.5 | 1.12.4 & 2.2.4 & 3.4.1 | 1.2.2 | - |
|
10
|
+
| 4.3.4 | 1.12.4 & 2.2.4 & 3.4.0 | 1.2.2 | - |
|
11
|
+
| 4.3.3 | 1.12.4 & 2.2.4 & 3.3.1 | 1.2.2 | - |
|
12
|
+
| 4.3.2 | 1.12.4 & 2.2.4 & 3.3.0 | 1.2.2 | - |
|
13
|
+
| 4.3.1 | 1.12.4 & 2.2.4 & 3.2.1 | 1.2.2 | - |
|
14
|
+
| 4.3.0 | 1.12.4 & 2.2.4 & 3.2.0 | 1.2.2 | - |
|
15
|
+
| 4.2.2 | 1.12.4 & 2.2.4 & 3.1.1 | 1.2.2 | - |
|
16
|
+
| 4.2.1 | 1.12.4 & 2.2.4 & 3.1.0 | 1.2.2 | - |
|
17
|
+
| 4.2.0 | 1.12.4 & 2.2.4 & 3.0.0 | 1.2.2 | - |
|
18
|
+
| 4.1.1 | 1.12.1 & 2.2.1 | 1.2.1 | - |
|
19
|
+
| 4.1.0 | 1.12.0 & 2.2.0 | 1.2.0 | - |
|
20
|
+
| 4.0.5 | 1.11.3 & 2.1.4 | 1.1.0 | - |
|
21
|
+
| 4.0.4 | 1.11.2 & 2.1.3 | 1.0.4 | - |
|
22
|
+
| 4.0.3 | 1.11.2 & 2.1.3 | 1.0.3 | - |
|
23
|
+
| 4.0.2 | - | - | - |
|
24
|
+
| 4.0.1 | - | - | - |
|
25
|
+
| 4.0.0 | 1.11.1 & 2.1.1 | 1.0.2 | - |
|
26
|
+
| 3.1.3 | 1.11.1 | 1.0.4 | - |
|
27
|
+
| 3.1.2 | 1.11.1 | 1.0.1 | - |
|
28
|
+
| 3.1.1 | 1.11.1 | 1.0.0 | - |
|
29
|
+
| 3.1.0 | 1.11.0 | - | - |
|
30
|
+
| 3.0.5 | 1.11.0 | - | - |
|
31
|
+
| 3.0.4 | ↾ | - | - |
|
32
|
+
| 3.0.3 | 1.10.2 | - | - |
|
33
|
+
| 3.0.2 | ↾ | - | - |
|
34
|
+
| 3.0.1 | 1.10.1 | - | - |
|
35
|
+
| 3.0.0 | ↾ | - | - |
|
36
|
+
| 2.3.0 | 1.10.0 | - | 1.10.3 |
|
37
|
+
| 2.2.2 | ↾ | - | ↾ |
|
38
|
+
| 2.2.1 | 1.9.1 | - | ↾ |
|
39
|
+
| 2.2.0 | 1.9.0 | - | ↾ |
|
40
|
+
| 2.1.4 | 1.8.3 | - | 1.9.2 |
|
41
|
+
| 2.1.3 | 1.8.2 | - | ↾ |
|
42
|
+
| 2.1.2 | 1.8.1 | - | ↾ |
|
43
|
+
| 2.1.1 | ↾ | - | ↾ |
|
44
|
+
| 2.1.0 | 1.8.0 | - | 1.8.23 |
|
45
|
+
| 2.0.3 | ↾ | - | ↾ |
|
46
|
+
| 2.0.2 | 1.7.2 | - | 1.8.18 |
|
47
|
+
| 2.0.1 | ↾ | - | ↾ |
|
48
|
+
| 2.0.0 | ↾ | - | ↾ |
|
49
|
+
| 1.0.19 | 1.7.1 | - | ↾ |
|
50
|
+
| 1.0.18 | ↾ | - | ↾ |
|
51
|
+
| 1.0.17 | 1.7.0 | - | ↾ |
|
52
|
+
| 1.0.16 | 1.6.4 | - | 1.8.16 |
|
53
|
+
| 1.0.15 | ↾ | - | ↾ |
|
54
|
+
| 1.0.14 | ↾ | - | ↾ |
|
55
|
+
| 1.0.13 | 1.6.2 | - | 1.8.14 |
|
56
|
+
| 1.0.12 | ↾ | - | ↾ |
|
57
|
+
| 1.0.11 | ↾ | - | ↾ |
|
58
|
+
| 1.0.10 | ↾ | - | ↾ |
|
59
|
+
| 1.0.9 | ↾ | - | ↾ |
|
60
|
+
| 1.0.8 | ↾ | - | ↾ |
|
61
|
+
| 1.0.7 | ↾ | - | ↾ |
|
62
|
+
| 1.0.6 | ↾ | - | ↾ |
|
63
|
+
| 1.0.5 | ↾ | - | ↾ |
|
64
|
+
| 1.0.4 | ↾ | - | ↾ |
|
65
|
+
| 1.0.3 | 1.6.1 | - | ↾ |
|
66
|
+
| 1.0.2 | ↾ | - | ↾ |
|
67
|
+
| 1.0.1 | ↾ | - | 1.8.12 |
|
68
|
+
| 1.0.0 | 1.6.0 | - | - |
|
data/jquery-rails.gemspec
CHANGED
@@ -7,16 +7,19 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.platform = Gem::Platform::RUBY
|
8
8
|
s.authors = ["André Arko"]
|
9
9
|
s.email = ["andre@arko.net"]
|
10
|
-
s.homepage = "
|
11
|
-
s.summary = "Use jQuery with Rails
|
12
|
-
s.description = "This gem provides jQuery and the jQuery-ujs driver for your Rails
|
10
|
+
s.homepage = "https://github.com/rails/jquery-rails"
|
11
|
+
s.summary = "Use jQuery with Rails 4+"
|
12
|
+
s.description = "This gem provides jQuery and the jQuery-ujs driver for your Rails 4+ application."
|
13
|
+
s.license = "MIT"
|
13
14
|
|
15
|
+
s.required_ruby_version = ">= 1.9.3"
|
14
16
|
s.required_rubygems_version = ">= 1.3.6"
|
15
|
-
s.rubyforge_project = "jquery-rails"
|
16
17
|
|
17
|
-
s.add_dependency "railties", ">=
|
18
|
+
s.add_dependency "railties", ">= 4.2.0"
|
18
19
|
s.add_dependency "thor", ">= 0.14", "< 2.0"
|
19
20
|
|
21
|
+
s.add_dependency "rails-dom-testing", ">= 1", "< 3"
|
22
|
+
|
20
23
|
s.files = `git ls-files`.split("\n")
|
21
24
|
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
22
25
|
s.require_path = 'lib'
|