lib/sitediff/api.rb in sitediff-1.2.0 vs lib/sitediff/api.rb in sitediff-1.2.1
- old
+ new
@@ -157,10 +157,16 @@
# Crawl with Hydra to discover paths.
hydra = Typhoeus::Hydra.new(
max_concurrency: @config.setting(:concurrency)
)
@paths = {}
- @config.roots.each do |tag, url|
+
+ ignoreAfter = @config.roots
+ if @config.roots['before'] == @config.roots['after']
+ ignoreAfter.delete('after')
+ end
+
+ ignoreAfter.each do |tag, url|
Crawler.new(
hydra,
url,
@config.setting(:interval),
@config.setting(:include),