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

Inherits:
SubCommand
  • Object
show all
Includes:
BinaryWrapper, 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, #thins, #web_client

Methods included from BinaryWrapper

#binary_wrapper, #dry_run, #run_enterprise, #vrequrement

Methods included from ClientMode

#client, #mode, #parrent_command

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.



796
797
798
# File 'lib/ass_launcher/cmd.rb', line 796

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.



792
793
794
# File 'lib/ass_launcher/cmd.rb', line 792

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.



800
801
802
803
804
805
806
# File 'lib/ass_launcher/cmd.rb', line 800

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



826
827
828
829
# File 'lib/ass_launcher/cmd.rb', line 826

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



809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
# File 'lib/ass_launcher/cmd.rb', line 809

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_
    _AppAutoCheckVersion(:-) if Gem::Requirement.new('>= 8.3.8')
      .satisfied_by? binary_wrapper.version
  end
  cmd
end