lib/assetify/asset.rb in assetify-0.4.0 vs lib/assetify/asset.rb in assetify-0.7.0.rc1

- old
+ new

@@ -23,12 +23,20 @@ @filename = Opt[:newname] ? name : url.split("/").last @filename += ".#{type}" unless @filename =~ /\.\w{1,6}$/ @filename end + def find_path_for txt + case txt + when /js/ then :javascripts + when /css|style/ then :stylesheets + else :images + end + end + def path args = if @to.empty? - tpath = Opt["#{type}path".to_sym] + tpath = Opt[find_path_for(type)] raise "Don`t know where to put #{type} files..." unless tpath [tpath, @ns ? @ns.to_s : ""] else [Dir.pwd, @to] end