Skip to content

Commit d50d012

Browse files
committed
dropped support for Rails 3.1 in Gemfile and gemspec
edited README accordingly put some UPGRADE instructions
1 parent b55484b commit d50d012

6 files changed

+36
-13
lines changed

.travis.yml

+6
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,9 @@ env:
1515
services: mongodb
1616

1717
before_script: rails --version
18+
19+
matrix:
20+
allow_failures:
21+
- rvm: rbx-19mode
22+
- rvm: jruby-19mode
23+
- gemfile: gemfiles/Gemfile.rails-4.0

CHANGELOG.rdoc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= 3.3 (not released yet)
2+
* <b>DEPRECATION NOTICE:</b>Rails 3.1 support dropped: if you use Rails 3.1, please stick to rolify 3.2
23
* code cleanup in finders methods
34
* generators rewritten entirely. now using ActiveRecord/Mongoid model generator to create Role model
45
* added rspec matchers for detailed spec error messages (thanks to @delwyn)
@@ -12,7 +13,7 @@
1213
* now raises a warning in the initializer if migration has not been run
1314
* add support for primary key different than 'id' for resource Model (thanks to @rafaeldl)
1415
* Rails 4 (thanks to @adammathys) and ruby 2.0 compliant
15-
* configured travis-ci to run the specs on Rails 3.1/3.2/4.0 and Rubies 1.9.3/2.0/rbx/jruby
16+
* configured travis-ci to run the specs on Rails 3.2/4.0 and Rubies 1.9.3/2.0/rbx/jruby
1617
* added code climate to check for code smell
1718

1819
= 3.2 (Aug 7, 2012)

Gemfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
source "http://rubygems.org"
1+
source "https://rubygems.org"
22

33
case ENV["ADAPTER"]
44
when nil, "active_record"
55
group :test do
66
gem "activerecord-jdbcsqlite3-adapter", :platform => "jruby"
77
gem "sqlite3", :platform => "ruby"
88
end
9-
gem "activerecord", ">= 3.1.0", :require => "active_record"
9+
gem "activerecord", ">= 3.2.0", :require => "active_record"
1010
when "mongoid"
1111
gem "mongoid", ">= 3.1"
1212
gem "bson_ext", :platform => "ruby"

README.md

+3-9
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ This library can be easily integrated with any authentication gem ([devise](http
1515

1616
## Requirements
1717

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

2323
## Installation
2424

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

31-
Alternatively, you can install it as a plugin.
32-
33-
```
34-
rails plugin install git://github.com/EppO/rolify.git
35-
```
36-
3731
## Getting Started
3832

3933
### 1. Generate Role Model

UPGRADE.rdoc

+22
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,25 @@ If you use <i>dynamic methods</i> (<tt>user.is_admin?</tt> like methods), you sh
2020
c.use_dynamic_shortcuts
2121
end
2222
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 :-)
23+
24+
== From a rolify installation 3.x
25+
26+
=== Dependencies:
27+
28+
Starting from 3.3 release, rolify supports Rails 3.2 and newer.
29+
30+
Mongoid callbacks are supported if Mongoid 3.1 and newer is installed.
31+
32+
=== Rails Generators
33+
34+
Role model template when using Mongoid has been changed, you should re-run the generator.
35+
36+
Rails generator has been renamed to: <tt>rails g rolify</tt> and arguments have been changed:
37+
* Role class name is now mandatory, User class name remains optional and its default is still <tt>User</tt>
38+
* ORM optional argument is now <tt>-o</tt> or <tt>--orm=</tt>
39+
For instance, here is a new rolify generator command example: <tt>rails g rolify Role</tt>
40+
You can use <tt>rails g rolify --help</tt> to see all available options.
41+
42+
=== Testing
43+
44+
Starting from rolify 3.3, to run the specs you should run: <tt>rake spec</tt> or simply <tt>rake</tt>.

rolify.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ Gem::Specification.new do |s|
2525
s.add_development_dependency "rspec-rails", ">= 2.0"
2626
s.add_development_dependency "bundler"
2727
s.add_development_dependency "fuubar"
28-
s.add_development_dependency "activerecord", ">= 3.1.0"
28+
s.add_development_dependency "activerecord", ">= 3.2.0"
2929
s.add_development_dependency "mongoid", ">= 3.1"
3030
end

0 commit comments

Comments
 (0)