[
  {
    "path": ".claude/settings.json",
    "content": "{\n  \"hooks\": {\n    \"PostToolUse\": [\n      {\n        \"matcher\": \"Edit|MultiEdit|Write\",\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \"bundle exec tldr --timeout 0.1 --exit-0-on-timeout --exit-2-on-failure\"\n          }\n        ]\n      }\n    ]\n  }\n}\n"
  },
  {
    "path": ".github/workflows/main.yml",
    "content": "name: Ruby\n\non:\n  push:\n    branches:\n      - master\n\n  pull_request:\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    name: Ruby ${{ matrix.ruby }}\n    strategy:\n      matrix:\n        ruby:\n          - '3.2.1'\n\n    steps:\n    - uses: actions/checkout@v3\n    - name: Set up Ruby\n      uses: ruby/setup-ruby@v1\n      with:\n        ruby-version: ${{ matrix.ruby }}\n        bundler-cache: true\n    - name: Run the default task\n      run: bundle exec rake\n"
  },
  {
    "path": ".gitignore",
    "content": "/.bundle/\n/.yardoc\n/_yardoc/\n/coverage/\n/doc/\n/pkg/\n/spec/reports/\n/tmp/\n"
  },
  {
    "path": ".tldr.yml",
    "content": "parallel: false\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# Changelog\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n## [0.1.1] - 2022-07-01\n\n- Fix `warn_by` [#16](https://github.com/searls/todo_or_die/pull/16)\n\n## [0.1.0] - 2022-06-27\n\n- Add `warn_by` option [#14](https://github.com/searls/todo_or_die/pull/14)\n\n## [0.0.3] - 2019-11-26\n### Added\n- Boolean-returning conditionals or callables (Proc, Block, Lambda) can be passed to the\nnew `if` argument. `if` can be used instead of or in conjunction with the `by` argument\nto die on a specific date OR when a specific condition becomes true.\n\n### Changed\n- Date strings can now be parsed parsed internally without calling `Time` or `Date`\nclasses explicitely.\n\n## [0.0.2] - 2019-02-15\n### Changed\n- Exclude this gem's backtrace location from exceptions thrown to make it easier to find\nTODOs.\n\n## [0.0.1] - 2019-01-01\n\n[Unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.3...HEAD\n[0.0.3]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.2...v0.0.3\n[0.0.2]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.1...v0.0.2\n[0.0.1]: https://github.com/olivierlacan/keep-a-changelog/releases/tag/v0.0.1\n"
  },
  {
    "path": "Gemfile",
    "content": "source \"https://rubygems.org\"\n\ngit_source(:github) { |repo_name| \"https://github.com/#{repo_name}\" }\n\n# Specify your gem's dependencies in todo_or_die.gemspec\ngemspec\n\ngem \"rake\"\ngem \"standard\"\ngem \"timecop\"\ngem \"tldr\"\n"
  },
  {
    "path": "LICENSE.txt",
    "content": "Copyright (c) 2019 Justin Searls\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# TODO or Die!\n\n<img src=\"https://user-images.githubusercontent.com/79303/50570550-f41a6180-0d5d-11e9-8033-7ea4dfb7261c.jpg\" height=\"360\"  alt=\"TODO or Die NES cart\"/>\n\n## Usage\n\nStick this in your Gemfile and bundle it:\n\n```ruby\ngem \"todo_or_die\"\n```\n\nOnce required, you can mark TODOs for yourself anywhere you like:\n\n```ruby\nTodoOrDie(\"Update after APIv2 goes live\", by: Date.civil(2019, 2, 4))\n```\n\nTo understand why you would ever call a method to write a comment, read on.\n\n### The awful way you used to procrastinate\n\nIn the Bad Old Days™, if you had a bit of code you knew you needed to change\nlater, you might leave yourself a code comment to remind yourself to change it.\nFor example, here's the real world code comment that inspired this gem:\n\n``` ruby\nclass UsersController < ApiController\n  # TODO: remember to delete after JS app has propagated\n  def show\n    redirect_to root_path\n  end\nend\n```\n\nThis was bad. The comment did nothing to remind myself or anyone else to\nactually delete the code. Because no one was working on this part of the system\nfor a while, the _continued existence of the redirect_ eventually resulted in an\nactual support incident (long story).\n\n### The cool new way you put off coding now\n\nSo I did what any programmer would do in the face of an intractable social\nproblem: I wrote code in the vain hope of solving things without needing to talk\nto anyone. And now this gem exists.\n\nTo use it, try replacing one of your TODO comments with something like this:\n\n``` ruby\nclass UsersController < ApiController\n  TodoOrDie(\"delete after JS app has propagated\", by: \"2019-02-04\")\n  def show\n    redirect_to root_path\n  end\nend\n```\n\nNothing will happen at all until February 4th, at which point the gem will\nraise an error whenever this class is loaded until someone deals with it.\n\nYou may also pass a condition, either as a callable (e.g. proc/lambda/method) or\na boolean test:\n\n``` ruby\nclass User < ApplicationRecord\n  TodoOrDie(\"delete after someone wins\", if: User.count > 1000000)\n  def is_one_millionth_user?\n    id == 1000000\n  end\nend\n```\n\nYou can also pass both `by` and `if` (where both must be met for an error to be\nraised) or, I guess, neither (where an error will be raised as soon as\n`TodoOrDie` is invoked).\n\n### What kind of error?\n\nIt depends on whether you're using [Rails](https://rubyonrails.org) or not.\n\n#### When you're writing Real Ruby\n\nIf you're not using Rails (i.e. `defined?(Rails)` is false), then the gem will\nraise a `TodoOrDie::OverdueError` whenever a TODO is overdue. The message looks\nlike this:\n\n```\nTODO: \"Visit Wisconsin\" came due on 2016-11-09. Do it!\n```\n\n#### When `Rails` is a thing\n\nIf TodoOrDie sees that `Rails` is defined, it'll assume you probably don't want\nthis tool to run outside development and test, so it'll log the error message to\n`Rails.logger.warn` in production (while still raising the error in development\nand test).\n\n### Wait, won't sprinkling time bombs throughout my app ruin my weekend?\n\nSure will! It's \"TODO or Die\", not \"TODO and Remember to Pace Yourself\".\n\nStill, someone will probably get mad if you break production because you forgot\nto follow through on removing an A/B test, so I'd [strongly recommend you read\nwhat the default hook actually does](lib/todo_or_die.rb#L8-L16) before this gem\nleads to you losing your job. (Speaking of, please note the lack of any warranty\nin `todo_or_die`'s [license](LICENSE.txt).)\n\nTo appease your boss, you may customize the gem's behavior by passing in your\nown `call`'able lambda/proc/dingus like this:\n\n```ruby\nTodoOrDie.config(\n  die: ->(message, due_at) {\n    if message.include?(\"Karen\")\n      raise \"Hey Karen your code's broke\"\n    end\n  }\n)\n```\n\nNow, any `TodoOrDie()` invocations in your codebase (other than Karen's) will be\nignored. (You can restore the default hook with `TodoOrDie.reset`).\n\n## When is this useful?\n\nThis gem may come in handy whenever you know the code _will_ need to change,\nbut it can't be changed just yet, and you lack some other reliable means of\nensuring yourself (or your team) will actually follow through on making the\nchange later.\n\nThis is a good time to recall [LeBlanc's\nLaw](https://www.quora.com/What-resources-could-I-read-about-Leblancs-law),\nwhich states that `Later == Never`. Countless proofs of this theorem have been\nreproduced by software teams around the world. Some common examples:\n\n* A feature flag was added to the app a long time ago, but the old code path is\n  still present, even after the flag had been enabled for everyone. Except now\n  there's also a useless `TODO: delete` comment to keep it company\n* A failing test was blocking the build and someone felt an urgent pressure to\n  deploy the app anyway. So, rather than fix the test, Bill commented it out\n  \"for now\"\n* You're a real funny guy and you think it'd be hilarious to make a bunch of\n  Aaron's tests start failing on Christmas morning\n\n## Pro-tip\n\nCute Rails date helpers are awesome, but don't think you're going to be able to\ndo this and actually accomplish anything:\n\n```ruby\nTodoOrDie(\"Update after APIv2 goes live\", 2.weeks.from_now)\n```\n\nIt will never be two weeks from now.\n"
  },
  {
    "path": "Rakefile",
    "content": "require \"bundler/gem_tasks\"\nrequire \"standard/rake\"\nrequire \"tldr/rake\"\n\ntask default: [:tldr, \"standard:fix\"]\n"
  },
  {
    "path": "bin/console",
    "content": "#!/usr/bin/env ruby\n\nrequire \"bundler/setup\"\nrequire \"todo_or_die\"\n\n# You can add fixtures and/or initialization code here to make experimenting\n# with your gem easier. You can also use a different console, if you like.\n\n# (If you use this, don't forget to add pry to your Gemfile!)\n# require \"pry\"\n# Pry.start\n\nrequire \"irb\"\nIRB.start(__FILE__)\n"
  },
  {
    "path": "bin/setup",
    "content": "#!/usr/bin/env bash\nset -euo pipefail\nIFS=$'\\n\\t'\nset -vx\n\nbundle install\n\n# Do any other automated setup that you need to do here\n"
  },
  {
    "path": "lib/todo_or_die/overdue_error.rb",
    "content": "module TodoOrDie\n  class OverdueTodo < StandardError\n  end\nend\n"
  },
  {
    "path": "lib/todo_or_die/version.rb",
    "content": "module TodoOrDie\n  VERSION = \"0.1.1\"\nend\n"
  },
  {
    "path": "lib/todo_or_die.rb",
    "content": "require \"time\"\nrequire \"todo_or_die/version\"\nrequire \"todo_or_die/overdue_error\"\n\n# The namespace\nmodule TodoOrDie\n  DEFAULT_CONFIG = {\n    die: ->(message, due_at, condition) {\n      error_message = [\n        \"TODO: \\\"#{message}\\\"\",\n        (\" came due on #{due_at.strftime(\"%Y-%m-%d\")}\" if due_at),\n        (\" and\" if due_at && condition),\n        (\" has met the conditions to be acted upon\" if condition),\n        \". Do it!\"\n      ].compact.join(\"\")\n\n      if defined?(Rails) && Rails.env.production?\n        Rails.logger.warn(error_message)\n      else\n        raise TodoOrDie::OverdueTodo, error_message, TodoOrDie.__clean_backtrace(caller)\n      end\n    },\n\n    warn: lambda { |message, due_at, warn_at, condition|\n      error_message = [\n        \"TODO: \\\"#{message}\\\"\",\n        (\" is due on #{due_at.strftime(\"%Y-%m-%d\")}\" if due_at),\n        (\" and\" if warn_at && condition),\n        (\" has met the conditions to be acted upon\" if condition),\n        \". Don't forget!\"\n      ].compact.join(\"\")\n\n      puts error_message\n\n      Rails.logger.warn(error_message) if defined?(Rails)\n    }\n  }.freeze\n\n  def self.config(options = {})\n    @config ||= reset\n    @config.merge!(options)\n  end\n\n  def self.reset\n    @config = DEFAULT_CONFIG.dup\n  end\n\n  FILE_PATH_REGEX = Regexp.new(Regexp.quote(__dir__)).freeze\n  def self.__clean_backtrace(stack)\n    stack.delete_if { |line| line =~ FILE_PATH_REGEX }\n  end\nend\n\n# The main event\ndef TodoOrDie(message, by: by_omitted = true, if: if_omitted = true, warn_by: warn_by_omitted = true)\n  due_at = Time.parse(by.to_s) unless by_omitted\n  warn_at = Time.parse(warn_by.to_s) unless warn_by_omitted\n  condition = binding.local_variable_get(:if) unless if_omitted\n\n  is_past_due_date = by_omitted || Time.now > due_at\n  die_condition_met = if_omitted || (condition.respond_to?(:call) ? condition.call : condition)\n  no_conditions_given = by_omitted && if_omitted && warn_by_omitted\n  only_warn_condition_given = if_omitted && by_omitted && !warn_by_omitted\n\n  ready_to_die = is_past_due_date && die_condition_met && !only_warn_condition_given\n  should_die = no_conditions_given || ready_to_die\n  should_warn = !warn_by_omitted && Time.now > warn_at\n\n  if should_die\n    die = TodoOrDie.config[:die]\n    die.call(*[message, due_at, condition].take(die.arity.abs))\n  elsif should_warn\n    warn = TodoOrDie.config[:warn]\n    warn.call(*[message, due_at, warn_at, condition].take(warn.arity.abs))\n  end\nend\n"
  },
  {
    "path": "test/helper.rb",
    "content": "require \"ostruct\"\nrequire \"timecop\"\nTimecop.thread_safe = true\n\nrequire \"todo_or_die\"\n\nrequire \"tldr\"\nif defined?(Minitest::Test)\n  TLDR::MinitestTestBackup = Minitest::Test\n  Minitest.send(:remove_const, \"Test\")\nend\nmodule Minitest\n  class Test < TLDR\n    include TLDR::MinitestCompatibility\n  end\nend\n\nclass UnitTest < Minitest::Test\n  def teardown\n    Timecop.return\n    TodoOrDie.reset\n    Object.send(:remove_const, :Rails) if defined?(Rails)\n  end\n\n  def make_it_be_rails(is_production)\n    rails = Object.const_set(:Rails, Module.new)\n\n    rails.define_singleton_method(:env) do\n      OpenStruct.new(production?: is_production)\n    end\n\n    fake_logger = FauxLogger.new\n    rails.define_singleton_method(:logger) do\n      fake_logger\n    end\n\n    fake_logger\n  end\n\n  class FauxLogger\n    attr_reader :warning\n\n    def warn(message)\n      @warning = message\n    end\n  end\nend\n"
  },
  {
    "path": "test/todo_or_die_test.rb",
    "content": "class TodoOrDieTest < UnitTest\n  def test_not_due_todo_does_nothing\n    Timecop.travel(Date.civil(2200, 2, 3))\n\n    TodoOrDie(\"Fix stuff\", by: Date.civil(2200, 2, 4))\n\n    # 🦗 sounds\n  end\n\n  def test_due_todo_blows_up\n    Timecop.travel(Date.civil(2200, 2, 4))\n\n    error = assert_raises(TodoOrDie::OverdueTodo) {\n      TodoOrDie(\"Fix stuff\", by: Date.civil(2200, 2, 4))\n    }\n\n    assert_equal <<~MSG.chomp, error.message\n      TODO: \"Fix stuff\" came due on 2200-02-04. Do it!\n    MSG\n  end\n\n  def test_warns_when_by_not_passed\n    Timecop.travel(Date.civil(2200, 2, 4))\n\n    out, _err = capture_io {\n      TodoOrDie(\"Fix stuff\", warn_by: Date.civil(2200, 2, 4))\n    }\n\n    assert_equal <<~MSG.chomp, out.strip\n      TODO: \"Fix stuff\". Don't forget!\n    MSG\n  end\n\n  def test_warns_with_by\n    Timecop.travel(Date.civil(2200, 2, 4))\n\n    out, _err = capture_io {\n      TodoOrDie(\"Fix stuff\", by: Date.civil(2200, 2, 5), warn_by: Date.civil(2200, 2, 4))\n    }\n\n    assert_equal <<~MSG.chomp, out.strip\n      TODO: \"Fix stuff\" is due on 2200-02-05. Don't forget!\n    MSG\n  end\n\n  def test_doesnt_warn_early\n    Timecop.travel(Date.civil(2200, 2, 3))\n\n    out, _err = capture_io {\n      TodoOrDie(\"Fix stuff\", by: Date.civil(2200, 2, 5), warn_by: Date.civil(2200, 2, 4))\n    }\n\n    assert_equal \"\", out.strip\n  end\n\n  def test_config_warn\n    Timecop.travel(Date.civil(2200, 2, 5))\n    actual_message, actual_by = nil\n    TodoOrDie.config(\n      warn: ->(message, by) {\n        actual_message = message\n        actual_by = by\n        \"pants\"\n      }\n    )\n    some_time = Time.parse(\"2200-02-06\")\n    some_earlier_time = Time.parse(\"2200-02-03\")\n\n    result = TodoOrDie(\"kaka\", by: some_time, warn_by: some_earlier_time)\n\n    assert_equal result, \"pants\"\n    assert_equal actual_message, \"kaka\"\n    assert_equal actual_by, some_time\n  end\n\n  def test_config_custom_explosion\n    Timecop.travel(Date.civil(2200, 2, 5))\n    actual_message, actual_by = nil\n    TodoOrDie.config(\n      die: ->(message, by) {\n        actual_message = message\n        actual_by = by\n        \"pants\"\n      }\n    )\n    some_time = Time.parse(\"2200-02-04\")\n\n    result = TodoOrDie(\"kaka\", by: some_time)\n\n    assert_equal result, \"pants\"\n    assert_equal actual_message, \"kaka\"\n    assert_equal actual_by, some_time\n  end\n\n  def test_config_custom_0_arg_die_callable\n    Timecop.travel(Date.civil(2200, 2, 5))\n    TodoOrDie.config(\n      die: -> {\n        :neat\n      }\n    )\n\n    result = TodoOrDie(nil, by: \"2200-02-04\")\n\n    assert_equal result, :neat\n  end\n\n  def test_config_custom_1_arg_die_callable\n    Timecop.travel(Date.civil(2200, 2, 5))\n    actual_message = nil\n    TodoOrDie.config(\n      die: ->(message) {\n        actual_message = message\n        :cool\n      }\n    )\n    some_time = Time.parse(\"2200-02-04\")\n\n    result = TodoOrDie(\"secret\", by: some_time)\n\n    assert_equal result, :cool\n    assert_equal actual_message, \"secret\"\n  end\n\n  def test_config_and_reset\n    some_lambda = -> {}\n    TodoOrDie.config(die: some_lambda)\n\n    assert_equal TodoOrDie.config[:die], some_lambda\n    assert_equal TodoOrDie.config({})[:die], some_lambda\n\n    TodoOrDie.reset\n\n    assert_equal TodoOrDie.config[:die], TodoOrDie::DEFAULT_CONFIG[:die]\n  end\n\n  def test_when_rails_is_a_thing_and_not_production\n    make_it_be_rails(false)\n\n    Timecop.travel(Date.civil(1980, 1, 20))\n\n    assert_raises(TodoOrDie::OverdueTodo) {\n      TodoOrDie(\"I am in Rails\", by: Date.civil(1980, 1, 15))\n    }\n  end\n\n  def test_when_rails_is_a_thing_and_is_production\n    faux_logger = make_it_be_rails(true)\n\n    Timecop.travel(Date.civil(1980, 1, 20))\n\n    TodoOrDie(\"Solve the Iranian hostage crisis\", by: Date.civil(1980, 1, 20))\n\n    assert_equal <<~MSG.chomp, faux_logger.warning\n      TODO: \"Solve the Iranian hostage crisis\" came due on 1980-01-20. Do it!\n    MSG\n  end\n\n  def test_warn_when_rails_is_a_thing\n    faux_logger = make_it_be_rails(true)\n\n    Timecop.travel(Date.civil(2200, 2, 4))\n\n    TodoOrDie(\"Fix stuff\", by: Date.civil(2200, 2, 5), warn_by: Date.civil(2200, 2, 4))\n\n    assert_equal <<~MSG.chomp, faux_logger.warning\n      TODO: \"Fix stuff\" is due on 2200-02-05. Don't forget!\n    MSG\n  end\n\n  def test_todo_or_die_file_path_removed_from_backtrace\n    Timecop.travel(Date.civil(2200, 2, 4))\n\n    error = assert_raises(TodoOrDie::OverdueTodo) {\n      TodoOrDie(\"Fix stuff\", by: Date.civil(2200, 2, 4))\n    }\n\n    assert_empty(error.backtrace.select { |line| line.match?(/todo_or_die\\.rb/) })\n  end\n\n  def test_has_version\n    assert TodoOrDie::VERSION\n  end\n\n  def test_by_string_due_blows_up\n    Timecop.travel(Date.civil(2200, 2, 4))\n\n    assert_raises(TodoOrDie::OverdueTodo) {\n      TodoOrDie(\"Feelin' stringy\", by: \"2200-02-04\")\n    }\n  end\n\n  def test_by_string_not_due_does_not_blow_up\n    Timecop.travel(Date.civil(2100, 2, 4))\n\n    TodoOrDie(\"Feelin' stringy\", by: \"2200-02-04\")\n\n    # 🦗 sounds\n  end\n\n  def test_due_when_no_by_or_if_is_passed\n    Timecop.travel(Date.civil(2200, 2, 4))\n\n    assert_raises(TodoOrDie::OverdueTodo) {\n      TodoOrDie(\"Check your math\")\n    }\n  end\n\n  def test_due_and_if_condition_is_true_blows_up\n    Timecop.travel(Date.civil(2200, 2, 4))\n\n    assert_raises(TodoOrDie::OverdueTodo) {\n      TodoOrDie(\"Check your math\", by: Date.civil(2200, 2, 4), if: -> { 2 + 2 == 4 })\n    }\n  end\n\n  def test_not_due_and_if_condition_is_true_does_not_blow_up\n    Timecop.travel(Date.civil(2100, 2, 4))\n\n    TodoOrDie(\"Check your math\", by: Date.civil(2200, 2, 4), if: -> { 2 + 2 == 4 })\n\n    # 🦗 sounds\n  end\n\n  def test_due_and_if_condition_is_false_does_not_blow_up\n    Timecop.travel(Date.civil(2200, 2, 4))\n\n    TodoOrDie(\"Check your math\", by: Date.civil(2200, 2, 4), if: -> { 2 + 2 == 5 })\n\n    # 🦗 sounds\n  end\n\n  def test_by_not_passed_and_if_condition_is_true_blows_up\n    error = assert_raises(TodoOrDie::OverdueTodo) {\n      TodoOrDie(\"Check your math\", if: -> { 2 + 2 == 4 })\n    }\n\n    assert_equal <<~MSG.chomp, error.message\n      TODO: \"Check your math\" has met the conditions to be acted upon. Do it!\n    MSG\n  end\n\n  def test_by_and_if_condition_both_true_prints_full_message\n    error = assert_raises(TodoOrDie::OverdueTodo) {\n      TodoOrDie(\"Stuff\", by: \"1904-02-03\", if: -> { true })\n    }\n\n    assert_equal <<~MSG.chomp, error.message\n      TODO: \"Stuff\" came due on 1904-02-03 and has met the conditions to be acted upon. Do it!\n    MSG\n  end\n\n  def test_no_condition_passed_prints_short_message\n    error = assert_raises(TodoOrDie::OverdueTodo) {\n      TodoOrDie(\"Stuff\")\n    }\n\n    assert_equal <<~MSG.chomp, error.message\n      TODO: \"Stuff\". Do it!\n    MSG\n  end\n\n  def test_by_not_passed_and_if_condition_false_does_not_blow_up\n    TodoOrDie(\"Check your math\", if: -> { 2 + 2 == 5 })\n\n    # 🦗 sounds\n  end\n\n  def test_by_not_passed_and_if_condition_is_false_boolean_does_not_blow_up\n    TodoOrDie(\"Check your math\", if: false)\n\n    # 🦗 sounds\n  end\n\n  def test_by_not_passed_and_if_condition_is_true_boolean_blows_up\n    assert_raises(TodoOrDie::OverdueTodo) {\n      TodoOrDie(\"Check your math\", if: true)\n    }\n  end\n\n  def test_by_not_passed_and_if_condition_is_truthy_blows_up\n    assert_raises(TodoOrDie::OverdueTodo) {\n      TodoOrDie(\"Check your math\", if: 42)\n    }\n  end\n\n  def test_by_not_passed_and_if_condition_is_falsy_does_not_blow_up\n    TodoOrDie(\"Check your math\", if: nil)\n\n    # 🦗 sounds\n  end\nend\n"
  },
  {
    "path": "todo_or_die.gemspec",
    "content": "lib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"todo_or_die\"\n\nGem::Specification.new do |spec|\n  spec.name = \"todo_or_die\"\n  spec.version = TodoOrDie::VERSION\n  spec.authors = [\"Justin Searls\"]\n  spec.email = [\"searls@gmail.com\"]\n\n  spec.summary = \"Write TO​DOs in code that ensure you actually do them\"\n  spec.homepage = \"https://github.com/searls/todo_or_die\"\n\n  spec.files = Dir.chdir(File.expand_path(\"..\", __FILE__)) do\n    `git ls-files -z`.split(\"\\x0\").reject { |f| f.match(%r{^(test|spec|features)/}) }\n  end\n  spec.require_paths = [\"lib\"]\nend\n"
  }
]