Created
March 17, 2010 16:43
-
-
Save ehlyzov/335439 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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