From d50d012b305872b2c94a5f82985a3d55d637bc4a Mon Sep 17 00:00:00 2001 From: Florent Monbillard Date: Mon, 11 Mar 2013 15:45:45 -0400 Subject: [PATCH] dropped support for Rails 3.1 in Gemfile and gemspec edited README accordingly put some UPGRADE instructions --- .travis.yml | 6 ++++++ CHANGELOG.rdoc | 3 ++- Gemfile | 4 ++-- README.md | 12 +++--------- UPGRADE.rdoc | 22 ++++++++++++++++++++++ rolify.gemspec | 2 +- 6 files changed, 36 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 26a73b4b..22f4f56b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/CHANGELOG.rdoc b/CHANGELOG.rdoc index 6d347b12..137c076b 100644 --- a/CHANGELOG.rdoc +++ b/CHANGELOG.rdoc @@ -1,4 +1,5 @@ = 3.3 (not released yet) +* DEPRECATION NOTICE: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) @@ -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) diff --git a/Gemfile b/Gemfile index 950f0ec5..4edbdebc 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -source "http://rubygems.org" +source "https://rubygems.org" case ENV["ADAPTER"] when nil, "active_record" @@ -6,7 +6,7 @@ when nil, "active_record" 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" diff --git a/README.md b/README.md index e5c4b08f..2c3f3233 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,10 @@ This library can be easily integrated with any authentication gem ([devise](http ## Requirements -* Rails >= 3.1 -* ActiveRecord >= 3.1 or Mongoid >= 3.1 +* Rails >= 3.2 +* ActiveRecord >= 3.2 or 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 @@ -28,12 +28,6 @@ In Rails 3, 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 diff --git a/UPGRADE.rdoc b/UPGRADE.rdoc index 2f7e08c7..3da63225 100644 --- a/UPGRADE.rdoc +++ b/UPGRADE.rdoc @@ -20,3 +20,25 @@ If you use dynamic methods (user.is_admin? 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: rails g rolify and arguments have been changed: +* Role class name is now mandatory, User class name remains optional and its default is still User +* ORM optional argument is now -o or --orm= +For instance, here is a new rolify generator command example: rails g rolify Role +You can use rails g rolify --help to see all available options. + +=== Testing + +Starting from rolify 3.3, to run the specs you should run: rake spec or simply rake. diff --git a/rolify.gemspec b/rolify.gemspec index bb0aba59..4b80d175 100644 --- a/rolify.gemspec +++ b/rolify.gemspec @@ -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