Skip to content

Instantly share code, notes, and snippets.

@ehlyzov
Created March 17, 2010 16:43
Show Gist options
  • Save ehlyzov/335439 to your computer and use it in GitHub Desktop.
Save ehlyzov/335439 to your computer and use it in GitHub Desktop.
def download
load_mascot_dat_file
unless File.exist?(@mascot_dat_file.source || '')
flash[:error] = "Couldn't find file #{@mascot_dat_file.source}"
redirect_to mascot_dat_files_path and return
end
send_file @mascot_dat_file.source
end
protected
def parse_mascot_dat_file(path,path_to_yml = nil)
path_to_yml ||= path + '.yml'
raise "Something wrong with running mascot2yml.jar" unless ShellWrapper.parse_mascot_dat_files(path, path_to_yml)
path_to_yml
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment