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.13.9 lib/minke/tasks/task_runner.rb
minke-1.13.8 lib/minke/tasks/task_runner.rb
minke-1.13.7 lib/minke/tasks/task_runner.rb
minke-1.13.6 lib/minke/tasks/task_runner.rb
minke-1.13.5 lib/minke/tasks/task_runner.rb
minke-1.13.4 lib/minke/tasks/task_runner.rb
minke-1.13.3 lib/minke/tasks/task_runner.rb
minke-1.13.2 lib/minke/tasks/task_runner.rb
minke-1.13.1 lib/minke/tasks/task_runner.rb
minke-1.13.0 lib/minke/tasks/task_runner.rb
minke-1.12.9 lib/minke/tasks/task_runner.rb
minke-1.12.8 lib/minke/tasks/task_runner.rb
minke-1.12.7 lib/minke/tasks/task_runner.rb
minke-1.12.5 lib/minke/tasks/task_runner.rb
minke-1.12.4 lib/minke/tasks/task_runner.rb
minke-1.12.3 lib/minke/tasks/task_runner.rb
minke-1.12.2 lib/minke/tasks/task_runner.rb
minke-1.12.0 lib/minke/tasks/task_runner.rb
minke-1.11.9 lib/minke/tasks/task_runner.rb
minke-1.11.8 lib/minke/tasks/task_runner.rb