hampelm / brickbeam

Web Presence for Brick + Beam Detroit

Home Page:http://www.brickandbeamdetroit.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Brick + Beam Detroit

This is the rails app that powers Brick + Beam Detroit.

Rails Tests Code Climate Coverage Status

Development

You may need to be using the proper version of Ruby (currently, 2.6). We suggest using rvm to mangage versions. To switch to the correct version using rvm, run this command: rvm use 2.6

Start the app with rails s

Watch for sass changes and recompile, and run code linters with guard in a new tab.

Setup

The first time you run this app, you'll need to do a little bit of setup.

These instructions are optimized for Mac. All components should have cross- platform equivalents, but you'll need to find the correct install process. They expect you are running Ruby 2.2.3.

You'll need

  • phantomjs: brew install phantomjs
  • qt for capybara -- check out the full install instructions
  • A Postgres database

First run

  1. Install bundler gem install bundler:1.16.6
  2. Install dependencies with bundle install
  3. Run the specs with rake
  4. Update the database with rake db:migrate if needed
  5. Run the server with rails s

Staging

To protect a staging server, set the environment variable IS_STAGING to true to require the user to be an admin to use the site.

General development notes

To add model descriptions to relevant files, run the command annotate from the project root.

We use skylight in production to monitor stats. You'll need to set the SKYLIGHT_AUTHENTICATION environment variable for this to work.

To run tests:

rspec

or

rspec spec/features/my_spec.rb

To generate the daily email digest:

rake question_digest:create_and_send

To resize thumbnails

rake paperclip:refresh CLASS=Event

The paperclip-optimizer gem has been installed but not activated. It provides additional image compresion. Enable if page weight increases significantly.

Deploying to Heroku

This app expects memcachier to be installed for precaching assets. To set up, run:

heroku addons:add memcachier:dev

To enable or disable this, edit this line in config/environments/production.rb:

config.assets.cache_store = :dalli_store

About

Web Presence for Brick + Beam Detroit

http://www.brickandbeamdetroit.com/


Languages

Language:Ruby 59.7%Language:Slim 23.1%Language:SCSS 12.0%Language:JavaScript 2.8%Language:HTML 1.9%Language:CoffeeScript 0.5%