Class: Fig::Command::Action::RunCommandLine

Inherits:
Object
  • Object
show all
Includes:
Fig::Command::Action, Fig::Command::Action::Role::HasNoSubAction
Defined in:
lib/fig/command/action/run_command_line.rb

Constant Summary

Constants included from Fig::Command::Action

EXIT_FAILURE, EXIT_SUCCESS

Instance Attribute Summary

Attributes included from Fig::Command::Action

#execution_context

Instance Method Summary collapse

Methods included from Fig::Command::Action::Role::HasNoSubAction

#sub_action?

Methods included from Fig::Command::Action

#allow_both_descriptor_and_file?, #base_package_can_come_from_descriptor?, #cares_about_asset_options?, #execute_immediately_after_command_line_parse?, #list_dependencies?, #list_variables?, #prepare_repository, #primary_option, #publish?, #remote_operation_necessary?, #reset_environment?, #retrieves_should_happen?

Instance Method Details

#apply_base_config?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/fig/command/action/run_command_line.rb', line 38

def apply_base_config?()
  return true
end

#apply_config?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/fig/command/action/run_command_line.rb', line 34

def apply_config?()
  return true
end

#configure(options) ⇒ Object



42
43
44
45
46
47
# File 'lib/fig/command/action/run_command_line.rb', line 42

def configure(options)
  @command_line = options.shell_command
  @descriptor   = options.descriptor

  return
end

#descriptor_requirementObject



18
19
20
# File 'lib/fig/command/action/run_command_line.rb', line 18

def descriptor_requirement()
  return nil
end

#executeObject



49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/fig/command/action/run_command_line.rb', line 49

def execute()
  environment   = @execution_context.environment
  base_package  = @execution_context.base_package
  base_config   = @execution_context.base_config

  environment.expand_command_line(
    base_package, base_config, @descriptor, @command_line
  ) do
    |command| @execution_context.operating_system.plain_or_shell_exec command
  end

  # Will never get here.
end

#load_base_package?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/fig/command/action/run_command_line.rb', line 26

def load_base_package?()
  return true
end

#modifies_repository?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/fig/command/action/run_command_line.rb', line 22

def modifies_repository?()
  return false
end

#optionsObject



14
15
16
# File 'lib/fig/command/action/run_command_line.rb', line 14

def options()
  return %w<-->
end

#register_base_package?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/fig/command/action/run_command_line.rb', line 30

def register_base_package?()
  return true
end