Sha256: cf88f8b1145606e11449cbe04a3607f1b47b2227e66698355e77c2be426bd3c5

Contents?: true

Size: 854 Bytes

Versions: 10

Compression:

Stored size: 854 Bytes

Contents

class EcoRake
  module Lib
    module Task
      class RunnerRely < EcoRake::Lib::BaseTask
        FORWARD_RULES = {
          simulate: :mirror,
          task:     :mirror
        }.freeze

        options_with_defaults true
        options_use EcoRake::Lib::Task::RunnerOptions

        option_forwarding(**FORWARD_RULES)

        def task(*_args)
          sh_continue command
        end

        private

        def command
          cmd  = [base_command]
          cmd << target_task
          cmd << '--'
          cmd << forward_option(:task)
          cmd << forward_option(:simulate)
          string_cmd(*cmd)
        end

        def base_command
          "rake"
        end

        def target_task
          raise "In a hub you should re-write this method"
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
eco-rake-0.2.3 lib/eco-rake/lib/task/runner_rely.rb
eco-rake-0.2.2 lib/eco-rake/lib/task/runner_rely.rb
eco-rake-0.2.1 lib/eco-rake/lib/task/runner_rely.rb
eco-rake-0.2.0 lib/eco-rake/lib/task/runner_rely.rb
eco-rake-0.1.6 lib/eco-rake/lib/task/runner_rely.rb
eco-rake-0.1.5 lib/eco-rake/lib/task/runner_rely.rb
eco-rake-0.1.4 lib/eco-rake/lib/task/runner_rely.rb
eco-rake-0.1.3 lib/eco-rake/lib/task/runner_rely.rb
eco-rake-0.1.2 lib/eco-rake/lib/task/runner_rely.rb
eco-rake-0.1.1 lib/eco-rake/lib/task/runner_rely.rb