class Integration::Base
Public Class Methods
new(pronto: false)
click to toggle source
# File lib/integrations/base.rb, line 6 def initialize(pronto: false) @pronto = pronto end
Public Instance Methods
pronto_enabled?()
click to toggle source
# File lib/integrations/base.rb, line 10 def pronto_enabled? @pronto end
pronto_name()
click to toggle source
# File lib/integrations/base.rb, line 14 def pronto_name self.class.name.demodulize.underscore end
run_with(config)
click to toggle source
# File lib/integrations/base.rb, line 18 def run_with(config) raise NotImplementedError end
run_with_config_handling_exit(config)
click to toggle source
# File lib/integrations/base.rb, line 22 def run_with_config_handling_exit(config) if pronto_enabled? args = ['run', '.', '--exit-code', '--runner', pronto_name] Keepclean.logger.debug "Running pronto with args: #{args.inspect}" ::Pronto::CLI.start(args) ::Pronto::Runner.remove_instance_variable(:@repository) else Keepclean.logger.debug "Running on all project" run_with(config) end rescue SystemExit => e Keepclean.logger.debug "Handling SystemExit: #{e.inspect} => status: #{e.status} / success?: #{e.success?}" return e.success? end