In April I wrote of my plans to drop MongoDB (and the Mongoid gem) from Rails Composer (see MongoDB Dropped From Rails Composer). Today I received a note from a developer who makes a case for keeping MongoDB. Steven Kolstad writes:
I believe that MongoDB has earned its place in our development community, even if the honeymoon period of early adopters is starting to wane. Despite what public opinion is gossiping about currently, there is a use case for this technology, and I predict that once the marketplace is educated about what that is, the popularity will balance itself out. I sat and watched how long it took for Ruby to prove that it wasn’t some fad. That, even amidst wide speculation to the contrary, Ruby could be an enterprise development tool with real production value. I feel that MongoDB will likewise prove their worth in the arena.
If, like Steven, you’re interested in adding back MongoDB and Mongoid to Rails Composer, let me know (firstname.lastname@example.org) and we’ll put together a team to share the effort.
I just released a 3.0.0 version of the rails_apps_composer gem that cleans up a lot of gnarly code, making it easier to add new recipes. The gem is still challenging to figure out, but I can help you with it. The rails_apps_composer gem contains the recipes that build the Rails Composer tool.
As a first step, someone could modify the rails-omniauth example app for Mongoid. It is the simplest of the example apps that use a database. The job may be as simple as modifying the User model. If someone builds a rails-mongoid-omniauth application, I’ll add it to the RailsApps examples collection.
It is important to have an example app because the only way to test Rails Composer with a regression test after each new release is to build an example app and compare it to the example app, using a file compare tool. Mark Blackwell contributed a regression testing tool named megatest, which someone may be able to adapt as needed.
To add Mongoid to Rails Composer, you can examine the file recipes/rails-omniauth.rb (in the rails_apps_composer gem) and create a new recipe recipes/rails-mongoid-omniauth.rb to build the example app.
That will give you a recipe that builds an example app but it won’t add Mongoid as a “custom build” option. That requires finding ways to create a Mongoid version of each existing RailsApps example app. You will have to find each place that a models/user.rb file is created and add logic to modify for Mongoid.
If you like MongoDB and Mongoid, this is your chance to join an open source team and build something that makes life easier for numerous developers. Don’t hesitate, even if you’ve never contributed to an open source project before.