Module: AssLauncher::Cmd::Abstract::BinaryWrapper Private
- Includes:
- Api, ClientMode
- Included in:
- Run, Main::SubCommands::MakeIb
- Defined in:
- lib/ass_launcher/cmd.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Mixin
Class Method Summary collapse
- .included(base) ⇒ Object private
Instance Method Summary collapse
- #binary_wrapper ⇒ Object private
-
#dry_run(cmd) ⇒ Object
private
rubocop:disable all.
- #run_enterprise(cmd) ⇒ Object private
- #vrequrement ⇒ Object private
Methods included from 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
Class Method Details
.included(base) ⇒ 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.
151 152 153 154 |
# File 'lib/ass_launcher/cmd.rb', line 151 def self.included(base) fail "#{base} must include Option::Arch module before include"\ ' BinaryWrapper' unless base.include? Option::Arch end |
Instance Method Details
#binary_wrapper ⇒ 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.
156 157 158 159 |
# File 'lib/ass_launcher/cmd.rb', line 156 def binary_wrapper binary_get || (fail Clamp::ExecutionError .new(, invocation_path, 1)) end |
#dry_run(cmd) ⇒ 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 all
198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/ass_launcher/cmd.rb', line 198 def dry_run(cmd) r = "#{cmd.cmd.gsub(' ', '\\ ')} " if mode == :createinfobase r << cmd.args.join(' ') else r << cmd.args.map do |a| unless a =~ %r{^(/|-|'|"|DESIGNER|ENTERPRISE)} "\'#{a}\'" unless a.to_s.empty? else a end end.join(' ') end end |
#run_enterprise(cmd) ⇒ 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.
213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/ass_launcher/cmd.rb', line 213 def run_enterprise(cmd) if respond_to?(:dry_run?) && dry_run? puts Colorize.yellow(dry_run(cmd)) else begin cmd.run.wait.result.verify! rescue AssLauncher::Support::Shell::RunAssResult::RunAssError => e raise Clamp::ExecutionError.new(e., invocation_path, 1) end end cmd end |
#vrequrement ⇒ 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.
166 167 168 169 170 171 172 173 |
# File 'lib/ass_launcher/cmd.rb', line 166 def vrequrement return '' unless version case version.segments.size when 3 then "~> #{version}.0" when 2 then "~> #{version}.0" else "= #{version}" end end |