Shard Detail

todo_or_cry v0.1.0

Write TODOs in code that you actually have to fix

Install & Use

Add the following code to your project's shard.yml under:

dependencies to use in production
- OR -
development_dependencies to use in development

  github: citizen428/todo_or_cry


TODO Or Cry! Build Status

Crystal implementation of the TODO Or Die! Ruby gem by Justin Searls. Add TODOs in code that ensure you actually do them:

TodoOrCry["fix this", Time.utc(2019, 1, 1)]
def broken_method; end
# => raises TodoOrCry::OverdueError


  1. Add the dependency to your shard.yml:

        github: your-github-user/todo_or_cry
  2. Run shards install


Require TodoOrCry like this:

require "todo_or_cry"

Then whenever you have a todo item you want to make sure gets done, add a call to TodoOrCry.[]:

TodoOrCry["fix this", Time.utc(2019, 1, 1)]

Nothing will happen before the due date, but afterwards a TodoOrCry::OverdueError will be raised:

Unhandled exception: TODO: "fix this" came due on 2019-01-01. Do it! (TodoOrCry::OverdueError)
  from in '__crystal_main'

The error message can be customized with .error_message=:

TodoOrCry.error_message = "You have failed to do \"%s\" since %s"

# Raises
Unhandled exception: You have failed to do "fix this" since 2019-01-01 (TodoOrCry::OverdueError)
  from in '__crystal_main'

To restore the standard error message, use .default_error_message!:



  1. Fork it (
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request