Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Add generators for Rails environments #7

Open
4 of 6 tasks
ReneB opened this issue Jan 15, 2014 · 5 comments
Open
4 of 6 tasks

Add generators for Rails environments #7

ReneB opened this issue Jan 15, 2014 · 5 comments

Comments

@ReneB
Copy link

ReneB commented Jan 15, 2014

Two generators come to mind:

  • install, which would contain:
    • the privileges config file
    • an app/roles directory
    • possibly the routes to the overrides page (should be skippable) - This would just be "mount this engine here"
    • an initializer to inject the group_checker dependency.
  • context_role, which would generate:
    • a new file in app/roles with a skeletal layout (possibly in a subdirectory!)
    • a pathological testcase for this role (depending on test framework)
@ryreitsma
Copy link
Contributor

Maybe the install could also include a Rails initializer? It would be nice if the initializer included all config options with defaults, but then commented out. That way you can see the defaults and easily configure them.

@ReneB
Copy link
Author

ReneB commented Jan 19, 2014

Definitely true @ryreitsma. At this juncture, I should probably also point out that we created a wiki page on features like this (this was one of the first things we did for this project), which is located here and documents our requirements for 'ease of use.'

@ReneB
Copy link
Author

ReneB commented Jan 21, 2014

Currently unsure whether an initializer is needed at all - I'm now trying to configure the load paths from the Railtie itself. Tricky business, that.

@ReneB
Copy link
Author

ReneB commented Jan 21, 2014

And again, Rails proves itself cooler than previously thought. Any directory under 'app' is already in the load path, no further configuration needed. See Jose Valim's comment here

@ReneB
Copy link
Author

ReneB commented Feb 27, 2014

Added the initializer - it may contain scaffolding for injecting the group_checker dependency.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants