bin/todidnt in todidnt-0.0.0 vs bin/todidnt in todidnt-0.1.0
- old
+ new
@@ -1,21 +1,26 @@
#!/usr/bin/env ruby
require 'optparse'
+require 'todidnt'
-require_relative '../lib/todidnt'
-
options = {:path => '.'}
+command = ARGV.shift
+
ARGV.options do |opts|
opts.on('-p', '--path PATH', 'Git directory to run Todidnt in (default: current directory)') do |path|
options[:path] = path
end
+ opts.on('-d', '--date STRING', 'Fuzzy string for overdue date comparison, e.g. last week or 7/2/2013 (default: today)') do |date|
+ options[:date] = date
+ end
+
opts.on_tail('-h', '--help', 'Show this message') do
puts opts
exit
end
opts.parse!
end
-Todidnt::Runner.start(options)
+Todidnt::CLI.run(command, options)