jquery-rails-rails4 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/CHANGELOG.md +276 -0
- data/CONTRIBUTING.md +36 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +47 -0
- data/LICENSE +21 -0
- data/README.md +2 -0
- data/Rakefile +48 -0
- data/app/assets/javascripts/jquery.js +9789 -0
- data/app/assets/javascripts/jquery.min.js +6 -0
- data/app/assets/javascripts/jquery.min.map +1 -0
- data/app/assets/javascripts/jquery_ujs.js +394 -0
- data/jquery-rails-rails4.gemspec +24 -0
- data/lib/generators/jquery/install/install_generator.rb +50 -0
- data/lib/jquery-rails.rb +1 -0
- data/lib/jquery/assert_select.rb +99 -0
- data/lib/jquery/rails.rb +10 -0
- data/lib/jquery/rails/engine.rb +6 -0
- data/lib/jquery/rails/railtie.rb +18 -0
- data/lib/jquery/rails/version.rb +8 -0
- metadata +98 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3ba0b047bdf3355ea8bd45fa3c16199b3ddcedb4
|
4
|
+
data.tar.gz: 2e0ba5f022766f20587715aa8bea70203ac465ee
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f31538a1dbcfacd7a06de0dc9ad99613063bb56c60d739bc349f35f40d6342285ef32f53d368a91feb062b05e03b2e4ddcf04c00b83d7759d40f898b3ba3887a
|
7
|
+
data.tar.gz: 5bd44829cdd4ff10be21f553c54ced59dbeb76c58010c2028f242f156c0669440c2137c38beba928ebb26cc15b98863251be971f25b84aa568b79d36bff52476
|
data/.gitignore
ADDED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,276 @@
|
|
1
|
+
## 3.0.4 (10 July 2013)
|
2
|
+
|
3
|
+
- Fixed jQuery source map
|
4
|
+
|
5
|
+
## 3.0.3 (10 July 2013)
|
6
|
+
|
7
|
+
- Updated to jQuery 1.10.2
|
8
|
+
|
9
|
+
## 3.0.2 (04 July 2013)
|
10
|
+
|
11
|
+
- Updated to latest jquery-ujs
|
12
|
+
|
13
|
+
## 3.0.1 (07 June 2013)
|
14
|
+
|
15
|
+
- Updated to jQuery 1.10.1
|
16
|
+
- Removed jQuery UI from generator
|
17
|
+
|
18
|
+
## 3.0.0 (29 May 2013)
|
19
|
+
|
20
|
+
- Removed jQuery UI
|
21
|
+
|
22
|
+
## 2.3.0 (29 May 2013)
|
23
|
+
|
24
|
+
- Updated to jQuery 1.10.0
|
25
|
+
- Updated to jQuery UI 1.10.3
|
26
|
+
|
27
|
+
## 2.2.2 (29 May 2013)
|
28
|
+
|
29
|
+
- Updated to latest jquery-ujs
|
30
|
+
|
31
|
+
## 2.2.1 (08 February 2013)
|
32
|
+
|
33
|
+
- Updated to jQuery 1.9.1
|
34
|
+
- Updated to latest jquery-ujs
|
35
|
+
|
36
|
+
## 2.2.0 (19 January 2013)
|
37
|
+
|
38
|
+
- Updated to jQuery 1.9.0
|
39
|
+
- Updated to latest jquery-ujs
|
40
|
+
|
41
|
+
## 2.1.4 (26 November 2012)
|
42
|
+
|
43
|
+
- Updated to jQuery 1.8.3
|
44
|
+
- Updated to jQuery UI 1.9.2
|
45
|
+
- Rails 4 compatibility
|
46
|
+
- Rails 3.1 compatibility (without asset pipeline)
|
47
|
+
- Rails 3.0 compatibility
|
48
|
+
|
49
|
+
## 2.1.3 (24 September 2012)
|
50
|
+
|
51
|
+
- Updated to latest jquery-ujs
|
52
|
+
- Updated to jQuery 1.8.2
|
53
|
+
|
54
|
+
## 2.1.2 (06 September 2012)
|
55
|
+
|
56
|
+
- Updated to latest jquery-ujs
|
57
|
+
- required radio bugfix
|
58
|
+
- Updated to jQuery 1.8.1
|
59
|
+
|
60
|
+
## 2.1.1 (18 August 2012)
|
61
|
+
|
62
|
+
- Updated to latest jquery-ujs
|
63
|
+
- ajax:aborted:file bugfixes
|
64
|
+
|
65
|
+
## 2.1.0 (16 August 2012)
|
66
|
+
|
67
|
+
- Updated to latest jquery-ujs
|
68
|
+
- jQuery 1.8.0 compatibility
|
69
|
+
- Updated to jQuery 1.8.0
|
70
|
+
- Updated to jQuery UI 1.8.23
|
71
|
+
|
72
|
+
## 2.0.3 (16 August 2012)
|
73
|
+
|
74
|
+
- Updated to latest jquery-ujs
|
75
|
+
- created `rails:attachBindings` to allow for customization of $.rails object settings
|
76
|
+
- created `ajax:send` event to provide access to jqXHR object from ajax requests
|
77
|
+
- added support for `data-with-credentials`
|
78
|
+
|
79
|
+
## 2.0.2 (03 April 2012)
|
80
|
+
|
81
|
+
- Updated to jQuery 1.7.2
|
82
|
+
- Updated to jQuery UI 1.8.18
|
83
|
+
- Updated to latest jquery-ujs
|
84
|
+
- Override provided for obtaining `href`
|
85
|
+
- Edit `crossDomain` and `dataType` from `ajax:before` event
|
86
|
+
|
87
|
+
## 2.0.1 (28 February 2012)
|
88
|
+
|
89
|
+
- Fixed Rails 3.2 dependency issue
|
90
|
+
|
91
|
+
## 2.0 (20 December 2011)
|
92
|
+
|
93
|
+
- Minimum dependency set to Rails 3.2
|
94
|
+
|
95
|
+
## 1.0.19 (26 November 2011)
|
96
|
+
|
97
|
+
- Updated to jQuery 1.7.1
|
98
|
+
- Updated to latest jquery-ujs
|
99
|
+
- Fixed disabled links to re-enable when `ajax:before` or
|
100
|
+
`ajax:beforeSend` are canceled
|
101
|
+
- Switched from deprecated `live` to `delegate`
|
102
|
+
|
103
|
+
## 1.0.18 (18 November 2011)
|
104
|
+
|
105
|
+
- Updated to latest jquery-ujs
|
106
|
+
- Fixed event parameter for form submit event handlers in IE for
|
107
|
+
jQuery 1.6.x
|
108
|
+
- Fixed form submit event handlers for jQuery 1.7
|
109
|
+
|
110
|
+
## 1.0.17 (9 November 2011)
|
111
|
+
|
112
|
+
- Updated to jQuery 1.7
|
113
|
+
- Updated to latest jquery-ujs
|
114
|
+
- Moved file comment above function so it won't be included in
|
115
|
+
compressed version
|
116
|
+
|
117
|
+
## 1.0.16 (12 October 2011)
|
118
|
+
|
119
|
+
- Updated to jQuery 1.6.4
|
120
|
+
- Updated to jQuery UI 1.8.16
|
121
|
+
|
122
|
+
## 1.0.15 (12 October 2011)
|
123
|
+
|
124
|
+
- Updated to latest jquery-ujs
|
125
|
+
- Fixed formInputClickSelector `button[type]` for IE7
|
126
|
+
- Copy target attribute to generated form for `a[data-method]` links
|
127
|
+
- Return true (abort ajax) for ctrl- and meta-clicks on remote links
|
128
|
+
- Use jQuery `.prop()` for disabling/enabling elements
|
129
|
+
|
130
|
+
## 1.0.14 (08 September 2011)
|
131
|
+
|
132
|
+
- Updated to latest jquery-ujs
|
133
|
+
- Added `disable-with` support for links
|
134
|
+
- minor bug fixes
|
135
|
+
- Added `data-remote` support for change events of all input types
|
136
|
+
- Added install generator for Rails 3.1 with instructional message
|
137
|
+
|
138
|
+
## 1.0.13 (11 August 2011)
|
139
|
+
|
140
|
+
- Updated to latest jquery-ujs with `novalidate` support
|
141
|
+
- No more support for jquery older than v1.6
|
142
|
+
|
143
|
+
## 1.0.12 (23 June 2011)
|
144
|
+
|
145
|
+
- Updated to latest jquery-ujs with 'blank form action' and
|
146
|
+
data-remote support for select elements
|
147
|
+
|
148
|
+
## 1.0.11 (15 June 2011)
|
149
|
+
|
150
|
+
- Updated to latest jqueyr-ujs with cross-domain support
|
151
|
+
|
152
|
+
[See jquery-ujs issue 167](https://github.com/rails/jquery-ujs/pull/167) for relevant discussion
|
153
|
+
|
154
|
+
## 1.0.10 (13 June 2011)
|
155
|
+
|
156
|
+
- Updated to latest jqueyr-ujs with bug fixes
|
157
|
+
|
158
|
+
## 1.0.9 (25 May 2011)
|
159
|
+
|
160
|
+
- Merged with new rails repo (3.1 fix)
|
161
|
+
|
162
|
+
## 1.0.8 (25 May 2011)
|
163
|
+
|
164
|
+
- Updated to latest jquery-ujs with `[disabled][required]` fix
|
165
|
+
|
166
|
+
## 1.0.7 (21 May 2011)
|
167
|
+
|
168
|
+
- Fix assert_select_jquery's bad call to unescape_rjs
|
169
|
+
|
170
|
+
## 1.0.6 (21 May 2011)
|
171
|
+
|
172
|
+
- Updated to latest jquery-ujs with `data-params` support
|
173
|
+
|
174
|
+
## 1.0.5 (17 May 2011)
|
175
|
+
|
176
|
+
- Updated to latest jquery-ujs
|
177
|
+
- Remove old rails.js in Rails 3.0 generator
|
178
|
+
|
179
|
+
## 1.0.4 (17 May 2011)
|
180
|
+
|
181
|
+
- Fix exception in Rails 3.0 generator
|
182
|
+
|
183
|
+
## 1.0.3 (17 May 2011)
|
184
|
+
|
185
|
+
- Update to jQuery 1.6.1
|
186
|
+
- Remove useless --version generator option
|
187
|
+
|
188
|
+
## 1.0.2 (12 May 2011)
|
189
|
+
|
190
|
+
- Fix Rails 3.0 now that rails.js is named jquery_ujs.js
|
191
|
+
|
192
|
+
## 1.0.1 (10 May 2011)
|
193
|
+
|
194
|
+
- Stop downloading rails.js from GitHub
|
195
|
+
- Vendor jQuery UI for those who want it
|
196
|
+
- Fix assert_select_jquery now that Rails 3.1 has no RJS at all
|
197
|
+
- Fix rails dependency to just be railties
|
198
|
+
|
199
|
+
## 1.0.rc (3 May 2011)
|
200
|
+
|
201
|
+
- Rails 3.1 asset pipeline edition
|
202
|
+
- Removes generators and railties
|
203
|
+
- Just provides jquery.js and jquery_ujs.js
|
204
|
+
- Still compatible with Rails 3.0 via the old generator code
|
205
|
+
|
206
|
+
## 0.2.7 (5 February 2011)
|
207
|
+
|
208
|
+
- Updated to use jQuery 1.5 by default
|
209
|
+
|
210
|
+
## 0.2.6 (1 December 2010)
|
211
|
+
|
212
|
+
Feature:
|
213
|
+
|
214
|
+
- Updated to use jQuery 1.4.4 by default
|
215
|
+
|
216
|
+
## 0.2.5 (4 November 2010)
|
217
|
+
|
218
|
+
Bugfix:
|
219
|
+
|
220
|
+
- Download JQuery Rails UJS via HTTPS since Github is now HTTPS only
|
221
|
+
|
222
|
+
## 0.2.4 (16 October 2010)
|
223
|
+
|
224
|
+
Features:
|
225
|
+
|
226
|
+
- Updated to use the new jQuery 1.4.3 by default, with the IE .live() bug fixed
|
227
|
+
- Always download the newest 1.x release of jQuery UI
|
228
|
+
- Try to install unknown versions of jQuery, with fallback to the default
|
229
|
+
- Print informative messages in the correct Generator style
|
230
|
+
|
231
|
+
## 0.2.3 (13 October 2010)
|
232
|
+
|
233
|
+
Features:
|
234
|
+
|
235
|
+
- Support Edge Rails 3.1 by depending on Rails ~>3.0
|
236
|
+
- Add Sam Ruby's assert_select_jquery test helper method
|
237
|
+
- Use jquery.min only in production (and not in the test env)
|
238
|
+
|
239
|
+
## 0.2.2 (8 October 2010)
|
240
|
+
|
241
|
+
Feature:
|
242
|
+
|
243
|
+
- Depend on Rails >=3.0 && <4.0 for edge Rails compatibility
|
244
|
+
|
245
|
+
## 0.2.1 (2 October 2010)
|
246
|
+
|
247
|
+
Bugfix:
|
248
|
+
|
249
|
+
- Default to jQuery 1.4.1 as recommended by jQuery-ujs
|
250
|
+
due to a bug in 1.4.2 (http://jsbin.com/uboxu3/7/)
|
251
|
+
|
252
|
+
## 0.2 (2 October 2010)
|
253
|
+
|
254
|
+
Features:
|
255
|
+
|
256
|
+
- Allow specifying which version of jQuery to install
|
257
|
+
- Add generator tests (thanks, Louis T.)
|
258
|
+
- Automatically use non-minified JS in development mode
|
259
|
+
|
260
|
+
## 0.1.3 (16 September 2010)
|
261
|
+
|
262
|
+
Bugfix:
|
263
|
+
|
264
|
+
- allow javascript :defaults tag to be overridden
|
265
|
+
|
266
|
+
## 0.1.2 (18 August 2010)
|
267
|
+
|
268
|
+
Bugfix:
|
269
|
+
|
270
|
+
- check for jQueryUI in the right place
|
271
|
+
|
272
|
+
## 0.1.1 (16 August 2010)
|
273
|
+
|
274
|
+
Bugfix:
|
275
|
+
|
276
|
+
- fix generator by resolving namespace conflict between Jquery::Rails and ::Rails
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
Thanks for taking the time to contribute to jquery-rails! Please
|
2
|
+
take a moment to read the following brief guidelines to help streamline
|
3
|
+
the merging process.
|
4
|
+
|
5
|
+
## Updating jQuery
|
6
|
+
|
7
|
+
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.
|
8
|
+
|
9
|
+
## Changes to jquery_ujs.js
|
10
|
+
|
11
|
+
**If it's an issue pertaining to the jquery-ujs javascript, please
|
12
|
+
report it to the [rails/jquery-ujs project](https://github.com/rails/jquery-ujs/issues).**
|
13
|
+
|
14
|
+
## Tests
|
15
|
+
|
16
|
+
This is a gem that simply includes jQuery and jQuery UJS into the Rails
|
17
|
+
asset pipeline. The asset pipeline functionality is well tested within the
|
18
|
+
Rails framework. And jQuery and jQuery UJS each have their own extensive
|
19
|
+
test suites. Thus, there's not a lot to actually test here.
|
20
|
+
|
21
|
+
That being said, we do have a few integration-level tests to make sure
|
22
|
+
everything is being included and basic UJS functionality works within a
|
23
|
+
sample Rails app.
|
24
|
+
|
25
|
+
If you're making changes to the actual gem, run the tests as follows:
|
26
|
+
|
27
|
+
1. Checkout the demo Rails app: `git clone git://github.com/JangoSteve/Rails-jQuery-Demo.git`
|
28
|
+
|
29
|
+
2. Install the gems: `bundle install`
|
30
|
+
|
31
|
+
3. Change the jquery-rails gem in the Gemfile to use your local
|
32
|
+
version of the gem with your updates: `gem 'rspec-rails', :path => '../path/to/jquery-rails'`
|
33
|
+
|
34
|
+
4. Update your bundled jquery-rails gem: `bundle update jquery-rails`
|
35
|
+
|
36
|
+
5. Run the tests: `bundle exec rspec spec/`
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
jquery-rails-rails4 (0.0.1)
|
5
|
+
railties (~> 4.0.0)
|
6
|
+
thor (>= 0.14, < 2.0)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
actionpack (4.0.0)
|
12
|
+
activesupport (= 4.0.0)
|
13
|
+
builder (~> 3.1.0)
|
14
|
+
erubis (~> 2.7.0)
|
15
|
+
rack (~> 1.5.2)
|
16
|
+
rack-test (~> 0.6.2)
|
17
|
+
activesupport (4.0.0)
|
18
|
+
i18n (~> 0.6, >= 0.6.4)
|
19
|
+
minitest (~> 4.2)
|
20
|
+
multi_json (~> 1.3)
|
21
|
+
thread_safe (~> 0.1)
|
22
|
+
tzinfo (~> 0.3.37)
|
23
|
+
atomic (1.1.10)
|
24
|
+
builder (3.1.4)
|
25
|
+
erubis (2.7.0)
|
26
|
+
i18n (0.6.4)
|
27
|
+
minitest (4.7.5)
|
28
|
+
multi_json (1.7.7)
|
29
|
+
rack (1.5.2)
|
30
|
+
rack-test (0.6.2)
|
31
|
+
rack (>= 1.0)
|
32
|
+
railties (4.0.0)
|
33
|
+
actionpack (= 4.0.0)
|
34
|
+
activesupport (= 4.0.0)
|
35
|
+
rake (>= 0.8.7)
|
36
|
+
thor (>= 0.18.1, < 2.0)
|
37
|
+
rake (10.1.0)
|
38
|
+
thor (0.18.1)
|
39
|
+
thread_safe (0.1.2)
|
40
|
+
atomic
|
41
|
+
tzinfo (0.3.37)
|
42
|
+
|
43
|
+
PLATFORMS
|
44
|
+
ruby
|
45
|
+
|
46
|
+
DEPENDENCIES
|
47
|
+
jquery-rails-rails4!
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2010 Andre Arko
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'bundler'
|
2
|
+
Bundler::GemHelper.install_tasks
|
3
|
+
|
4
|
+
# Check if versions are correct between VERSION constants and .js files
|
5
|
+
#
|
6
|
+
task :release => [:guard_version]
|
7
|
+
|
8
|
+
task :guard_version do
|
9
|
+
def check_version(file, pattern, constant)
|
10
|
+
body = File.read("app/assets/javascripts/#{file}")
|
11
|
+
match = body.match(pattern) or abort "Version check failed: no pattern matched in #{file}"
|
12
|
+
file_version = body.match(pattern)[1]
|
13
|
+
constant_version = Jquery::Rails4.const_get(constant)
|
14
|
+
|
15
|
+
unless constant_version == file_version
|
16
|
+
abort "Jquery::Rails4::#{constant} was #{constant_version} but it should be #{file_version}"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
check_version('jquery.js', /jQuery JavaScript Library v([\S]+)/, 'JQUERY_VERSION')
|
21
|
+
end
|
22
|
+
|
23
|
+
task :update_jquery do
|
24
|
+
puts "Downloading jquery.js"
|
25
|
+
puts `curl -o app/assets/javascripts/jquery.js http://code.jquery.com/jquery.js`
|
26
|
+
puts "Downloading jquery.min.js"
|
27
|
+
puts `curl -o app/assets/javascripts/jquery.min.js http://code.jquery.com/jquery.min.js`
|
28
|
+
puts "Downloading jquery.min.map"
|
29
|
+
puts `curl -o app/assets/javascripts/jquery.min.map http://code.jquery.com/jquery.min.map`
|
30
|
+
|
31
|
+
puts "Updating version.rb"
|
32
|
+
version = false
|
33
|
+
File.foreach('app/assets/javascripts/jquery.js') do |line|
|
34
|
+
version = line.match(/jQuery JavaScript Library v([\S]+)/)
|
35
|
+
version = version && version[1]
|
36
|
+
break if version
|
37
|
+
end
|
38
|
+
|
39
|
+
version_path = 'lib/jquery/rails/version.rb'
|
40
|
+
lines = IO.readlines(version_path).map do |line|
|
41
|
+
line.gsub(/JQUERY_VERSION = "([\d\.]+)"/, "JQUERY_VERSION = \"#{version}\"")
|
42
|
+
end
|
43
|
+
File.open(version_path, 'w') do |file|
|
44
|
+
file.puts lines
|
45
|
+
end
|
46
|
+
|
47
|
+
puts "\e[32mDone!\e[0m"
|
48
|
+
end
|