Skip to content

Latest commit

 

History

History
143 lines (100 loc) · 2.68 KB

README.md

File metadata and controls

143 lines (100 loc) · 2.68 KB

Drezyna

Drezyna is a Rails application stack used at Nukomeet.

Setup

Ruby version

By default, Drezyna is running on ruby 2.1.2.

Server

thin used for both development and production servers.

Persistance

PostgreSQL 9.3 with ActiveRecord

Testing:

minitest with fabrication

Auth

Handled by devise and pundit.

Remapped routes:

  • /users/sign_in to /login,
  • /users/sign_out to /logout
  • /users/sign_up to /register

Frontend

slim is the template language.

foundation, simple_form and compass

Email

The application is configured to send email using a Mandrill account. Email delivery is disabled in development.

Extras

  • rails console runs pry by default.
  • helpers generation turned off in application.rb with
    config.generators.helper = false
    

Usage

Clone this repository

git clone https://github.com/nukomeet/drezyna

Rename the application

mv drezyna sampleapp
cd sampleapp
bundle
rails g rename:app_to SampleApp

Adjust your environment

Create a .env file based on .env.sample:

cp .env.sample .env

Adjust DB configuration:

curl -o config/database.yml https://gist.githubusercontent.com/zaiste/10378957/raw/50dfe7f2dd2050e2903aff187fb7e11ec702fc15/database.yml

Edit config/database.yml and replace NAME and USER_NAME with your own values.

Edit test/fixtures/users.yml and put at least one user.

Create and fill DB:

rake db:create
rake db:migrate
rake db:fixtures:load
foreman run rake db:seed

Launch

If you're a Pow user

Set your env readable by Pow:

echo "
export PORT='5000'
export ADMIN_NAME='bonjour'
export ADMIN_EMAIL='[email protected]'
export ADMIN_PASSWORD='bienvenue'
export MANDRILL_USERNAME='[email protected]'
export MANDRILL_APIKEY='CHANGEME'
export SECRET_KEY_BASE='<run `rake secret` command and put here the result>'
export NEW_RELIC_LICENSE_KEY='CHANGEME'
export NEW_RELIC_APP_NAME='CHANGEME'
" > .powenv

Set and access your app:

cd ~/.pow
ln -s /path/to/your/app/sampleapp .
open http://sampleapp.dev

Otherwise

foreman start

Access localhost:5000 and enjoy your new application.