Awesome
Mechanic
Mechanic creates engines the Group Buddies way. It's perfect if you just want to hit the groud running and not worrying on doing those same configuration steps everytime.
Installation
First install the mechanic gem:
gem install mechanic
Then run:
mechanic enginename --mountable
or
mechanic enginename (same as --full)
This will create a Rails mountable engine in enginename
. This script creates a new
new git repository. It is not meant to be used against an existing repo.
Gemfile
To see the latest and greatest gems, look at Mechanic's templates/gemspec_additions, which will be appended to the default generated enginename.gemspec.
It includes application gems like:
- Formtastic for form markup and style
- SASS for stylesheets
And development gems like:
- Thin for an HTTP Server
- Capybara and Capybara Webkit for integration testing
- Jasmine for JS unit testing
- RSpec for unit testing
- Shoulda Matchers for common RSpec matchers
- Timecop for testing time
Other goodies
Mechanic also comes with:
- A few nice time formats.
- An email validator.
- A default .gitignore file.
Github
You can optionally create a Github repository:
mechanic app --github organization/project
This has the same effect as running:
hub create organization/project
Capybara Webkit
You can optionally not include Capybara Webkit (which depends on QT being installed on your machine):
mechanic app --webkit false
Dependencies
Some gems included in Mechanic have native extensions. You should have GCC installed on your machine before generating an app with Mechanic.
Use OS X GCC Installer for Snow Leopard (OS X 10.6).
Use Command Line Tools for XCode for Lion (OS X 10.7) or Mountain Lion (OS X 10.8).
We use Capybara Webkit for full-stack Javascript integration testing. It requires QT. Instructions for installing QT are here.
PostgreSQL needs to be installed and running for the db:create
rake task.
Issues
If you have problems, please create a Github Issue.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Add tests and make sure you break none
- Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Credits
Mechanic is maintained and funded by GB - Software As A Service, Lda.
Mechanic's idea came from thoughtbot's suspenders, so some of the code is based on it.
License
Mechanic is Copyright © 2008-2012 Group Buddies. It is free software, and may be redistributed under the terms specified in the LICENSE file.