Class: AssLauncher::Cmd::Main::SubCommands::MakeIb Private
- Inherits:
-
Abstract::SubCommand
- Object
- Clamp::Command
- Abstract::SubCommand
- AssLauncher::Cmd::Main::SubCommands::MakeIb
- Includes:
- Abstract::BinaryWrapper, Abstract::Option::Arch, Abstract::Option::Dbms, Abstract::Option::Dbsrv, Abstract::Option::DryRun, Abstract::Option::Esrv, Abstract::Option::Pattern, Abstract::Option::SearchPath, Abstract::Option::Version, Abstract::Parameter::IB_PATH_NAME
- Defined in:
- lib/ass_launcher/cmd/makeib.rb
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.
Instance Attribute Summary
Attributes included from Abstract::Option::Esrv
#esrv_host, #esrv_pass, #esrv_user
Attributes included from Abstract::Option::Dbsrv
#dbsrv_host, #dbsrv_pass, #dbsrv_user
Class Method Summary collapse
- ._banner ⇒ Object private
- .command_name ⇒ Object private
Instance Method Summary collapse
- #_verify_required_option_ ⇒ Object private
-
#connection_string ⇒ Object
private
rubocop:disable Metrics/MethodLength, Metrics/AbcSize.
- #execute ⇒ Object private
-
#make_command ⇒ Object
private
rubocop:enable Metrics/MethodLength, Metrics/AbcSize.
Methods included from Abstract::BinaryWrapper
#binary_wrapper, #dry_run, included, #run_enterprise, #vrequrement
Methods included from Abstract::ClientMode
#client, #mode, #parrent_command
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 Abstract::Option::Arch
#arch_any?, #expected_archs, included, #x86_64?
Methods included from Abstract::Option::SearchPath
Methods included from Abstract::Option::DryRun
Methods included from Abstract::Option::Version
Methods included from Abstract::Option::Pattern
Methods included from Abstract::Option::Esrv
Methods included from Support::SrvStrParser
Methods included from Abstract::Option::Dbsrv
Methods included from Abstract::Option::Dbms
Methods included from Abstract::Parameter::IB_PATH_NAME
Methods included from Abstract::SubCommand::Declaration
#declare_subcommands, #subcommand_
Class Method Details
._banner ⇒ 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.
22 23 24 |
# File 'lib/ass_launcher/cmd/makeib.rb', line 22 def self. 'Make new information base' end |
.command_name ⇒ 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.
18 19 20 |
# File 'lib/ass_launcher/cmd/makeib.rb', line 18 def self.command_name 'makeib' end |
Instance Method Details
#_verify_required_option_ ⇒ 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.
58 59 60 61 62 63 64 65 66 67 |
# File 'lib/ass_launcher/cmd/makeib.rb', line 58 def _verify_required_option_ %w{esrv dbsrv}.each do |oname| next unless send(oname).to_s.empty? opt = self.class..find do |o| o.attribute_name == oname end signal_usage_error Clamp .(:option_required, :option => opt.switches.first) end end |
#connection_string ⇒ 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.
rubocop:disable Metrics/MethodLength, Metrics/AbcSize
27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/ass_launcher/cmd/makeib.rb', line 27 def connection_string return cs_file(file: ib_path) if dbms == 'File' cs = cs_srv(srvr: esrv_host, ref: ib_path) cs.dbms = dbms cs.dbsrvr = dbsrv_host cs.db = ib_path cs.dbuid = dbsrv_user cs.dbpwd = dbsrv_pass cs.crsqldb = 'Y' cs.susr = esrv_user cs.spwd = esrv_pass cs end |
#execute ⇒ 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.
51 52 53 54 55 56 |
# File 'lib/ass_launcher/cmd/makeib.rb', line 51 def execute _verify_required_option_ unless dbms =~ %r{^File$}i cmd = run_enterprise(make_command) puts Colorize.green(cmd.process_holder.result.assout) unless\ dry_run? end |
#make_command ⇒ 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.
rubocop:enable Metrics/MethodLength, Metrics/AbcSize
42 43 44 45 46 47 48 49 |
# File 'lib/ass_launcher/cmd/makeib.rb', line 42 def make_command cs = connection_string template = pattern binary_wrapper.command(:createinfobase) do connection_string cs useTemplate template if template end end |