Browse files

Gzipped files now include indents and newlines as it aids in debuggin…

…g and doesn't affect the final file size too much
  • Loading branch information...
1 parent c30b881 commit 490eebacbc6df1f829fae17e6db4baa9dd87c4ea @alexrabarts committed Oct 20, 2011
Showing with 5 additions and 3 deletions.
  1. +4 −0 History.txt
  2. +1 −1 lib/big_sitemap.rb
  3. +0 −2 lib/big_sitemap/builder.rb
View
4 History.txt
@@ -1,3 +1,7 @@
+===
+
+* Gzipped files now include indents and newlines
+
=== 0.8.4 / 20011-10-20
* Fixes an issue where joins where causing ambiguous "id" column
View
2 lib/big_sitemap.rb
@@ -276,7 +276,7 @@ def with_sitemap(name, options={})
options[:type] ||= 'sitemap'
options[:max_urls] ||= @options["max_per_#{options[:type]}".to_sym]
options[:gzip] ||= @options[:gzip]
- options[:indent] = options[:gzip] ? 0 : 2
+ options[:indent] ||= 2
sitemap = if options[:type] == 'index'
IndexBuilder.new(options)
View
2 lib/big_sitemap/builder.rb
@@ -131,12 +131,10 @@ def _close_document
end
def _indent
- return if @gzip
target!.print " " * @level
end
def _newline
- return if @gzip
target!.puts ''
end
end

0 comments on commit 490eeba

Please sign in to comment.