lib/tasks/billy.rake in puffing-billy-0.4.0 vs lib/tasks/billy.rake in puffing-billy-0.4.1

- old
+ new

@@ -1,5 +1,7 @@ +require 'addressable/uri' + namespace :cache do desc 'Print out all cache file information' task :print_all do cache_array = load_cache @@ -55,10 +57,10 @@ cache_path = Rails.root.join(cache_directory) cache_array = [] Dir.glob(cache_path+file_pattern) do |filename| data = load_cache_file(filename) - url = URI(data[:url]) + url = Addressable::URI.parse(data[:url]) data[:url_path] = "#{url.path}#{url.query ? '?'+url.query : ''}#{url.fragment ? '#'+url.fragment : ''}" data[:filename] = filename.gsub(Rails.root.to_s+'/','') cache_array << data end cache_array