README.markdown in cream-0.7.2 vs README.markdown in cream-0.7.3

- old
+ new

@@ -50,18 +50,17 @@ Document DBs such as *Mongo* and *Riak* are good for modeling a role-group hierarchical relationship. Role-Group support is planned as a future add-on for the roles strategies integration. (Any assistance appreciated!) _Note:_ You are most welcome to provide "plugins" for any other role frameworks. Please follow the API conventions of Roles generic. +Update: Currently in the process of expanding the API a little (add, remove, exhange roles) while making it more generic and flexible. ## Permission systems There is support for the [CanCan](http://github.com/ryanb/cancan) permission system. -I have created a [Cancan permits](http://github.com/kristianmandrup/cancan-permits) gem that adds the concept of Permits for each role (see below) +I have created a [Cancan permits](http://github.com/kristianmandrup/cancan-permits) gem that adds the concept of Permits for each role (see below). -I'm considering supporting [Canable](http://github.com/jnunemaker/canable) as well (but only if requested by the community!) - _Note:_ You are most welcome to provide "plugins" for other permission frameworks! ## ORMs @@ -110,68 +109,69 @@ The *config* generator will generate a set of Permit files which are placed in '/app/permits'. You can then edit the Permits to suit your needs. The project [CanCan REST links](http://github.com/kristianmandrup/cancan-rest-links) provides a convenient way to handle CanCan REST links, using a flexible API. -### Canable - -In [Canable](http://github.com/jnunemaker/canable) the permissions are by default defined in the models. -I plan to tweak this behavior to enable the same or a similar central permission setup as I use for CanCan. -In my (somewhat old and degenerate) fork of *Canable*, I have generators to setup the models and user with a *Canable* config. - -_Note_: These generators should be updated to take advantage of my latest generator-spec and other supporting generator assitant gems! - -More to follow in the future... - ## Permits -Currently CanCan is supported as the permission system. I have added the concept of Permits linked to Roles. +Currently CanCan is supported as the permission system. I have added the concept of Permits (and optionally Licenses) linked to Roles. Check out [Cancan permits](http://github.com/kristianmandrup/cancan-permits) for more info for how to use Permits. -Cream has ben updated to support my latest version of *Cancan permits*, which now support all the ORMs which cream aims to support and which Roles Generic supports. +Cream has ben updated to support my the version of *Cancan permits*, which now support all the ORMs that both Cream and Roles Generic support. The various players are starting to play together nice! ## Generators The following generators are currently available -* cream:config - Configure Rails 3 application with Cream -* cream:users - Configure Rails 3 application with Cream -* cream:views - Generate partials for menu items +* cream:config - Configure Rails 3 application with Cream (master generator) -* permits:config - Configures app with CanCan Permits +Sub-generators + +* cream:views - Generates partials for menu items +* devise:config - Configure Rails 3 application with Devise +* devise:users - Configure Rails 3 application with Devise users * cancan:config - Configures app with CanCan +* permits:config - Configures app with CanCan Permits * roles:config - Configures app with Roles All the above generators now have specs to show how to use them. -Note: They have still not been tested in all scenarios with all ORMs, role strategies etc. +Note: These generators have still not been tested in all scenarios with all ORMs, role strategies etc. I am sure there are still some issues... so please help uncover these! +In general, the cream:config generator can be seen as a kind of "super generator", in that it should call all the sub-generators in succession to attempt to fully configure +and applicaiton in one go. + Cream will support these ORMs: * Active Record * Data Mapper * Mongo Mapper * Mongoid ### Config Generator ### -*Deprecated* +Master cream generator which calls the sub-generators in succession. -In the future this should be a master generator which calls the other generators in turn. +<code>rails g cream::config --strategy ROLE_STRATEGY [--admin_user] [--orm ORM] [--roles ROLE1 ROLE2] [--logfile LOGFILE]</code> -<code>rails g cream::config --strategy ROLE_STRATEGY [--init-devise] [--admin_user] [--orm] [--roles]</code> - * --strategy : role strategy to use (see *roles_generic* gem) -* --init-devise : run devise generator to create devise Users with session/auth strategies * --admin-user : create admin user model with separate devise configuration * --orm : orm to be used -* --roles : list of valid roles to use +* --roles : list of valid roles and permits to use Example -<code>rails g cream:config admin_flag --devise --admin --orm AR</code> +<code>rails g cream:config --strategy admin_flag --admin-user --orm AR</code> + +By default creates :guest and :admin roles. + +## Sub generators + +To view the run options of any of the sub generators, simply type $ rails g [GENERATOR_NAME] + +Example: <code>rails g permits:config</code> ### Views Generator ### Moves 'user menu' partials views into app/views/_user_menu