Overrides Tracker
Overrides Tracker keeps track of all overriding methods in your project and allows for comparison across branches.
Contact
Code and Bug Reports
- Issue Tracker
- See [CONTRIBUTING]
Getting started
-
Add OverridesTracker to your Gemfile and bundle install:
gem 'overrides_tracker', group: [:test, :development]
-
Add
overrides_tracker/*
to your .gitignore file because you want to keep hold of your report file when switching branches. -
Track your overrides by running:
bundle exec overrides_tracker track
This will print out all overrides on the terminal as well as generate a nice and clean HTML summary. That summary can be found under overrides_tracker/summary.html and will look somewhat like this:
-
This will create a folder called overrides_tracker and a file containing all methods you override as well as your overrides in that branch.
-
Switch branch and follow steps 1-3 again. If you want to compare multiple branches you need to redo these steps for every branch.
-
Now you have at least 2 otf-files in the overrides_tracker folder
-
It's time to compare these overrides accross branches.
bundle exec overrides_tracker compare
-
The result will be printed on the terminal as well as written as nice and clean HTML. That comparison can be found under overrides_tracker/compare.html and will look somewhat like this:
Integrate Overrides Tracker into your CI/CD pipeline with Overrides.io
Overrides.io is a service that monitors code you override for changes. It notifies you whenever those changes occur. Additionally it gives you a beautiful overview of all the methods you have overridden as well as your overrides side by side.
Overrides Tracker can easily be integrated into your CI/CD pipeline.
Just sign up at Overrides.io and setup your project within a view seconds and you will receive an OVERRIDES_API_TOKEN.
Now just set OVERRIDES_API_TOKEN environment variable with the value of that token and call 'bundle exec overrides_tracker track'. To push the result file to overrides.io manually you could also just call 'bundle exec overrides_tracker track YOUR_OVERRIDES_API_TOKEN'.
You can find a detailed description how to integrate it with CircleCI, GitHub Action and Jenkins here:
https://www.overrides.io/continuous_integration
GEM support
Overrides Tracker can also be used on GEMs. It will autoload all classes in the lib and app folders.
Sometimes that is not enough:
If you need further requirements, you can just add a .overrides_tracker folder and add a requirements.rb file to it. In that one you can just require the classes your gem depends on.
You can also use the 'require_all' way to include complete folders, filter files etc..
Ruby version compatibility
Overrides Tracker is built in [Continuous Integration] on Ruby 2.3+.
Code of Conduct
Everyone participating in this project's development, issue trackers and other channels is expected to follow our Code of Conduct
Contributing
- Fork it
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request
Copyright
Copyright (c) 2023 Simon Meyborg. See MIT-LICENSE for details.