Class: AssLauncher::Enterprise::BinaryWrapper::ThinClient

Inherits:
ThickClient show all
Defined in:
lib/ass_launcher/enterprise/binary_wrapper.rb

Overview

Wrapper for 1C thin client binary

Examples:

cl = AssLauncher::Enterprise.thin_clients('~> 8.3.6').last
script = cl.script('File="path\\new.ib"')
ph = script.run # this waiting until process executing
# Fucking 1C: if infobase not exists will be opened GUI window
#for infobase choice!

cl = AssLauncher::Enterprise.thin_clients('~> 8.3.6').last
args = ['/F', 'path/to/file/infobase']
ph = cl.command(args).run # Fucking 1C: If infobase not exists
#will be opened GUI window with error info similar 'Inforamation base
#not found"

ph.wait # => waiting wile execiting
ph.result.exitstatus # => 0

# Uses Cli::ArgumentsBuilder:

conn_str = AssLauncher::Support::ConnectionString.\
  new('File="//host/infobase"')

command = cl.command do
  connection_string conn_str
  debug
  debuggerUrl 'localhost'
end
ph = command.run.wait # Fucking 1C: If infobase not exists
#will be opened GUI window with error info similar 'Inforamation base
#not found"

Constant Summary

Constants inherited from AssLauncher::Enterprise::BinaryWrapper

I386, V64_FILES, X86_64

Instance Attribute Summary

Attributes inherited from AssLauncher::Enterprise::BinaryWrapper

#path

Instance Method Summary collapse

Methods inherited from AssLauncher::Enterprise::BinaryWrapper

#<=>, #arch, #cli_spec, #exists?, #initialize, #major_v, #run_modes, run_modes, #version, #x86_64?

Methods included from Support::Platforms

cygwin?, env, glob, linux?, path, path_class, windows?

Constructor Details

This class inherits a constructor from AssLauncher::Enterprise::BinaryWrapper

Instance Method Details

#accepted_connstrArray<Symbol>

Define type of connection_string suitable for 1C binary

Returns:

  • (Array<Symbol>)


353
354
355
# File 'lib/ass_launcher/enterprise/binary_wrapper.rb', line 353

def accepted_connstr
  [:file, :server, :http]
end

#command(args = [], **options, &block) ⇒ AssLauncher::Support::Shell::Command

Note:

For correct pass cli parameters to 1C:Enterprise binary, you can passes block. Block will be eval in instance of Cli::ArgumentsBuilder. ArgumentsBuilder use Cli::CliSpec and verify parameters and prameters values. Also you can pass arguments directly, without verify, uses args array.

Note:

Command not wait while 1C:Enterprise execution. You can manipulate with many 1C clients runned at once.

Run 1C:Enterprise client as command.

Examples:


cl = AssLauncher::Enterprise.thin_clients('~> 8.3.6').last
args = ['/F', 'path/to/file/infobase']
ph = cl.command(args).run # Fucking 1C: If infobase not exists
#will be opened GUI window with error info similar 'Inforamation base
#not found"

ph.wait # => waiting wile execiting
ph.result.exitstatus # => 0

# Uses Cli::ArgumentsBuilder:

conn_str = AssLauncher::Support::ConnectionString.\
  new('File="//host/infobase"')

command = cl.command do
  connection_string conn_str
  debug
  debuggerUrl 'localhost'
end
ph = command.run.wait # Fucking 1C: If infobase not exists
#will be opened GUI window with error info similar 'Inforamation base
#not found"

Parameters:

  • options (Hash)

    a customizable set of options

  • args (Array) (defaults to: [])

    arguments for 1C binary

Options Hash (**options):

  • :assout_encoding (String)

    encoding for assoutput file. Default ‘cp1251’

  • :capture_assout (Boolean)

    capture assoutput. Default true

  • :silent_mode (Boolean)

    run 1C with /DisableStartupDialogs and /DisableStartupMessages parameters. Default true

Returns:



388
389
390
# File 'lib/ass_launcher/enterprise/binary_wrapper.rb', line 388

def command(args = [], **options, &block)
  super(:enterprise, args, options, &block)
end

#script(args = '', **options) ⇒ AssLauncher::Support::Shell::Script

Note:

It waiting for script execution.

Note:

It not use arguments builder and not expects of block. Arguments string make as you want

Run 1C:Enterprise client as cmd or shell script.

Examples:

cl = AssLauncher::Enterprise.thin_clients('~> 8.3.6').last
script = cl.script('File="path\\new.ib"')
ph = script.run # this waiting until process executing
# Fucking 1C: if infobase not exists will be opened GUI window
#for infobase choice!

Parameters:

  • options (Hash)

    a customizable set of options

  • args (String) (defaults to: '')

    string arguments for run 1C binary wrapped in cmd.exe or sh script like as: ‘/Arg1 “Value” /Arg2 “value”’

Options Hash (**options):

  • :assout_encoding (String)

    encoding for assoutput file. Default ‘cp1251’

  • :capture_assout (Boolean)

    capture assoutput. Default true

  • :silent_mode (Boolean)

    run 1C with /DisableStartupDialogs and /DisableStartupMessages parameters. Default true

Returns:



403
404
405
# File 'lib/ass_launcher/enterprise/binary_wrapper.rb', line 403

def script(args = '', **options)
  super(:enterprise, args, options)
end