Skip to content

Commit

Permalink
Silence a couple of puts statements unless verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
kjvarga committed Nov 10, 2009
1 parent 34f9cc3 commit 015c95f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/sitemap_generator/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def ping_search_engines(sitemap_index)
puts "Successful ping of #{engine.to_s.titleize}" if verbose
end
rescue Timeout::Error, StandardError => e
puts "Ping failed for #{engine.to_s.titleize}: #{e.inspect}"
puts <<-END if engine == :yahoo
puts "Ping failed for #{engine.to_s.titleize}: #{e.inspect}" if verbose
puts <<-END if engine == :yahoo && verbose
Yahoo requires an 'AppID' for more than one ping per "timeframe", you can either:
- remove yahoo from the ping list (config/sitemap.rb):
SitemapGenerator::Sitemap.yahoo_app_id = false
Expand Down
2 changes: 1 addition & 1 deletion tasks/sitemap_generator_tasks.rake
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace :sitemap do
Zlib::GzipWriter.open(filename) do |gz|
gz.write buffer
end
puts "+ #{filename}" unless ENV['SILENT'].present?
puts "+ #{filename}" if verbose
puts "** Sitemap Index too big! The uncompressed size exceeds 10Mb" if (buffer.size > 10 * 1024 * 1024) && verbose

stop_time = Time.now
Expand Down

0 comments on commit 015c95f

Please sign in to comment.