Class: AssLauncher::Cmd::Abstract::Run Private

Inherits:
SubCommand
  • Object
show all
Includes:
BinaryWrapper, Option::Arch, Option::DryRun, Option::Password, Option::Raw, Option::SearchPath, Option::Uc, Option::User, Option::Version, ParseIbPath
Defined in:
lib/ass_launcher/cmd.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Abstarct run command

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ParseIbPath

#connection_string, #parse_tcp_path

Methods included from Api

#cs, #cs_file, #cs_http, #cs_srv, #load_v8i, #ole, #thicks, #thicks_i386, #thicks_x86_64, #thins, #thins_i386, #thins_x86_64, #web_client

Methods included from BinaryWrapper

#binary_wrapper, #dry_run, included, #run_enterprise, #vrequrement

Methods included from ClientMode

#client, #mode, #parrent_command

Methods included from Option::Arch

#arch_any?, #expected_archs, included, #x86_64?

Methods included from Option::Raw

included, #parse_raw, #raw_param

Methods included from Option::Uc

included

Methods included from Option::Password

included

Methods included from Option::User

included

Methods included from Option::SearchPath

included

Methods included from Option::DryRun

included

Methods included from Option::Version

included

Methods included from SubCommand::Declaration

#declare_subcommands, #subcommand_

Class Method Details

._bannerObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



842
843
844
# File 'lib/ass_launcher/cmd.rb', line 842

def self._banner
  'run 1C:Enterprise'
end

.command_nameObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



838
839
840
# File 'lib/ass_launcher/cmd.rb', line 838

def self.command_name
  'run'
end

Instance Method Details

#command_(&block) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



846
847
848
849
850
851
852
# File 'lib/ass_launcher/cmd.rb', line 846

def command_(&block)
  if client == :thin
    binary_wrapper.command((raw_param.flatten || []), &block)
  else
    binary_wrapper.command(mode, (raw_param.flatten || []), &block)
  end
end

#executeObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

rubocop:enable Metrics/MethodLength



870
871
872
873
# File 'lib/ass_launcher/cmd.rb', line 870

def execute
  cmd = run_enterprise(make_command)
  puts Colorize.green(cmd.process_holder.result.assout) unless dry_run?
end

#make_commandObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

rubocop:disable Metrics/MethodLength



855
856
857
858
859
860
861
862
863
864
865
866
867
# File 'lib/ass_launcher/cmd.rb', line 855

def make_command
  usr = user
  pass = password
  uc_ = uc
  cs = connection_string
  cmd = command_ do
    connection_string cs
    _N usr if usr
    _P pass if pass
    _UC uc_ if uc_
  end
  cmd
end