Class: Aspera::Cli::Plugins::Httpgw

Inherits:
Base
  • Object
show all
Defined in:
lib/aspera/cli/plugins/httpgw.rb

Constant Summary

Constants inherited from Base

Base::FILTER_ARGS

Instance Attribute Summary

Attributes inherited from Base

#context, #help_path

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#action_for, #add_manual_header, application_name, #bulk_result, command, command_registry, commands_under, #config, crud_commands, declare_options, define_action_method, #dispatch_child, #dispatch_from_registry, #dispatch_leaf, #entity_create, #entity_delete, entity_display_name, #entity_list, #entity_modify, #entity_res_path, #entity_show, #execute_action, #execute_leaf, file_matcher, #formatter, #generate_help, #http_config, #invoke_action, option, #options, #persistency, #presets, #progress_bar, #query_read_delete, #resolve_argument, root_setup, #transfer, use_options, used_option_sources

Constructor Details

#initialize(**_) ⇒ Httpgw

Returns a new instance of Httpgw.



55
56
57
58
# File 'lib/aspera/cli/plugins/httpgw.rb', line 55

def initialize(**_)
  super
  options.parse_options!
end

Class Method Details

.detect(base_url) ⇒ Hash, NilClass

Returns:



16
17
18
19
20
21
22
23
24
# File 'lib/aspera/cli/plugins/httpgw.rb', line 16

def detect(base_url)
  api = Api::Httpgw.new(url: base_url)
  api_info = api.info
  return {
    url:     api.base_url,
    version: api_info['version']
  } if api_info.is_a?(Hash) && api_info.key?('download_endpoint')
  return
end

Instance Method Details

#wizard(wizard, app_url) ⇒ Hash

Returns :preset_value, :test_args.

Parameters:

  • wizard (Wizard)

    The wizard object

  • app_url (String)

    Tested URL

Returns:

  • (Hash)

    :preset_value, :test_args



30
31
32
33
34
35
36
37
# File 'lib/aspera/cli/plugins/httpgw.rb', line 30

def wizard(wizard, app_url)
  return {
    preset_value: {
      url: app_url
    },
    test_args:    'info'
  }
end