All Versions
33
Latest Version
Avg Release Cycle
150 days
Latest Release
728 days ago
Changelog History
Page 3
Changelog History
Page 3
-
v2.1 Changes
November 30, 2011- added syntactic sugar: grant and revoke are aliases for has_role and has_no_role
- ๐ check if RUBY_ENGINE is defined in the gemspec to be able to use jdbc with JRuby for SQLite
-
v2.0 Changes
November 10, 2011- improved performance of has_all_roles? method using one single DB query instead of doing one DB lookup per argument
- significant speed-up when requesting with many arguments
- database choice can mitigate the results
- clean up the initializer code
- using a DSL to configure the library
- setting defaults for User and Role classes
- dynamic shortcuts feature is now disabled by default. To turn it on:
- set it to true in the initializer file
- uncomment the extend Rolify::Dynamic line in the User class
- detecting if it's loaded by Rails::Server or Rails::Console
- ๐ now also running on Rubinius, JRuby, REE and Ruby 1.8. all specs pass successfully, yeah !
- improved performance of has_all_roles? method using one single DB query instead of doing one DB lookup per argument
-
v1.2 Changes
November 04, 2011- ๐ fixed a strange bug, probably rails related (thanks to @scottkf)
- when using rails in development mode, the config.cache_classes = false makes the role class to be loaded at every call and can lead to a AssociationTypeMismatch
- use of role_ids array instead of the roles association
- ๐ now running on JRuby (specs are still failing for JRuby though)
- ๐ fixed a strange bug, probably rails related (thanks to @scottkf)
-
v1.1 Changes
October 14, 2011- โ added a spec to test the rails generator using ammeter gem
- ๐ Gemfile cleanup, moved all dependencies in gemspec instead
- ๐ edited the dependency to Rails 3.1 and newer, now that Rails 3.1 has been released
- ๐ new role scoping capabilities
- instance level : user.has_role "moderator", Forum.first (already supported in previous release). user has the moderator role only on that Forum in particular
- class level : user.has_role "moderator", Forum. User has the moderator role on all instances of Forum
- global level : user.has_role "moderator" (already supported in previous release). User has the moderator role globally (e.q. on all resources)
- ๐ new scoped query capabilities
- user.has_role? "moderator", Forum.first (already supported in previous release). asks if the user has the moderator role on Forum.first instance
- user.has_role? "moderator", Forum. asks if the user has the moderator role on all Forum instances
- user.has_role? "moderator" (already supported in previous release). asks if the user has the global moderator role
- user.has_role? "moderator", :any. asks if the user has at least one moderator role no matter the scope is (instance, class or global).
-
v1.0 Changes
August 25, 2011- โ added a new parameter to disable dynamic shortcut methods due to potential incompatibility with other gems using method_missing with the same pattern
- add Rolify.dynamic_shortcuts = false in the initializer file or
- use the generator command with a third parameter:
- rails g rolify:role Role User false
- โ removed the railtie as it created more problems than it solved
- ๐จ code refactoring to do some speed improvements and code clean up
- โ added a lot of specs to improve tests coverage
- wrote a tutorial showing how to use rolify with CanCan and Devise
- ๐ rolify is now on travis-ci to monitor build status
- โ added a new parameter to disable dynamic shortcut methods due to potential incompatibility with other gems using method_missing with the same pattern
-
v0.7 Changes
June 20, 2011- โ added a method_missing to catch newly created role outside the current ruby process (i.e. dynamic shortcut methods are not defined within this process)
- dynamic shortcut is created on the fly in the method_missing to avoid extra method_missing for the same dynamic shortcut
- check if the role actually exists in the database before defining the new method
- first call is slower due to method_missing but next calls are fast
- avoid strange bugs when spawning many ruby processes as the dynamic shortcut methods were only defined in the process that used the has_role command
- โ added a method_missing to catch newly created role outside the current ruby process (i.e. dynamic shortcut methods are not defined within this process)
-
v0.6 Changes
June 19, 2011- ๐ custom User and Role class names support
- can now use other class names for Role and User classes
- fixed generators and templates
- join table is explicitly set to avoid alphabetical order issue
- created a new railtie to load the dynamic shortcuts at startup
- ๐ custom User and Role class names support
-
v0.5.1 Changes
June 07, 2011- ๐ fixed a nasty typo on a variable name and added a spec to make it never happen again
-
v0.5 Changes
June 07, 2011- ๐ dynamic shortcuts support
- creates automatically new methods upon new role creation (or at startup for a Rails app)
- has_role "admin" will create a method called is_admin?
- has_role "moderator", Forum.first will create 2 methods:
- is_moderator_of?(resource)
- is_moderator?
- ๐ dynamic shortcuts support
-
v0.4 Changes
June 07, 2011- ๐ removing role support
- has_no_role removes a global role or a role scoped to a resource
- Please note that trying to remove a global role whereas the user a role with the same name on a resource will remove that scoped role
- Trying to remove a role scoped to a resource whereas the user has a global role won't remove it
- ๐ removing role support