bin/seo_checker in seo_checker-0.2.3 vs bin/seo_checker in seo_checker-0.2.4
- old
+ new
@@ -2,13 +2,13 @@
require 'optparse'
require File.expand_path(File.dirname(__FILE__) + "/../lib/seo_checker")
options = {}
-OptionParser.new do |opts|
+opts = OptionParser.new do |opts|
opts.banner = "Usage: seo_checker [OPTIONS] website_url"
-
+
opts.on('-b', '--batch BATCH_SIZE', 'get a batch size of pages') do |batch|
options[:batch_size] = batch
end
opts.on('-i', '--interval INTERVAL_TIME', 'interval time between two batches') do |interval|
@@ -23,9 +23,14 @@
puts opts
exit
end
opts.parse!
+end
+
+if ARGV.empty?
+ puts opts.help
+ exit
end
checker = SEOChecker.new(ARGV[0], options)
checker.check