Sha256: b14c04f6e09cafa588291248f1305bce31f3db4ae92225eea30fe4325c45b249

Contents?: true

Size: 623 Bytes

Versions: 2

Compression:

Stored size: 623 Bytes

Contents

# coding: utf-8
module Abak::Flow
  module Commands
    class Checkup
      include ANSI::Code

      def run(args, options)
        process(args, options)

        say green { Manager.locale.success(self) }
      end

      def process(args, options)
        inspector = Inspector.new(call_method: :valid?, collect_attribute: :errors)
        inspector.examine(Manager.configuration, Manager.repository).on_fail do |insp|
          say red { Manager.locale.error(self) }
          say yellow { insp.output }

          exit 100
        end
      end
    end # class Checkup
  end # module Commands
end # module Abak::Flow

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
abak-flow-1.1.1 lib/abak-flow/commands/checkup.rb
abak-flow-1.1.0 lib/abak-flow/commands/checkup.rb