lib/cms_scanner/finders/finder/enumerator.rb in cms_scanner-0.0.16 vs lib/cms_scanner/finders/finder/enumerator.rb in cms_scanner-0.0.17
- old
+ new
@@ -8,11 +8,11 @@
# @option opts [ Regexp ] :exclude_content
#
# @yield [ Typhoeus::Response, String ]
def enumerate(opts = {})
targets = target_urls(opts)
- bar = progress_bar(targets.size) if opts[:show_progression]
+ bar = progress_bar(targets.size, progress_bar_title) if opts[:show_progression]
targets.each do |url, id|
request = browser.forge_request(url, request_params)
request.on_complete do |res|
@@ -34,22 +34,9 @@
#
# @return [ Hash ]
def target_urls(_opts = {})
fail NotImplementedError
end
-
- # @param [ Integer ] total
- #
- # @return [ ProgressBar ]
- # :nocov:
- def progress_bar(total)
- ProgressBar.create(
- format: '%t %a <%B> (%c / %C) %P%% %e',
- title: progress_bar_title,
- total: total
- )
- end
- # :nocov:
# Progress Bar title to use, allow instance using this module
# to display a custom title if needed
#
# @return [ String ]