SitemapGenerator is a framework-agnostic XML Sitemap generator written in Ruby with automatic Rails integration. It supports Video, News, Image, Mobile, PageMap and Alternate Links sitemap extensions and includes Rake tasks for managing your sitemaps, as well as many other great features.
MIT License
2.45k
stars
277
forks
source link
SitemapGenerator.verbose = false does not seem to work #332
It looks like I should be able to disable this with SitemapGenerator.verbose = false. But this does not work, the output is still there.
Debugging... the verbose flag is somehow being set to <Object:0x00007fc92aa54470>, what? Trying to debug this, there's a lot of abstract indirection making it hard....
It's getting that verbose value from Rake itself. Indeed I am testing by running Rake::Task["sitemap:create"].invoke
So it appears when running the rake task, the rake setting for "verbose" takes priority, and SitemapGenerator.verbose is ignored. OK, that could be intended?
I have an automated test of my sitemap generation.
This causes the sitemap_generator output to annoyingly show up in the middle of my test output, when I run tests over that. Eg.
It looks like I should be able to disable this with
SitemapGenerator.verbose = false
. But this does not work, the output is still there.Debugging... the
verbose
flag is somehow being set to<Object:0x00007fc92aa54470>
, what? Trying to debug this, there's a lot of abstract indirection making it hard....Aha, right here:
https://github.com/kjvarga/sitemap_generator/blob/92c612cf53eebd9827a204867c0f2b5618264263/lib/sitemap_generator/tasks.rb#L51
It's getting that
verbose
value from Rake itself. Indeed I am testing by runningRake::Task["sitemap:create"].invoke
So it appears when running the rake task, the rake setting for "verbose" takes priority, and
SitemapGenerator.verbose
is ignored. OK, that could be intended?