Project

General

Profile

« Previous | Next » 

Revision a8ddf8e3

Added by Bryan Kearney almost 8 years ago

Fixes #16339 - Adds in string extraction and a couple of cleanups

View differences:

lib/hammer_cli_csv/import.rb
unless options_file_exists? options_file
if option_dir
return unless SUPPORTED_RESOURCES.include?(resource)
puts _("Skipping #{resource} because '#{options_file}' does not exist") if option_verbose?
puts _("Skipping %{resource} because '%{options_file}' does not exist") %
{:resource => resource, :options_file => options_file} if option_verbose?
return
end
raise "File for #{resource} '#{options_file}' does not exist"
end
puts _("Importing #{resource} from '#{options_file}'") if option_verbose?
puts _("Importing %{resource} from '%{options_file}'") %
{:resource => resource, :options_file => options_file} if option_verbose?
args = %W( csv #{resource.gsub('_', '-')} --file #{options_file} )
args << '-v' if option_verbose?

Also available in: Unified diff