lib/massive_sitemap.rb in massive_sitemap-2.0.0.rc4 vs lib/massive_sitemap.rb in massive_sitemap-2.0.0.rc5
- old
+ new
@@ -45,13 +45,13 @@
raise ArgumentError, %Q(":max_urls" must be greater than #{NUM_URLS.min} and smaller than #{NUM_URLS.max})
end
@options[:writer] = Writer::GzipFile if @options[:gzip]
- @writer = @options[:writer].new @options
+ @writer = @options.delete(:writer).new @options
Builder::Rotating.generate(@writer, @options, &block)
- @writer.init!(:filename => @options[:index_filename], :force_overwrite => true)
+ @writer.set(:filename => @options[:index_filename])
Builder::Index.generate(@writer, @options.merge(:url => @options[:index_url]))
end
end
module_function :generate