lib/ehbrs/executables.rb in ehbrs-tools-0.3.1 vs lib/ehbrs/executables.rb in ehbrs-tools-0.5.0
- old
+ new
@@ -10,18 +10,19 @@
def env
::EacRubyUtils::Envs.local
end
- def floating_ips
- @floating_ips ||= env.executable('flips-linux', '--version')
- end
-
private
- %w[ffmpeg ffprobe].each do |command|
- define_method("#{command}_uncached") do
- env.executable(command, '-version')
+ {
+ '-version' => %w[ffmpeg ffprobe],
+ '--version' => %w[flips-linux wit]
+ }.each do |validate_arg, commands|
+ commands.each do |command|
+ define_method("#{command}_uncached") do
+ env.executable(command, validate_arg)
+ end
end
end
end
end
end