{"id":18841715,"url":"https://github.com/alphasights/doofenshmirtz","last_synced_at":"2025-04-14T07:31:04.615Z","repository":{"id":22629833,"uuid":"25972476","full_name":"alphasights/doofenshmirtz","owner":"alphasights","description":"Make your legacy code self destruct in Rails","archived":false,"fork":false,"pushed_at":"2016-12-07T17:27:55.000Z","size":15,"stargazers_count":10,"open_issues_count":1,"forks_count":2,"subscribers_count":40,"default_branch":"master","last_synced_at":"2024-04-14T07:25:14.439Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alphasights.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-30T13:39:24.000Z","updated_at":"2024-04-14T07:25:14.440Z","dependencies_parsed_at":"2022-07-27T03:02:15.746Z","dependency_job_id":null,"html_url":"https://github.com/alphasights/doofenshmirtz","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphasights%2Fdoofenshmirtz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphasights%2Fdoofenshmirtz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphasights%2Fdoofenshmirtz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphasights%2Fdoofenshmirtz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alphasights","download_url":"https://codeload.github.com/alphasights/doofenshmirtz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248839318,"owners_count":21169791,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T02:52:13.984Z","updated_at":"2025-04-14T07:31:04.282Z","avatar_url":"https://github.com/alphasights.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Doofenshmirtz\n\n## Usage\n\nLet your Rails code self destruct in tests.\n\nSet an expiration date and leave a message anywhere:\n\n```ruby\nDoofenshmirtz::SelfDestruct.on(\"2015-05-09\", \"This is deprecated and needs to be removed\")\n```\n\nand in your test environment, if it is before that date, it will display\na warning and let you know how much time you have until the self destruct\nmechanism is activated. If it is after that date, it wil throw an exception\ncausing your tests to fail. In any other environment, it will just be ignored.\n\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'doofenshmirtz'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install doofenshmirtz\n\n\n### Reporting\n\nYou can put the following in an `after_suite` callback (or anywhere really)\nand output what self destruct mechanisms are currently enabled. For example in\nrspec, you would put the following in your spec helper.\n\n```ruby\nconfig.after(:suite) do\n  Doofenshmirtz::SelfDestruct.report\nend\n```\n\nYou can also pass a custom reporter class to customize the output.\nAll you need to implement is the `#report` method.\n\n```ruby\nDoofenshmirtz::SelfDestruct.report(MyCustomerReporter)\n```\n\nHere is an example of a simple one that prints to stdout:\n\n```ruby\nclass MyCustomerReporter\n  attr_accessor :mechanisms\n\n  def initialize(mechanisms)\n    self.mechanisms = mechanisms\n  end\n\n  def report\n    mechanisms.each do |m|\n      puts m.location\n      puts m.time\n      puts m.reason\n    end\n  end\nend\n```\n\n## Disabling Doofenshmirtz\nTo temporarily disable Doofenshmirtz set DISABLE_DOOFENSHMIRTZ environment variable to true.\n\n## Contributing\n\n1. Fork it ( https://github.com/alphasights/doofenshmirtz/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falphasights%2Fdoofenshmirtz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falphasights%2Fdoofenshmirtz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falphasights%2Fdoofenshmirtz/lists"}