Class: Fig::Command::Action::ListRemote

Inherits:
Object
  • Object
show all
Includes:
Fig::Command::Action, Role::HasNoSubAction
Defined in:
lib/fig/command/action/list_remote.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?, #apply_config?, #base_package_can_come_from_descriptor?, #cares_about_asset_options?, #configure, #execute_immediately_after_command_line_parse?, #list_dependencies?, #list_variables?, #prepare_repository, #primary_option, #publish?, #register_base_package?, #reset_environment?, #retrieves_should_happen?

Instance Method Details

#descriptor_requirementObject



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

def descriptor_requirement()
  return :warn
end

#executeObject



34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/fig/command/action/list_remote.rb', line 34

def execute()
  packages = @execution_context.repository.list_remote_packages

  if packages.empty?
    if $stdout.tty?
      puts 'No remote packages exist.'
    end
  else
    packages.sort.each {|item| puts item}
  end

  return EXIT_SUCCESS
end

#load_base_package?Boolean

Returns:

  • (Boolean)


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

def load_base_package?()
  return nil # Don't care.
end

#modifies_repository?Boolean

Returns:

  • (Boolean)


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

def modifies_repository?()
  return false
end

#optionsObject



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

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

#remote_operation_necessary?Boolean

Returns:

  • (Boolean)


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

def remote_operation_necessary?()
  return true
end