Class: Fig::Command::Action::DumpPackageDefinitionForCommandLine

Inherits:
Object
  • Object
show all
Includes:
Fig::Command::Action, Role::HasNoSubAction
Defined in:
lib/fig/command/action/dump_package_definition_for_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 Role::HasNoSubAction

#sub_action?

Methods included from Fig::Command::Action

#allow_both_descriptor_and_file?, #apply_base_config?, #base_package_can_come_from_descriptor?, #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_config?Boolean

Returns:

  • (Boolean)

39
40
41
# File 'lib/fig/command/action/dump_package_definition_for_command_line.rb', line 39

def apply_config?()
  return nil # don't care
end

#cares_about_asset_options?Boolean

Returns:

  • (Boolean)

23
24
25
# File 'lib/fig/command/action/dump_package_definition_for_command_line.rb', line 23

def cares_about_asset_options?()
  return true
end

#configure(options) ⇒ Object


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

def configure(options)
  @environment_statements = options.environment_statements
  @asset_statements       = options.asset_statements

  return
end

#descriptor_requirementObject


19
20
21
# File 'lib/fig/command/action/dump_package_definition_for_command_line.rb', line 19

def descriptor_requirement()
  return nil
end

#executeObject


50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/fig/command/action/dump_package_definition_for_command_line.rb', line 50

def execute()
  text_assembler = Fig::PackageDefinitionTextAssembler.new :emit_as_input
  text_assembler.add_output @asset_statements
  text_assembler.add_output [
    Fig::Statement::Configuration.new(
      nil,
      nil,
      Fig::Package::DEFAULT_CONFIG,
      @environment_statements
    )
  ]

  unparsed, * = text_assembler.assemble_package_definition
  print unparsed

  return EXIT_SUCCESS
end

#load_base_package?Boolean

Returns:

  • (Boolean)

31
32
33
# File 'lib/fig/command/action/dump_package_definition_for_command_line.rb', line 31

def load_base_package?()
  return true
end

#modifies_repository?Boolean

Returns:

  • (Boolean)

27
28
29
# File 'lib/fig/command/action/dump_package_definition_for_command_line.rb', line 27

def modifies_repository?()
  return false
end

#optionsObject


15
16
17
# File 'lib/fig/command/action/dump_package_definition_for_command_line.rb', line 15

def options()
  return %w<--dump-package-definition-for-command-line>
end

#register_base_package?Boolean

Returns:

  • (Boolean)

35
36
37
# File 'lib/fig/command/action/dump_package_definition_for_command_line.rb', line 35

def register_base_package?()
  return nil # don't care
end