lib/codeowner_validator/cli/validator_cli.rb
def options
        return @new_options if @new_options

        original_options = super

        # add any environment variables as overrides
        @new_options =
          {}.tap do |h|
            original_options.each do |key, value|
              h[key.to_sym] = value
            end

            h[:verbose] = ENV['VERBOSE'] unless ENV['VERBOSE'].nil?
            h[:repo_path] = ENV['REPO_PATH'] unless ENV['REPO_PATH'].nil?
          end

        # setup initial configuration
        CodeownerValidator.configure! @new_options

        @new_options
      end
# combination of options from input and environment variables
combination of options from input and environment variables
combination of options from input and environment variables
def options
        return @new_options if @new_options
        original_options = super
        @new_options =
          {}.tap do |h|
            original_options.each do |key, value|
              h[key.to_sym] = value
            end
            h[:verbose] = ENV['VERBOSE'] unless ENV['VERBOSE'].nil?
            h[:repo_path] = ENV['REPO_PATH'] unless ENV['REPO_PATH'].nil?
          end
        CodeownerValidator.configure! @new_options
        @new_options
      end
def options return @new_options if @new_options original_options = super @new_options = { } . tap do | h | original_options . each do | key , value | h [ key . to_sym ] = value end h [ :verbose ] = ENV [ 'VERBOSE' ] unless ENV [ 'VERBOSE' ] . nil? h [ :repo_path ] = ENV [ 'REPO_PATH' ] unless ENV [ 'REPO_PATH' ] . nil? end CodeownerValidator . configure! @new_options @new_options end
combination of options from input and environment variables
combination of options from input and environment variables
# add any environment variables as overrides # setup initial configuration