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
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, #thins, #web_client
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.
151 152 153 154 |
# File 'lib/ass_launcher/cmd.rb', line 151 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
179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/ass_launcher/cmd.rb', line 179 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.
194 195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/ass_launcher/cmd.rb', line 194 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, cmd.process_holder.result.exitstatus) 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.
161 162 163 164 165 166 167 168 |
# File 'lib/ass_launcher/cmd.rb', line 161 def vrequrement return '' unless version case version.segments.size when 3 then "~> #{version}.0" when 2 then "~> #{version}.0" else "= #{version}" end end |