Sha256: 0cfcc940eb58e3b06431f37d76c916289a9196855e7b94f046bf29565c40bfa2

Contents?: true

Size: 821 Bytes

Versions: 28

Compression:

Stored size: 821 Bytes

Contents

module Minke
  module Tasks
    class TaskRunner

      def initialize args
        @rake_helper       = args[:rake_helper]
        @copy_helper       = args[:copy_helper]
        @service_discovery = args[:service_discovery]
      end

      ##
      # execute the defined steps in the given Minke::Config::TaskRunSettings
      def run_steps steps
        execute_rake_tasks steps.tasks unless steps.tasks == nil
        copy_assets steps.copy unless steps.copy == nil
      end

      private
      ##
      # execute an array of rake tasks
      def execute_rake_tasks tasks
        tasks.each { |t| @rake_helper.invoke_task t }
      end

      ##
      # copys the assets defined in the step
      def copy_assets assets
        assets.each { |a| @copy_helper.copy_assets a.from, a.to }
      end

    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
minke-1.11.7 lib/minke/tasks/task_runner.rb
minke-1.11.6 lib/minke/tasks/task_runner.rb
minke-1.11.5 lib/minke/tasks/task_runner.rb
minke-1.11.4 lib/minke/tasks/task_runner.rb
minke-1.11.3 lib/minke/tasks/task_runner.rb
minke-1.11.2 lib/minke/tasks/task_runner.rb
minke-1.11.1 lib/minke/tasks/task_runner.rb
minke-1.11.0 lib/minke/tasks/task_runner.rb