Skip to content

Commit

Permalink
Add param validation on help and repl commands
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborbata committed Mar 3, 2021
1 parent e61cbd8 commit af526db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions bin/todo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,10 @@ def execute(arguments)
raise action + ' command requires exactly one parameter' if args.length != 1
show(args.first.to_i)
when 'help'
raise action + ' command has no parameters' if args.length > 0
puts usage
when 'repl'
raise action + ' command has no parameters' if args.length > 0
start_repl
else
list(nil, arguments)
Expand Down
4 changes: 2 additions & 2 deletions todo.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Gem::Specification.new do |s|
s.name = 'todo-jsonl'
s.version = '0.1.20'
s.date = '2021-03-02'
s.version = '0.1.21'
s.date = '2021-03-03'
s.summary = 'todo list manager inspired by todo.txt using the jsonl format'
s.authors = ['Gabor Bata']
s.homepage = 'https://github.com/gaborbata/todo'
Expand Down

0 comments on commit af526db

Please sign in to comment.