Skip to content

Commit

Permalink
dropped support for Rails 3.1 in Gemfile and gemspec
Browse files Browse the repository at this point in the history
edited README accordingly
put some UPGRADE instructions
  • Loading branch information
EppO committed Mar 11, 2013
1 parent b55484b commit d50d012
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 13 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ env:
services: mongodb

before_script: rails --version

matrix:
allow_failures:
- rvm: rbx-19mode
- rvm: jruby-19mode
- gemfile: gemfiles/Gemfile.rails-4.0
3 changes: 2 additions & 1 deletion CHANGELOG.rdoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= 3.3 (not released yet)
* <b>DEPRECATION NOTICE:</b>Rails 3.1 support dropped: if you use Rails 3.1, please stick to rolify 3.2
* code cleanup in finders methods
* generators rewritten entirely. now using ActiveRecord/Mongoid model generator to create Role model
* added rspec matchers for detailed spec error messages (thanks to @delwyn)
Expand All @@ -12,7 +13,7 @@
* now raises a warning in the initializer if migration has not been run
* add support for primary key different than 'id' for resource Model (thanks to @rafaeldl)
* Rails 4 (thanks to @adammathys) and ruby 2.0 compliant
* configured travis-ci to run the specs on Rails 3.1/3.2/4.0 and Rubies 1.9.3/2.0/rbx/jruby
* configured travis-ci to run the specs on Rails 3.2/4.0 and Rubies 1.9.3/2.0/rbx/jruby
* added code climate to check for code smell

= 3.2 (Aug 7, 2012)
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
source "http://rubygems.org"
source "https://rubygems.org"

case ENV["ADAPTER"]
when nil, "active_record"
group :test do
gem "activerecord-jdbcsqlite3-adapter", :platform => "jruby"
gem "sqlite3", :platform => "ruby"
end
gem "activerecord", ">= 3.1.0", :require => "active_record"
gem "activerecord", ">= 3.2.0", :require => "active_record"
when "mongoid"
gem "mongoid", ">= 3.1"
gem "bson_ext", :platform => "ruby"
Expand Down
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ This library can be easily integrated with any authentication gem ([devise](http

## Requirements

* Rails >= 3.1
* ActiveRecord >= 3.1 <b>or</b> Mongoid >= 3.1
* Rails >= 3.2
* ActiveRecord >= 3.2 <b>or</b> Mongoid >= 3.1
* supports ruby 2.0/1.9.3, JRuby 1.6.0+ (in 1.9 mode) and Rubinius 2.0.0dev (in 1.9 mode)
* support of ruby 1.8 has been dropped due to Mongoid 3.0 that only supports 1.9 new hash syntax
* support of ruby 1.8 has been dropped due to Mongoid >=3.0 that only supports 1.9 new hash syntax

## Installation

Expand All @@ -28,12 +28,6 @@ In <b>Rails 3</b>, add this to your Gemfile and run the +bundle+ command.
gem "rolify"
```

Alternatively, you can install it as a plugin.

```
rails plugin install git://github.com/EppO/rolify.git
```

## Getting Started

### 1. Generate Role Model
Expand Down
22 changes: 22 additions & 0 deletions UPGRADE.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,25 @@ If you use <i>dynamic methods</i> (<tt>user.is_admin?</tt> like methods), you sh
c.use_dynamic_shortcuts
end
The old fashion way still works though, but won't work anymore if the setter method name is changed in a possible future. You've been warned :-)

== From a rolify installation 3.x

=== Dependencies:

Starting from 3.3 release, rolify supports Rails 3.2 and newer.

Mongoid callbacks are supported if Mongoid 3.1 and newer is installed.

=== Rails Generators

Role model template when using Mongoid has been changed, you should re-run the generator.

Rails generator has been renamed to: <tt>rails g rolify</tt> and arguments have been changed:
* Role class name is now mandatory, User class name remains optional and its default is still <tt>User</tt>
* ORM optional argument is now <tt>-o</tt> or <tt>--orm=</tt>
For instance, here is a new rolify generator command example: <tt>rails g rolify Role</tt>
You can use <tt>rails g rolify --help</tt> to see all available options.

=== Testing

Starting from rolify 3.3, to run the specs you should run: <tt>rake spec</tt> or simply <tt>rake</tt>.
2 changes: 1 addition & 1 deletion rolify.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ Gem::Specification.new do |s|
s.add_development_dependency "rspec-rails", ">= 2.0"
s.add_development_dependency "bundler"
s.add_development_dependency "fuubar"
s.add_development_dependency "activerecord", ">= 3.1.0"
s.add_development_dependency "activerecord", ">= 3.2.0"
s.add_development_dependency "mongoid", ">= 3.1"
end

0 comments on commit d50d012

Please sign in to comment.