Sha256: e375068198879d1cedbbf4cb4305bf3d07fc2452440f813444e745c81c1ea51e

Contents?: true

Size: 883 Bytes

Versions: 14

Compression:

Stored size: 883 Bytes

Contents

class EcoRake
  module Lib
    module Task
      class RunnerLaunch < EcoRake::Lib::BaseTask
        FORWARD_RULES = {
          enviro:   ->(enviro) { "-#{enviro}"},
          simulate: '-simulate'
        }.freeze

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

        attr_const :target_enviro, required: true
        option_reopen :enviro, default_lookup: :target_enviro

        option_forwarding(**FORWARD_RULES)

        private

        def command(*args)
          cmd = [ruby_runner]
          cmd.push(*forward_options(:enviro, :simulate))
          cmd.push(*args)
          cmd = yield(cmd) if block_given?
          string_cmd(*cmd)
        end

        def people_get_command
          string_cmd(ruby_runner, forward_option(:enviro), '-get-people')
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
eco-rake-0.2.7 lib/eco-rake/lib/task/runner_launch.rb
eco-rake-0.2.6 lib/eco-rake/lib/task/runner_launch.rb
eco-rake-0.2.5 lib/eco-rake/lib/task/runner_launch.rb
eco-rake-0.2.4 lib/eco-rake/lib/task/runner_launch.rb
eco-rake-0.2.3 lib/eco-rake/lib/task/runner_launch.rb
eco-rake-0.2.2 lib/eco-rake/lib/task/runner_launch.rb
eco-rake-0.2.1 lib/eco-rake/lib/task/runner_launch.rb
eco-rake-0.2.0 lib/eco-rake/lib/task/runner_launch.rb
eco-rake-0.1.6 lib/eco-rake/lib/task/runner_launch.rb
eco-rake-0.1.5 lib/eco-rake/lib/task/runner_launch.rb
eco-rake-0.1.4 lib/eco-rake/lib/task/runner_launch.rb
eco-rake-0.1.3 lib/eco-rake/lib/task/runner_launch.rb
eco-rake-0.1.2 lib/eco-rake/lib/task/runner_launch.rb
eco-rake-0.1.1 lib/eco-rake/lib/task/runner_launch.rb