A repository for the daily Advent of Code challenges, with some utility scripts tossed in.
- The new challenge is released at 12am EST!
bin/start
- If there's an input file, dump the contents into
inputs/YYYY/DD.txt
, whereYYYY
is the challenge year, andDD
is the zero-padded challenge date. If your environment has aCOOKIE
value set, or you have a.session/cookie
file with a valid session cookie for the Advent of Code site, this input file will be automatically populated. - Write your solution code in
lib/YYYY/DD.rb
. Your input file will be available as a String constant namedINPUT
. Invokesolve!
with your solution value(s). - Add specs for any given examples in the challenge description to
spec/YYYY/DD_spec.rb
, and use those specs to confirm whether or not your solution matches the described behavior. bin/run
bin/start
and bin/run
can have an explicit date passed to them, if you need/want to run the code for a different date (e.g., bin/run 2015/02
).