Skip to content

Latest commit

 

History

History
162 lines (109 loc) · 3.49 KB

README.md

File metadata and controls

162 lines (109 loc) · 3.49 KB

Link to the Team Working Agreement: https://drive.google.com/file/d/16uUZbFhEMnh5MCQcVUXWtCvOM4edJY95/view?usp=sharing


Deployed app link:

https://elrc-6ad76821be30.herokuapp.com/


Readme:

rubocop

Table of Contents

Getting Started

Prerequisites

Installation

Clone repository

git clone git@github.com:tamu-edu-students/csce606-ELRC-OLEI_Project.git

Install all dependencies

cd csce606-ELRC-OLEI_Project/rails_root
bundle install

Usage

Run locally

Create master key (obtain master key either via Dr.Ritchey or by emailing team members in contact section)

cd rails_root
echo "<master key here>" > ./config/master.key

Running database locally

bundle config set --local without 'production' (Using SQLite only otherwise brew install pg)

Generate database

rails db:migrate
rails db:seed

Start server

rails server

Run tests

Setup test database

rails db:test:prepare

Run rspec tests

bundle exec rspec

Run cucumber tests

bundle exec cucumber

Deploy

Create Heroku application

heroku create [appname]

Add buildpacks

heroku buildpacks:add https://github.com/timanovsky/subdir-heroku-buildpack.git
heroku buildpacks:add heroku/ruby

Add config vars

heroku config:set PROJECT_PATH=rails_root
heroku config:set RAILS_MASTER_KEY=<master key here>

Install Heroku Postgres and attach to application

Push to heroku app

git push heroku main

Generate database

heroku run rails db:migrate
heroku run rails db:seed

Github Integration with Heroku

Set up Github Action (Different from Github Integration with Heroku)

  1. Set up secrets.RAILS_MASTER_KEY in your project Github Repository
  2. Set up secrets.GIST_SECRET in your project Github Repository by valid token with gist scope
  3. Set up secrets.GIST_ID (Create your own gist, and set up the gist ID in your project Github Repository)

Contacts