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
metadata
CHANGED
@@ -1,108 +1,125 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jquery-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
5
|
-
prerelease:
|
4
|
+
version: 4.6.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- André Arko
|
9
|
-
autorequire:
|
8
|
+
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2023-06-26 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: railties
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
22
|
-
- - <
|
23
|
-
- !ruby/object:Gem::Version
|
24
|
-
version: '5.0'
|
19
|
+
version: 4.2.0
|
25
20
|
type: :runtime
|
26
21
|
prerelease: false
|
27
22
|
version_requirements: !ruby/object:Gem::Requirement
|
28
|
-
none: false
|
29
23
|
requirements:
|
30
|
-
- -
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '3.0'
|
33
|
-
- - <
|
24
|
+
- - ">="
|
34
25
|
- !ruby/object:Gem::Version
|
35
|
-
version:
|
26
|
+
version: 4.2.0
|
36
27
|
- !ruby/object:Gem::Dependency
|
37
28
|
name: thor
|
38
29
|
requirement: !ruby/object:Gem::Requirement
|
39
|
-
none: false
|
40
30
|
requirements:
|
41
|
-
- -
|
31
|
+
- - ">="
|
42
32
|
- !ruby/object:Gem::Version
|
43
33
|
version: '0.14'
|
44
|
-
- - <
|
34
|
+
- - "<"
|
45
35
|
- !ruby/object:Gem::Version
|
46
36
|
version: '2.0'
|
47
37
|
type: :runtime
|
48
38
|
prerelease: false
|
49
39
|
version_requirements: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
40
|
requirements:
|
52
|
-
- -
|
41
|
+
- - ">="
|
53
42
|
- !ruby/object:Gem::Version
|
54
43
|
version: '0.14'
|
55
|
-
- - <
|
44
|
+
- - "<"
|
56
45
|
- !ruby/object:Gem::Version
|
57
46
|
version: '2.0'
|
58
|
-
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rails-dom-testing
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '1'
|
54
|
+
- - "<"
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '3'
|
57
|
+
type: :runtime
|
58
|
+
prerelease: false
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '1'
|
64
|
+
- - "<"
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '3'
|
67
|
+
description: This gem provides jQuery and the jQuery-ujs driver for your Rails 4+
|
68
|
+
application.
|
59
69
|
email:
|
60
70
|
- andre@arko.net
|
61
71
|
executables: []
|
62
72
|
extensions: []
|
63
73
|
extra_rdoc_files: []
|
64
74
|
files:
|
65
|
-
- .gitignore
|
75
|
+
- ".gitignore"
|
76
|
+
- ".travis.yml"
|
66
77
|
- CHANGELOG.md
|
78
|
+
- CONTRIBUTING.md
|
67
79
|
- Gemfile
|
68
|
-
- LICENSE
|
80
|
+
- MIT-LICENSE
|
69
81
|
- README.md
|
70
82
|
- Rakefile
|
83
|
+
- VERSIONS.md
|
71
84
|
- jquery-rails.gemspec
|
72
|
-
- lib/generators/jquery/install/install_generator.rb
|
73
85
|
- lib/jquery-rails.rb
|
74
86
|
- lib/jquery/assert_select.rb
|
75
87
|
- lib/jquery/rails.rb
|
76
88
|
- lib/jquery/rails/engine.rb
|
77
|
-
- lib/jquery/rails/railtie.rb
|
78
89
|
- lib/jquery/rails/version.rb
|
79
|
-
-
|
80
|
-
-
|
90
|
+
- test/assert_select_jquery_test.rb
|
91
|
+
- test/test_helper.rb
|
81
92
|
- vendor/assets/javascripts/jquery.js
|
82
93
|
- vendor/assets/javascripts/jquery.min.js
|
94
|
+
- vendor/assets/javascripts/jquery.min.map
|
95
|
+
- vendor/assets/javascripts/jquery2.js
|
96
|
+
- vendor/assets/javascripts/jquery2.min.js
|
97
|
+
- vendor/assets/javascripts/jquery2.min.map
|
98
|
+
- vendor/assets/javascripts/jquery3.js
|
99
|
+
- vendor/assets/javascripts/jquery3.min.js
|
100
|
+
- vendor/assets/javascripts/jquery3.min.map
|
83
101
|
- vendor/assets/javascripts/jquery_ujs.js
|
84
|
-
homepage:
|
85
|
-
licenses:
|
86
|
-
|
102
|
+
homepage: https://github.com/rails/jquery-rails
|
103
|
+
licenses:
|
104
|
+
- MIT
|
105
|
+
metadata: {}
|
106
|
+
post_install_message:
|
87
107
|
rdoc_options: []
|
88
108
|
require_paths:
|
89
109
|
- lib
|
90
110
|
required_ruby_version: !ruby/object:Gem::Requirement
|
91
|
-
none: false
|
92
111
|
requirements:
|
93
|
-
- -
|
112
|
+
- - ">="
|
94
113
|
- !ruby/object:Gem::Version
|
95
|
-
version:
|
114
|
+
version: 1.9.3
|
96
115
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
116
|
requirements:
|
99
|
-
- -
|
117
|
+
- - ">="
|
100
118
|
- !ruby/object:Gem::Version
|
101
119
|
version: 1.3.6
|
102
120
|
requirements: []
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
summary: Use jQuery with Rails 3
|
121
|
+
rubygems_version: 3.4.6
|
122
|
+
signing_key:
|
123
|
+
specification_version: 4
|
124
|
+
summary: Use jQuery with Rails 4+
|
108
125
|
test_files: []
|
@@ -1,59 +0,0 @@
|
|
1
|
-
require 'rails'
|
2
|
-
|
3
|
-
# Supply generator for Rails 3.0.x or if asset pipeline is not enabled
|
4
|
-
if ::Rails.version < "3.1" || !::Rails.application.config.assets.enabled
|
5
|
-
module Jquery
|
6
|
-
module Generators
|
7
|
-
class InstallGenerator < ::Rails::Generators::Base
|
8
|
-
|
9
|
-
desc "This generator installs jQuery #{Jquery::Rails::JQUERY_VERSION}, jQuery-ujs, and (optionally) jQuery UI #{Jquery::Rails::JQUERY_UI_VERSION}"
|
10
|
-
class_option :ui, :type => :boolean, :default => false, :desc => "Include jQueryUI"
|
11
|
-
source_root File.expand_path('../../../../../vendor/assets/javascripts', __FILE__)
|
12
|
-
|
13
|
-
def remove_prototype
|
14
|
-
Rails::PROTOTYPE_JS.each do |name|
|
15
|
-
remove_file "public/javascripts/#{name}.js"
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
def copy_jquery
|
20
|
-
say_status("copying", "jQuery (#{Jquery::Rails::JQUERY_VERSION})", :green)
|
21
|
-
copy_file "jquery.js", "public/javascripts/jquery.js"
|
22
|
-
copy_file "jquery.min.js", "public/javascripts/jquery.min.js"
|
23
|
-
end
|
24
|
-
|
25
|
-
def copy_jquery_ui
|
26
|
-
if options.ui?
|
27
|
-
say_status("copying", "jQuery UI (#{Jquery::Rails::JQUERY_UI_VERSION})", :green)
|
28
|
-
copy_file "jquery-ui.js", "public/javascripts/jquery-ui.js"
|
29
|
-
copy_file "jquery-ui.min.js", "public/javascripts/jquery-ui.min.js"
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
def copy_ujs_driver
|
34
|
-
say_status("copying", "jQuery UJS adapter (#{Jquery::Rails::JQUERY_UJS_VERSION[0..5]})", :green)
|
35
|
-
remove_file "public/javascripts/rails.js"
|
36
|
-
copy_file "jquery_ujs.js", "public/javascripts/jquery_ujs.js"
|
37
|
-
end
|
38
|
-
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
else
|
43
|
-
module Jquery
|
44
|
-
module Generators
|
45
|
-
class InstallGenerator < ::Rails::Generators::Base
|
46
|
-
desc "Just show instructions so people will know what to do when mistakenly using generator for Rails 3.1 apps"
|
47
|
-
|
48
|
-
def do_nothing
|
49
|
-
say_status("deprecated", "You are using Rails 3.1 with the asset pipeline enabled, so this generator is not needed.")
|
50
|
-
say_status("", "The necessary files are already in your asset pipeline.")
|
51
|
-
say_status("", "Just add `//= require jquery` and `//= require jquery_ujs` to your app/assets/javascripts/application.js")
|
52
|
-
say_status("", "If you upgraded your app from Rails 3.0 and still have jquery.js, rails.js, or jquery_ujs.js in your javascripts, be sure to remove them.")
|
53
|
-
say_status("", "If you do not want the asset pipeline enabled, you may turn it off in application.rb and re-run this generator.")
|
54
|
-
# ok, nothing
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
data/lib/jquery/rails/railtie.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
# Used to ensure that Rails 3.0.x, as well as Rails >= 3.1 with asset pipeline disabled
|
2
|
-
# get the minified version of the scripts included into the layout in production.
|
3
|
-
module Jquery
|
4
|
-
module Rails
|
5
|
-
|
6
|
-
class Railtie < ::Rails::Railtie
|
7
|
-
config.before_configuration do
|
8
|
-
|
9
|
-
if ::Rails.root.join("public/javascripts/jquery-ui.min.js").exist?
|
10
|
-
jq_defaults = %w(jquery jquery-ui)
|
11
|
-
jq_defaults.map!{|a| a + ".min" } if ::Rails.env.production? || ::Rails.env.test?
|
12
|
-
else
|
13
|
-
jq_defaults = ::Rails.env.production? || ::Rails.env.test? ? %w(jquery.min) : %w(jquery)
|
14
|
-
end
|
15
|
-
|
16
|
-
# Merge the jQuery scripts, remove the Prototype defaults and finally add 'jquery_ujs'
|
17
|
-
# at the end, because load order is important
|
18
|
-
if config.action_view.javascript_expansions
|
19
|
-
config.action_view.javascript_expansions[:defaults] -= PROTOTYPE_JS + ['rails']
|
20
|
-
config.action_view.javascript_expansions[:defaults] |= jq_defaults
|
21
|
-
config.action_view.javascript_expansions[:defaults] << 'jquery_ujs'
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|
27
|
-
end
|