jquery-rails 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

data/CHANGELOG.md CHANGED
@@ -1,3 +1,26 @@
1
+ ## 3.1.0 (29 January 2014)
2
+
3
+ - Updated to jQuery 1.11.0
4
+ - Updated to latest jquery-ujs
5
+ - Added development rake task for updating jQuery
6
+
7
+ ## 3.0.4 (10 July 2013)
8
+
9
+ - Fixed jQuery source map
10
+
11
+ ## 3.0.3 (10 July 2013)
12
+
13
+ - Updated to jQuery 1.10.2
14
+
15
+ ## 3.0.2 (04 July 2013)
16
+
17
+ - Updated to latest jquery-ujs
18
+
19
+ ## 3.0.1 (07 June 2013)
20
+
21
+ - Updated to jQuery 1.10.1
22
+ - Removed jQuery UI from generator
23
+
1
24
  ## 3.0.0 (29 May 2013)
2
25
 
3
26
  - Removed jQuery UI
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source :gemcutter
1
+ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in jquery-rails.gemspec
4
4
  gemspec
data/README.md CHANGED
@@ -4,8 +4,7 @@ jQuery! For Rails! So great.
4
4
 
5
5
  This gem provides:
6
6
 
7
- * jQuery 1.10.0
8
- * jQuery UI 1.10.3 (javascript only)
7
+ * jQuery 1.10.2
9
8
  * the jQuery UJS adapter
10
9
  * assert_select_jquery to test jQuery responses in Ruby tests
11
10
 
@@ -20,7 +19,7 @@ minor version bump = minor-level updates to jquery
20
19
  major version bump = major-level updates to jquery and updates to rails which may be backwards-incompatible
21
20
  ```
22
21
 
23
- See CHANGELOG.md to see which versions of jquery-rails bundle which
22
+ See [VERSIONS.md](VERSIONS.md) to see which versions of jquery-rails bundle which
24
23
  versions of jQuery.
25
24
 
26
25
  ## Installation
@@ -57,25 +56,28 @@ jquery-ui-rails gem above.*
57
56
 
58
57
  ### Rails 3.0 (or greater with asset pipeline *disabled*)
59
58
 
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.
59
+ 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.
61
60
 
62
- 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 and jQuery UI, 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).
61
+ 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).
63
62
 
64
63
  To invoke the generator, run:
65
64
 
66
65
  ```sh
67
- rails generate jquery:install #--ui to enable jQuery UI
66
+ rails generate jquery:install
68
67
  ```
69
68
 
70
69
  You're done!
71
70
 
71
+ *As of v3.0, jquery-rails no longer includes jQuery UI, you will need to
72
+ install it by yourself as needed.*
73
+
72
74
  ## Contributing
73
75
 
74
76
  Feel free to open an issue ticket if you find something that could be improved. A couple notes:
75
77
 
76
78
  * 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
79
 
78
- * 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.
80
+ * 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
81
 
80
82
  ## Acknowledgements
81
83
 
data/Rakefile CHANGED
@@ -19,3 +19,30 @@ task :guard_version do
19
19
 
20
20
  check_version('jquery.js', /jQuery JavaScript Library v([\S]+)/, 'JQUERY_VERSION')
21
21
  end
22
+
23
+ task :update_jquery do
24
+ puts "Downloading jquery.js"
25
+ puts `curl -o vendor/assets/javascripts/jquery.js http://code.jquery.com/jquery.js`
26
+ puts "Downloading jquery.min.js"
27
+ puts `curl -o vendor/assets/javascripts/jquery.min.js http://code.jquery.com/jquery.min.js`
28
+ puts "Downloading jquery.min.map"
29
+ puts `curl -o vendor/assets/javascripts/jquery.min.map http://code.jquery.com/jquery.min.map`
30
+
31
+ puts "Updating version.rb"
32
+ version = false
33
+ File.foreach('vendor/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
data/VERSIONS.md ADDED
@@ -0,0 +1,43 @@
1
+ # Bundled Versions
2
+
3
+ | Gem | jQuery | jQuery UI |
4
+ |--------|--------|-----------|
5
+ | 3.0.5 | 1.11.0 | - |
6
+ | 3.0.4 | ↾ | - |
7
+ | 3.0.3 | 1.10.2 | - |
8
+ | 3.0.2 | ↾ | - |
9
+ | 3.0.1 | 1.10.1 | - |
10
+ | 3.0.0 | ↾ | - |
11
+ | 2.3.0 | 1.10.0 | 1.10.3 |
12
+ | 2.2.2 | ↾ | ↾ |
13
+ | 2.2.1 | 1.9.1 | ↾ |
14
+ | 2.2.0 | 1.9.0 | ↾ |
15
+ | 2.1.4 | 1.8.3 | 1.9.2 |
16
+ | 2.1.3 | 1.8.2 | ↾ |
17
+ | 2.1.2 | 1.8.1 | ↾ |
18
+ | 2.1.1 | ↾ | ↾ |
19
+ | 2.1.0 | 1.8.0 | 1.8.23 |
20
+ | 2.0.3 | ↾ | ↾ |
21
+ | 2.0.2 | 1.7.2 | 1.8.18 |
22
+ | 2.0.1 | ↾ | ↾ |
23
+ | 2.0.0 | ↾ | ↾ |
24
+ | 1.0.19 | 1.7.1 | ↾ |
25
+ | 1.0.18 | ↾ | ↾ |
26
+ | 1.0.17 | 1.7.0 | ↾ |
27
+ | 1.0.16 | 1.6.4 | 1.8.16 |
28
+ | 1.0.15 | ↾ | ↾ |
29
+ | 1.0.14 | ↾ | ↾ |
30
+ | 1.0.13 | 1.6.2 | 1.8.14 |
31
+ | 1.0.12 | ↾ | ↾ |
32
+ | 1.0.11 | ↾ | ↾ |
33
+ | 1.0.10 | ↾ | ↾ |
34
+ | 1.0.9 | ↾ | ↾ |
35
+ | 1.0.8 | ↾ | ↾ |
36
+ | 1.0.7 | ↾ | ↾ |
37
+ | 1.0.6 | ↾ | ↾ |
38
+ | 1.0.5 | ↾ | ↾ |
39
+ | 1.0.4 | ↾ | ↾ |
40
+ | 1.0.3 | 1.6.1 | ↾ |
41
+ | 1.0.2 | ↾ | ↾ |
42
+ | 1.0.1 | ↾ | 1.8.12 |
43
+ | 1.0.0 | 1.6.0 | - |
@@ -6,8 +6,7 @@ if ::Rails.version < "3.1" || !::Rails.application.config.assets.enabled
6
6
  module Generators
7
7
  class InstallGenerator < ::Rails::Generators::Base
8
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"
9
+ desc "This generator installs jQuery #{Jquery::Rails::JQUERY_VERSION} and jQuery-ujs"
11
10
  source_root File.expand_path('../../../../../vendor/assets/javascripts', __FILE__)
12
11
 
13
12
  def remove_prototype
@@ -22,14 +21,6 @@ if ::Rails.version < "3.1" || !::Rails.application.config.assets.enabled
22
21
  copy_file "jquery.min.js", "public/javascripts/jquery.min.js"
23
22
  end
24
23
 
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
24
  def copy_ujs_driver
34
25
  say_status("copying", "jQuery UJS adapter (#{Jquery::Rails::JQUERY_UJS_VERSION[0..5]})", :green)
35
26
  remove_file "public/javascripts/rails.js"
@@ -5,12 +5,7 @@ module Jquery
5
5
  class Railtie < ::Rails::Railtie
6
6
  config.before_configuration do
7
7
  if config.action_view.javascript_expansions
8
- if ::Rails.root.join("public/javascripts/jquery-ui.min.js").exist?
9
- jq_defaults = %w(jquery jquery-ui)
10
- jq_defaults.map!{|a| a + ".min" } if ::Rails.env.production? || ::Rails.env.test?
11
- else
12
- jq_defaults = ::Rails.env.production? || ::Rails.env.test? ? %w(jquery.min) : %w(jquery)
13
- end
8
+ jq_defaults = ::Rails.env.production? || ::Rails.env.test? ? %w(jquery.min) : %w(jquery)
14
9
 
15
10
  # Merge the jQuery scripts, remove the Prototype defaults and finally add 'jquery_ujs'
16
11
  # at the end, because load order is important
@@ -1,7 +1,7 @@
1
1
  module Jquery
2
2
  module Rails
3
- VERSION = "3.0.0"
4
- JQUERY_VERSION = "1.10.0"
5
- JQUERY_UJS_VERSION = "87587d476054e9869865f53c1b78cb8164619a05"
3
+ VERSION = "3.1.0"
4
+ JQUERY_VERSION = "1.11.0"
5
+ JQUERY_UJS_VERSION = "f160fa2f4615f93e1a0d75e49de59d19c18c8728"
6
6
  end
7
7
  end