Sha256: bba8b76df2a9dc55cd43e1a82127a8d8fd7571732db65467f62d161009120711
Contents?: true
Size: 733 Bytes
Versions: 6
Compression:
Stored size: 733 Bytes
Contents
require 'thor' require 'hashie' require 'roo_on_rails/checks/environment' require 'roo_on_rails/environment' module RooOnRails class Harness include Thor::Shell def initialize(try_fix: false, context: nil) @try_fix = try_fix @context = context || Hashie::Mash.new end def run [ Checks::Environment.new(env: 'staging', fix: @try_fix, context: @context), Checks::Environment.new(env: 'production', fix: @try_fix, context: @context), ].each(&:run) self rescue Shell::CommandFailed say 'A command failed to run, aborting', %i[bold red] exit 2 rescue Checks::Failure say 'A check failed, exiting', %i[bold red] exit 1 end end end
Version data entries
6 entries across 6 versions & 1 rubygems