Maguro
Maguro is the base Rails application used at Bottega8.
It's goal is to do all the boring configuration of setting up a new project for you automatically, so you can get to the fun development part in seconds instead of hours.
What does the template do?
Maguro will create a basic Rails project that is optimized for Bottega8's workflow by:
- Saving RVM configuration files
- Creating a basic README.md
- Setting up local git repository, gitinit file, and development branch
- Generating app_environment_variables.rb for custom environment variables
- Removing Turbolinks
- Including RSpec, capybara, database_cleaner, factory_girl, and other gems for testing
- Using PostgreSQL as the database and generating database.yml
Optionally, Maguro can also
- Create a Heroku application for staging and production environments
- Create a Git repository on Github.com, and pushing the newly-created Rails project to it
- Create a Git repository on BitBucket.org, and pushing the newly-created Rails project to it
- Securely store BitBucket.org credentials in the OS X keychain for convenience
- Create a local postgres database for the project
Gem Prerequisites
Before running Maguro:
- Install PostgreSQL for OS X
- Install Ruby. We recommend using the Ruby Version Manager
Optional:
- Heroku toolbelt if you want to automatically deploy to heroku.
- Hub if you want to create a remote repository on github.
brew install hub
with homebrew. - OSX Keychain if you want to save your bitbucket credentials.
Gem Usage
Install the gem:
gem install maguro
Create a new app:
maguro new $APP_NAME
Detailed Usage
- Switch to directory where new project will live. E.g.
cd ~/Desktop/projects
- Install the maguro gem
gem install maguro
- Generate the new project:
maguro new $APP_NAME
- Open config/database.yml and replace
username
with the same username when setting up Postgres - Run
rake db:create db:migrate
Development and testing steps
To make local changes to this gem, clone this repository then:
- Clone this repository
- Run
bundle install
to install development dependencies - Develop/modify the source code
- Run unit and integration tests with
rspec
- Build the gem
gem build maguro.gemspec
- Switch to the directory where you want to create a new project. E.g.
cd ~/Desktop/projects
- Install the gem
gem install ./maguro-0.0.1.gem
- Follow instructions in the section
Gem Usage
, i.e.maguro new [APP_NAME]