{"id":15465817,"url":"https://github.com/vasfed/deprecation_collector","last_synced_at":"2025-04-22T11:19:18.054Z","repository":{"id":62559542,"uuid":"497660405","full_name":"Vasfed/deprecation_collector","owner":"Vasfed","description":"Collector for ruby/rails deprecations in production environment","archived":false,"fork":false,"pushed_at":"2025-01-14T01:32:13.000Z","size":131,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-22T11:19:09.486Z","etag":null,"topics":["collector","deprecation","production","rails","ruby"],"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/Vasfed.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-05-29T17:25:20.000Z","updated_at":"2025-01-14T01:32:05.000Z","dependencies_parsed_at":"2023-02-10T12:01:33.254Z","dependency_job_id":null,"html_url":"https://github.com/Vasfed/deprecation_collector","commit_stats":{"total_commits":32,"total_committers":2,"mean_commits":16.0,"dds":0.03125,"last_synced_commit":"8862c58962de8e94ea05691110261eb4445b0b0c"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vasfed%2Fdeprecation_collector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vasfed%2Fdeprecation_collector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vasfed%2Fdeprecation_collector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vasfed%2Fdeprecation_collector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vasfed","download_url":"https://codeload.github.com/Vasfed/deprecation_collector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250228695,"owners_count":21395958,"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":["collector","deprecation","production","rails","ruby"],"created_at":"2024-10-02T01:03:45.724Z","updated_at":"2025-04-22T11:19:18.033Z","avatar_url":"https://github.com/Vasfed.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DeprecationCollector\n[![Gem Version](https://badge.fury.io/rb/deprecation_collector.svg)](https://badge.fury.io/rb/deprecation_collector)\n\nCollects ruby and rails deprecation warnings.\nDesigned to be suitable for use in production under load.\n\n(gem is a work-in-process, documentation will come later)\n\n## Installation\n\nInstall the gem and add to the application's Gemfile by executing:\n\n```sh\nbundle add deprecation_collector\n```\n\n## Usage\n\nAdd an initializer with configuration, like\n\n```ruby\n  Rails.application.config.to_prepare do\n    DeprecationCollector.install do |instance|\n      instance.redis = Redis.new # default is $redis\n      instance.app_revision = ::GIT_REVISION\n      instance.count = false\n      instance.save_full_backtrace = true\n      instance.raise_on_deprecation = false\n      instance.write_interval = (::Rails.env.production? \u0026\u0026 15.minutes) || 1.minute\n      instance.exclude_realms = %i[kernel] if Rails.env.production?\n      instance.print_to_stderr = true if Rails.env.development?\n      instance.print_recurring = false\n      instance.ignored_messages = [\n        \"Ignoring db/schema_cache.yml because it has expired\"\n      ]\n      instance.context_saver do\n        # this will only be called for new deprecations, return value must be json-compatible\n        { some: \"custom\", context: \"for example request.id\" }\n      end\n      instance.fingerprinter do |deprecation|\n        # this will be added to fingerprint; this will be ignored for recursive deprecations\n        \"return_string_here\"\n      end\n    end\n  end\n```\n\n## Web UI\n\nMount the rack app into your routes:\n```ruby\nRails.application.routes.draw do\n  require 'deprecation_collector/web'\n  mount DeprecationCollector::Web =\u003e '/deprecations', as: :deprecations\nend\n```\n\nusually it's a good idea to secure the ui in some way, you can use rails route constraint (actual check will depend on your app):\n```ruby\nRails.application.routes.draw do\n  constraints(-\u003e(request) { request.session[:admin] }) do\n    require 'deprecation_collector/web'\n    mount DeprecationCollector::Web =\u003e '/deprecations', as: :deprecations\n  end\nend\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/Vasfed/deprecation_collector.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvasfed%2Fdeprecation_collector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvasfed%2Fdeprecation_collector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvasfed%2Fdeprecation_collector/lists"}