lib/octopress-ink/assets/asset.rb in octopress-ink-1.0.0.alpha.17 vs lib/octopress-ink/assets/asset.rb in octopress-ink-1.0.0.alpha.18

- old
+ new

@@ -14,22 +14,23 @@ def file @file end def path(site) - unless @found_file + if @found_file and !@no_cache + @found_file + else files = [] files << user_path(site) files << plugin_path unless @plugin.type == 'local_plugin' files = files.flatten.reject { |f| !exists? f } unless files.size raise IOError.new "Could not find #{File.basename(@file)} at #{file}" end @found_file = Pathname.new files[0] end - @found_file end def file(file, site) @file = file path(site) @@ -50,10 +51,10 @@ def plugin_path File.join plugin_dir, @file end def user_dir(site) - File.join site.source, Plugins.custom_dir(site), @dir + File.join site.source, Plugins.custom_dir(site.config), @dir end def local_plugin_path(site) File.join site.source, @dir, @file end