Sha256: 3d0018f54aec3aeb9969040a6bed51a2d86314d5721a6d137901cfb2e4b685a9

Contents?: true

Size: 614 Bytes

Versions: 1

Compression:

Stored size: 614 Bytes

Contents

# frozen_string_literal: true

require 'simple_command'
require 'quicken'

module Quicken
  module Commands
    class Run
      prepend SimpleCommand

      def initialize recipe_path
        @parser = Quicken::Parser.new recipe_path
      end

      def call
        config = @parser.parse
        @runner = Quicken::Runner.new config
        LOGGER.debug(:runner) { "Running with config #{config.inspect}" }
        @runner.run
      rescue Errno::ENOENT => e
        errors.add(:file_not_found, e.message)
      rescue Quicken::Error => e
        errors.add(e.error_name, e.message)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
quicken-ruby-0.1.1 lib/quicken/commands/run.rb