{"id":16070278,"url":"https://github.com/danmayer/auto_rails_cleanup","last_synced_at":"2026-04-29T03:33:05.898Z","repository":{"id":66595131,"uuid":"218634608","full_name":"danmayer/auto_rails_cleanup","owner":"danmayer","description":"A small set of utilities to help automatically clean up Rails Apps","archived":false,"fork":false,"pushed_at":"2023-03-17T02:40:20.000Z","size":22,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-19T15:48:05.195Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/danmayer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-30T22:02:25.000Z","updated_at":"2020-06-30T16:04:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"d6a827bc-46ed-4452-a95e-35d10d685ee9","html_url":"https://github.com/danmayer/auto_rails_cleanup","commit_stats":{"total_commits":5,"total_committers":3,"mean_commits":"1.6666666666666667","dds":0.6,"last_synced_commit":"5f6a498a458cba24bfb42f1d50d45406c6f2865d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danmayer%2Fauto_rails_cleanup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danmayer%2Fauto_rails_cleanup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danmayer%2Fauto_rails_cleanup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danmayer%2Fauto_rails_cleanup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danmayer","download_url":"https://codeload.github.com/danmayer/auto_rails_cleanup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243307334,"owners_count":20270256,"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-10-09T07:01:49.727Z","updated_at":"2025-12-30T04:15:13.391Z","avatar_url":"https://github.com/danmayer.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AutoRailsCleanup\n\nA small set of utilities to help automatically clean up Rails Apps.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'auto_rails_cleanup'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install auto_rails_cleanup\n\n## Basic Usage\n\nClone this repo, then bundle install, then reference locally for now. a CLI will be added.\n\n### Cleaner\n\nPick a strategy build a verbose cleaner command\n\n```\nCIRCLE_JOBS=\"test_unit,system_tests,test_javascript,static_analysis\" PROJECT_PATH=`pwd` CIRCLE_PROJECT=coverband_demo CIRCLE_ORG=coverband_service CIRCLE_TOKEN=XYZ VALIDATOR=LocalAndCircleValidator STRATEGY=DeletionStrategy DELETE_TARGET=/Users/danmayer/projects/dasher/app/assets/images/components/jewelry_tone_component/**/* TEST_TARGET=\"bundle exec rspec spec/system/billing_postcode_spec.rb\" CIRCLE_BRANCH=\"auto_clean_images\" ruby ../auto_rails_cleanup/lib/auto_rails_cleanup/cleaner.rb\n```\n\n### CircleCI Runner\n\nThis allows running a CircleCI branch to test and verify CI passes.\n\n```\nCIRCLE_TOKEN=XYZ CIRCLE_ORG=coverband_service CIRCLE_PROJECT=coverband_demo CIRCLE_BRANCH=\"auto_clean_images\" CIRCLE_JOBS=\"test_unit,system_tests,test_javascript,static_analysis\" CIRCLE_RUNS=1 ruby ../auto_rails_cleanup/lib/auto_rails_cleanup/runner.rb\n```\n\n### Git Cleaner\n\nClean a repo, compacting the successes and removing commits related to failed cleanup attempts...\n\n`ruby ../auto_rails_cleanup/lib/auto_rails_cleanup/git_cleaner.rb`\n\n## Workflow Usage\n\n1. find a good smoke test\n2. review data select cleanup strategy\n3. build out the cleaner command\n4. review resulting commits\n5. before sumbmitting a PR, git_cleanup\n\n### 1. Find a Good Smoke Test\n\nI find that a system test that hits some assets (forcing asset build), works well. I generally when running with local and CI, run a single fast local test, allowing CI to run the full suite.\n\n### 2. review data select cleanup strategy\n\nTBD\n\n### 3. build out the cleaner command\n\nTBD\n\n### 4. review resulting commits\n\nTBD\n\n### 5. Before Submitting a PR, git_cleanup\n\nI find that all the commits that are tried and rolled back can be overwhelming for the code reviewers. I like all those commits as an author as they can help me investigate and do further targetted cleaning myself... When it is time to review, I prefer to collapse all the failed attempts out of the PR. To do that run the Git Cleaner script mentioned in the usage section.\n\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` 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 tags, 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/[USERNAME]/auto_rails_cleanup. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the AutoRailsCleanup project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/auto_rails_cleanup/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanmayer%2Fauto_rails_cleanup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanmayer%2Fauto_rails_cleanup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanmayer%2Fauto_rails_cleanup/lists"}