Advent of Code
A repository for the daily Advent of Code challenges, with some utility scripts tossed in.
- The new challenge is released at 12am EST!
- If there's an input file, dump the contents into
YYYYis the challenge year, and
DDis the zero-padded challenge date. If your environment has a
COOKIEvalue set, or you have a
.session/cookiefile 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 named
solve!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 can have an explicit date passed to them, if you need/want to run the code for a different date (e.g.,