lib/massive_sitemap/writer/file.rb in massive_sitemap-2.0.0.rc3 vs lib/massive_sitemap/writer/file.rb in massive_sitemap-2.0.0.rc4

- old
+ new

@@ -11,13 +11,13 @@ OPTS = Base::OPTS.merge( :root => '.', :force_overwrite => false, :filename => "sitemap.xml", - :index_filename => "sitemap_index.xml", ) + protected def open_stream ::File.dirname(tmp_filename).tap do |dir| FileUtils.mkdir_p(dir) unless ::File.exists?(dir) end ::File.open(tmp_filename, 'w:ASCII-8BIT') @@ -37,12 +37,15 @@ true end def streams files.map do |path| - next if path.include?(options[:index_filename]) [::File.basename(path), ::File.stat(path).mtime] end.compact + end + + def stream + options[:filename] end private def filename ::File.join options[:root], options[:filename]