Module: AssLauncher::Enterprise
- Extended by:
- Support::Platforms
- Defined in:
- lib/ass_launcher/enterprise.rb,
lib/ass_launcher/enterprise/cli.rb,
lib/ass_launcher/enterprise/ole.rb,
lib/ass_launcher/enterprise/cli_def.rb,
lib/ass_launcher/enterprise/web_client.rb,
lib/ass_launcher/enterprise/cli/spec_dsl.rb,
lib/ass_launcher/enterprise/binary_wrapper.rb,
lib/ass_launcher/enterprise/cli/parameters.rb,
lib/ass_launcher/enterprise/cli_defs_loader.rb,
lib/ass_launcher/enterprise/ole/ole_binaries.rb,
lib/ass_launcher/enterprise/cli/binary_matcher.rb,
lib/ass_launcher/enterprise/cli/arguments_builder.rb,
lib/ass_launcher/enterprise/cli/spec_dsl/dsl_helpers.rb
Overview
1C:Entrprise platform abstraction layer
Defined Under Namespace
Modules: Cli, CliDef, CliDefsLoader, Ole Classes: BinaryWrapper, WebClient
Constant Summary collapse
- WIN_BINARIES =
{ BinaryWrapper::ThinClient => '1cv8c.exe', BinaryWrapper::ThickClient => '1cv8.exe' }.freeze
- LINUX_BINARIES =
{ BinaryWrapper::ThinClient => '1cv8c', BinaryWrapper::ThickClient => '1cv8' }.freeze
Class Method Summary collapse
- .binaries(klass) ⇒ Object private
-
.binary_wrappers_cache ⇒ Hash
private
Caching BinaryWrapper instances.
-
.clear_glob_cache ⇒ Object
Cliar Enterprise.glob_cache.
-
.glob_cache ⇒ Hash
private
Find binaries in Cygwin work slow.
-
.search_paths ⇒ Array<String>
Return paths for searching instaled 1C platform.
-
.thick_clients(requiremet = '') ⇒ Array<BinaryWrapper::ThickClient>
Return array of wrappers for 1C platform(thick client) executables found in Enterprise.search_paths.
-
.thin_clients(requiremet = '') ⇒ Array<BinaryWrapper::ThinClient>
Return array of wrappers for 1C thin client executables found in Enterprise.search_paths.
- .web_client(uri = nil, version = nil) ⇒ AssLauncher::Enterprise::WebClient
Methods included from Support::Platforms
cygwin?, env, glob, path, path_class, windows?
Class Method Details
.binaries(klass) ⇒ 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.
52 53 54 55 56 57 58 |
# File 'lib/ass_launcher/enterprise.rb', line 52 def self.binaries(klass) if windows_or_cygwin? WIN_BINARIES[klass] elsif linux? LINUX_BINARIES[klass] end end |
.binary_wrappers_cache ⇒ Hash
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.
Caching BinaryWrapper instances
63 64 65 |
# File 'lib/ass_launcher/enterprise.rb', line 63 def self.binary_wrappers_cache @binary_wrappers_cache ||= {} end |
.clear_glob_cache ⇒ Object
Cliar glob_cache
121 122 123 |
# File 'lib/ass_launcher/enterprise.rb', line 121 def self.clear_glob_cache @glob_cache = nil end |
.glob_cache ⇒ Hash
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.
Find binaries in Cygwin work slow. For rapid get binaries uses catch
116 117 118 |
# File 'lib/ass_launcher/enterprise.rb', line 116 def self.glob_cache @glob_cache ||= {} end |
.search_paths ⇒ Array<String>
-
For Windows return value of ‘Program Files’ env.
-
For Linux return ‘/opt/1C’
-
In both cases you can set Configuration#search_path and it will be added into array
Return paths for searching instaled 1C platform
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/ass_launcher/enterprise.rb', line 40 def self.search_paths sp = [] sp << AssLauncher.config.search_path if windows_or_cygwin? sp += platform.env[/\Aprogram\s*files.*/i].uniq.map { |pf| "#{pf}/1c*" } elsif linux? sp += %w(/opt/1C /opt/1c) end sp.compact.uniq end |
.thick_clients(requiremet = '') ⇒ Array<BinaryWrapper::ThickClient>
Return array of wrappers for 1C platform(thick client) executables found in search_paths
99 100 101 102 103 |
# File 'lib/ass_launcher/enterprise.rb', line 99 def self.thick_clients(requiremet = '') find_clients(BinaryWrapper::ThickClient).map do |c| c if requiremet?(c, requiremet) end.compact end |
.thin_clients(requiremet = '') ⇒ Array<BinaryWrapper::ThinClient>
Return array of wrappers for 1C thin client executables found in search_paths
89 90 91 92 93 |
# File 'lib/ass_launcher/enterprise.rb', line 89 def self.thin_clients(requiremet = '') find_clients(BinaryWrapper::ThinClient).map do |c| c if requiremet?(c, requiremet) end.compact end |
.web_client(uri = nil, version = nil) ⇒ AssLauncher::Enterprise::WebClient
108 109 110 |
# File 'lib/ass_launcher/enterprise.rb', line 108 def self.web_client(uri = nil, version = nil) WebClient.new(uri, version) end |