Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for Rails 3/Rails 3.1 apps. #157

Merged
merged 1 commit into from Sep 1, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
## 4.0.0

- Minimum dependency set to Rails 4.2

## 3.1.1 (23 June 2014)

- Updated to jQuery 1.11.1
Expand Down
45 changes: 5 additions & 40 deletions README.md
Expand Up @@ -11,37 +11,19 @@ This gem provides:
## 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:
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
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.

```ruby
gem "jquery-rails"
```

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*)

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:

```js
Expand All @@ -54,30 +36,13 @@ For jQuery UI, we recommend the [jquery-ui-rails](https://github.com/joliss/jque
*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.
* 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

Expand Down
4 changes: 2 additions & 2 deletions jquery-rails.gemspec
Expand Up @@ -8,8 +8,8 @@ Gem::Specification.new do |s|
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.summary = "Use jQuery with Rails 4+"
s.description = "This gem provides jQuery and the jQuery-ujs driver for your Rails 4+ application."
s.license = "MIT"

s.required_rubygems_version = ">= 1.3.6"
Expand Down
50 changes: 0 additions & 50 deletions lib/generators/jquery/install/install_generator.rb

This file was deleted.

4 changes: 1 addition & 3 deletions lib/jquery/rails.rb
@@ -1,10 +1,8 @@
require 'jquery/assert_select' if ::Rails.env.test?
require 'jquery/rails/engine' if ::Rails.version >= '3.1'
require 'jquery/rails/railtie'
require 'jquery/rails/engine'
require 'jquery/rails/version'

module Jquery
module Rails
PROTOTYPE_JS = %w{prototype effects dragdrop controls}
end
end
18 changes: 0 additions & 18 deletions lib/jquery/rails/railtie.rb

This file was deleted.