lib/fontrobot/generator.rb in fontrobot-0.1.5 vs lib/fontrobot/generator.rb in fontrobot-0.1.6

- old
+ new

@@ -47,21 +47,11 @@ def normalize_name @name = (options.name) ? options.name.gsub(/\W/, '-').downcase : 'fontrobot' end def cleanup_output_dir - # simpler: how about we just delete everything in the dir? - # old_files = Dir[File.join(@output, '*')] - # old_files.each {|file| remove_file file } - old_files = ['fontrobot.css','fontrobot-ie7.css','test.html'] - old_name = 'fontrobot' - css = File.join(@output, old_files[0]) - if File.file?(css) - line = IO.readlines(css)[3] - old_name = line.match(/Path:([^-]+)/)[1].downcase - end - old_files.concat(Dir[File.join(old_name + '-*.{woff,ttf,eot,svg}')]) - old_files.each { |file| remove_file File.join(@output, file) } + old_files = Dir[File.join(@output, '*')] + old_files.each {|file| remove_file file } end def generate gem_file_path = File.expand_path(File.join(File.dirname(__FILE__)))