Skip to content

Latest commit

 

History

History
49 lines (42 loc) · 1.46 KB

README.md

File metadata and controls

49 lines (42 loc) · 1.46 KB

Ruby Starter Kit

This app is a starter kit for writing code and tests in ruby. Use it as a seed for starting a new ruby project. Use the following command to copy this app's code to a new directory:

mkdir -p path/to/new
cp -r path/to/this/directory path/to/new/directory

Dependencies

The only local dependency you need to configure to use this codebase is docker-compose. This is great, because once you have docker working, it eliminates the "well it works on my machine" kind of problems. If it works on docker for you, it will work in docker for anyone.

Install

  • Build the image.
    docker-compose build

Run

  • Run the app one time and exit:
    docker-compose run --rm app
  • Drop into the container.
    docker-compose run --rm app bash
  • Run the tests.
    rspec
  • Run irb.
    irb -Ilib
  • Run the linter.
    rubocop

Debug

  • Documentation for debug.gem is here.
  • Set a breakpoint with require 'debug'; binding.break.
  • Show where you are with list and list -.
  • Continue with continue.
  • Quit and kill the program with kill!.
  • More control flow options are documented here.