Sha256: 6218ccc84a8b6ce9165eccb7b402f69fc98d97c5903d8562a8f4c460f6a7fe86
Contents?: true
Size: 1.5 KB
Versions: 2
Compression:
Stored size: 1.5 KB
Contents
#!/usr/bin/env ruby if ARGV[0] == "track" # We set this constant so monkey patching of the gem is only done when checking the overrides puts 'Reading all methods...' OVERRIDES_TRACKER_TRACKING_ENABLED = true require Dir.pwd+'/config/environment.rb' require 'overrides_tracker' OverridesTracker::MethodsCollector.instance.save_to_file if ENV['OVERRIDES_API_TOKEN'] OverridesTracker::MethodsCollector.instance.report(ENV['OVERRIDES_API_TOKEN']) elsif !ARGV[1].nil? OverridesTracker::MethodsCollector.instance.report(ARGV[1]) else #puts 'No OVERRIDES_API_TOKEN was set. The report will not be uploaded to overrides.io.' #puts '' #puts 'Have no idea what overrides.io is about? Check it out at https://www.overrides.com' end elsif ARGV[0] == "compare" require 'overrides_tracker' OverridesTracker::Comparer.compare unless ENV['OVERRIDES_API_TOKEN'] puts '' #puts 'Have you heard of overrides.io?' #puts 'It integrates with your CI pipeline and notifies you whenever original methods are changing or disappearing.' #puts 'Check it out at https://www.overrides.com' end elsif ARGV[0] == "report" require 'overrides_tracker' if ENV['OVERRIDES_API_TOKEN'] OverridesTracker::MethodsCollector.instance.report(ENV['OVERRIDES_API_TOKEN']) elsif !ARGV[1].nil? OverridesTracker::MethodsCollector.instance.report(ARGV[1]) else puts 'No OVERRIDES_API_TOKEN was set. The report will not be uploaded to overrides.io.' end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
overrides_tracker-0.1.4 | bin/overrides_tracker |
overrides_tracker-0.1.3 | bin/overrides_tracker |