d6f309ce22
Addresses: #412 Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
12 lines
466 B
Ruby
12 lines
466 B
Ruby
Array.wrap(command_options).map do |factory_options|
|
|
factory_method = factory_options.shift
|
|
begin
|
|
logger.debug "running #{factory_method}, #{factory_options}"
|
|
CypressOnRails::SmartFactoryWrapper.public_send(factory_method, *factory_options)
|
|
rescue StandardError => e
|
|
logger.error "#{e.class}: #{e.message}"
|
|
logger.error e.backtrace.join("\n")
|
|
logger.error e.record.inspect.to_s if e.is_a?(ActiveRecord::RecordInvalid)
|
|
raise e
|
|
end
|
|
end
|