A rails webapp that is used by tamu organizations to take and track member attendance.
-
Have Ruby on Rails Installed
-
Have PostgreSQL Intalled
-
Have Yarn installed (for Bootstrap)
-
We used this guide for setting up bootstrap so if you have any issues refer to this
-
Clone Github repo: https://github.com/FA20-CSCE431/group-project-asabe-member-point-tracker
-
Update ruby version in Gemfile to your working version
- run 'ruby -v' to check your working version
-
Create your databse.yml file in 'config/database.yml'. See below for template.
default: &default
adapter: postgresql
encoding: unicode pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>development:
<<: *default
database: your_db_dev
username: your_username
password: your_passwordtest:
<<: *default
database: your_db_test
username: your_username
password: your_passwordproduction:
<<: *default
database: your_db_production
username: your_username
password: your_password -
Run 'bundle install' to install all gems
-
Run 'rails db:migrate' to run database migrations
-
Run 'rails server' to launch app locally
-
Go to 'http://localhost:3000/'
- or any other port you specified
The easiest way to deploy code in Heroku is to setup CD with Heroku. Start by going to your project in Heroku as all of these steps can be done there.Note that CD can also be setup through a pipeline along with CI as described in one of the TA's videos.
- Connect the github repository to the Heroku app.
- Enable automatic deployment and select master as the branch to use.
- Add a procfile to your project with any commands you need to run on every build. Most likely you will just need the command we used which starts the database so consider copying our procfile.
- Refer to Heroku documentation for other commands you need.
The easiest way to figure this out is to refer to the video left by the TA. For our class it was in the labs section on eCampus. If it's not there consider asking Professor Wade or the TA.
For security tests in our application we use the Brakeman gem to detect potential SQL injections.
-
Verify brakeman is installed by running 'gem list' and checking if brakeman is in the list
- if not, refer to this documentation to install brakeman: https://brakemanscanner.org/docs/install/
-
run 'brakeman' to execute the gem
- Rspec and capybara: https://www.codewithjason.com/rails-testing-hello-world-using-rspec-capybara/
- Ruby on Rails 5 guide: https://www.linkedin.com/learning/ruby-on-rails-5-essential-training/welcome?u=74650722
- Ruby on Rails with Postgres: https://www.digitalocean.com/community/tutorials/how-to-set-up-ruby-on-rails-with-postgres
- Bootstrap: https://getbootstrap.com/docs/4.0/layout/overview/
- Rubocop: https://docs.rubocop.org/rubocop/1.2/usage/basic_usage.html