reorganize shoulda lib layout
Reported by Josh Nichols | June 26th, 2008 @ 08:22 PM
I've had my eye on merb for a while, and to minimize the learning curve, I'd use activerecord instead of datamapper. Of course, I'd want to be test-driven, so I'd want to use shoulda. Or heck, maybe I'd use shoulda outside of a webapp.
As is, everything is kinda lumped together as a plugin. Ideally, I think there'd gems like:
- shoulda
- shoulda-activerecord
- shoulda-rails
- shoulda-merb
And so on.
So, I have some ideas to reorganize things to start moving in this direction, without breaking the plugin for users of it.
I think it'd be easier to point at my branch, rather than thoroughly explain, but the basic idea is:
- lib/shoulda has the core shoulda stuff (that was the gem)
- lib/shoulda/active_record has the activerecord stuff
- lib/shoulda/rails has the rails specific stuff (controllers, fixtures, etc)
If you were to do:
require 'shoulda'
You just get the shoulda basic stuff.
You could also do:
require 'shoulda/active_record'
And you'd get just the active record stuff.
To get the functionality of the current plugin, you'd do:
require 'shoulda/rails'
For backwards compatibility, the init.rb does something like:
require 'shoulda'
require 'shoulda/rails'
The branch is at:
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
