Go to file
Mark Moser a1b431c667 Merge branch 'develop' 2017-06-06 13:40:00 -05:00
app Merge branch 'develop' 2017-06-06 13:40:00 -05:00
bin Rails5 init 2016-07-26 11:59:23 -05:00
config added sort for users list 2017-03-06 13:35:45 -06:00
db We are PDA 2017-05-04 13:01:02 -05:00
lib move quiz faker to new dev utilities location 2017-03-02 10:36:10 -06:00
public add favicon.ico 2016-09-16 08:29:58 -05:00
test limit candidate quiz dropdown to only show "active" quizzes 2017-06-05 11:27:48 -05:00
.bowerrc vendor assets 2016-07-28 12:59:20 -05:00
.deploy.conf.sample bash deployment system 2016-09-23 15:03:00 -05:00
.eslintrc.yml organized js assets 2016-09-07 17:45:22 -05:00
.gitignore bash deployment system 2016-09-23 15:03:00 -05:00
.rubocop.yml Don't auto corect debug statements 2017-02-13 15:52:01 -06:00
.ruby-version rubocop noise: fixes FrozenStringLiteralComment 2016-09-08 10:30:13 -05:00
.sass-lint.yml updating PDR lint file 2017-02-24 12:00:29 -06:00
.scss-lint.yml stack up & tweaked 2016-07-26 13:54:04 -05:00
Gemfile limit quiz and results scopes to current_user access 2017-05-03 16:25:32 -05:00
Gemfile.lock limit quiz and results scopes to current_user access 2017-05-03 16:25:32 -05:00
Guardfile rubocop autofix! 2017-02-13 15:03:08 -06:00
README.md linked into views 2016-11-19 09:38:28 -06:00
Rakefile rubocop noise: fixes FrozenStringLiteralComment 2016-09-08 10:30:13 -05:00
bower.json Refactored foundation style manifest 2016-08-21 13:43:00 -05:00
config.ru rubocop noise: fixes FrozenStringLiteralComment 2016-09-08 10:30:13 -05:00
deploy.sh bash deployment system 2016-09-23 15:03:00 -05:00
erd.pdf limit quiz and results scopes to current_user access 2017-05-03 16:25:32 -05:00
package.json bash deployment system 2016-09-23 15:03:00 -05:00
rebuild-dev-db.sh bash deployment system 2016-09-23 15:03:00 -05:00
start-dev.sh guardfile work 2016-09-01 15:00:04 -05:00
start-docker.sh brand new docker container and updated readme 2016-08-12 00:24:15 -05:00
start-server.sh guardfile work 2016-09-01 15:00:04 -05:00

README.md

Skill Assessment Quiz

This application manages quizzes intended to be used as pre-interview skill assessments.

Development Guidelines

Please follow these guidelines as close as possible. Discuss and question them as needed.

  • Run Guard while developing.
    • bundle exec guard
    • Always execute a full run before a push (simply hit return in your guard session).
  • Honor RuboCop warnings.
  • Write tests, And keep them green.
    • Review the coverage report, keeping coverate > 90%.
      • coverage/index.html
    • It is OK to delete tests which are duplicated, or no longer relevant.
    • If you find a bug, write a test to recreate it, so it never comes back unnoticed.
  • Make sure to keep the fixture files current.
    • test/fixtures/*.yml
    • Include any new development data needs.
  • Protect Gemfile.
    • Does your new gem bring in a ton of unnecessary or outdated gems?
    • Are you bringing in a gem that solves a problem already addressed by an existing gem?
    • Do you really need this gem, or just a simple service object?
    • Place your new gem appropriately. Some gem blocks are order specific, but most are alphabetized.
  • Keep git comment subjects short, and use git comment bodies for more details.
  • Pull with --rebase.
    • git config --global pull.rebase true
  • Feature branches are nice.
    • Rebase feature branches onto develop before merging.
      • push -f is ok on feature branches. Just communicate with others using that branch.
    • Never merge develop down to a feature branch.
    • Merge with --no-ff when appropriate, --squash "WIP" commits into a complete thought.
    • Clean up your remote branches after merge.
  • Keep code comments to a minimum.
    • We use git. Write a good commit message instead.
    • Remove/Update code comments when changes are made.
  • Leave the code better than you found it.
  • Have fun.

Setup

  • clone
  • checkout develop
  • bundle
  • npm install
  • bower install
  • cp config/application.yml.sample config/application.yml
  • edit and update proper values to application.yml
  • rake db:setup
  • rake db:migrate
  • rake db:fixtures:load
    • ./rebuild-dev-db.sh is a convenience script to rebuild and refresh your dev db with the fixture data.

Docker

You can develop in this app with a native rails install, if you prefer. However, there is also a docker image setup if you do not want to install all the supporting gems and libraries. Please note: The guard watch session does not run all watches correctly in the docker container. The only issue this causes is all the automation is not 100%. Simply manually kick off the runners occasionally by hitting return in the session.

To use the docker container, you need to install and launch docker, which can be found here: https://www.docker.com/products/docker

Once the container is started, you can still edit files from your host project directory.

visit http://localhost:3000 like normal

There are some convenience scripts included to make starting the container and rails app easier.

./start-docker.sh

  • Execute from terminal, on the host machine, in the project directory
  • This will pull the image from dockerhub, if needed
  • Create and start up container

Once in the container:

  • ./start-dev.sh
    • will spin up a dev session with tmux
  • ./start-server.sh
    • starts up just rails server for viewing application

Deploying a new version

  • ssh into server
  • cd into app root
  • run deploy.sh

TODOs and notes