Module: Paperclip::Commands::Runner

Extended by:
Runner
Included in:
Runner
Defined in:
lib/paperclip/commands/runner.rb

Instance Method Summary collapse

Instance Method Details

#run(command, path = nil, arguments = nil, interpolation_values = {}, local_options = {}) ⇒ Object



8
9
10
11
12
13
14
15
16
17
# File 'lib/paperclip/commands/runner.rb', line 8

def run(command, path = nil, arguments = nil, interpolation_values = {}, local_options = {})
  if Paperclip.logging? && (Paperclip.options[:log_command] || local_options[:log_command])
    local_options = local_options.merge(logger: Paperclip.logger)
  end

  binary = resolve_binary(command, path)

  Terrapin::CommandLine.new(binary, arguments, local_options)
                       .run(interpolation_values)
end