todo-jsonl 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/bin/todo.rb +19 -10
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 7aab10deef9e956db5b18eaed5938749e225e3fdb99764c119fabe7bfa16969f
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 682cf59b330c12e2276e350dba4112e34a56edbf0274276eabb12be81c3b406d
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 9f4e3193f34df98c4cc50b86722246724cb31dd3d54d754435db5d80a0ac0300a026d5e09c479061a1f8fd65f40773dff5d175184078c573c1d102344a5dd7f7
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 824d0796aa292733ef672d2998377975b3b55a43021224213fa9b78af52fb3dc96842db1d7c00dfe727d6ea593d2bfb694e4072234932d5aff1a53919d48a615
         
     | 
    
        data/bin/todo.rb
    CHANGED
    
    | 
         @@ -95,7 +95,7 @@ def usage 
     | 
|
| 
       95 
95 
     | 
    
         
             
                * block <tasknumber>             mark task as blocked
         
     | 
| 
       96 
96 
     | 
    
         
             
                * reset <tasknumber>             reset task to new state
         
     | 
| 
       97 
97 
     | 
    
         
             
                * prio <tasknumber>              toggle high priority flag
         
     | 
| 
       98 
     | 
    
         
            -
                * due <tasknumber> <date>        set due date
         
     | 
| 
      
 98 
     | 
    
         
            +
                * due <tasknumber> <date>        set due date (in YYYY-MM-DD format)
         
     | 
| 
       99 
99 
     | 
    
         | 
| 
       100 
100 
     | 
    
         
             
                * append <tasknumber> <text>     append text to task title
         
     | 
| 
       101 
101 
     | 
    
         
             
                * rename <tasknumber> <text>     rename task
         
     | 
| 
         @@ -287,7 +287,8 @@ def read(arguments) 
     | 
|
| 
       287 
287 
     | 
    
         
             
                args = arguments[1..-1] || []
         
     | 
| 
       288 
288 
     | 
    
         
             
                case action
         
     | 
| 
       289 
289 
     | 
    
         
             
                when 'add'
         
     | 
| 
       290 
     | 
    
         
            -
                   
     | 
| 
      
 290 
     | 
    
         
            +
                  raise action + ' command requires at least one parameter' if args.nil? || args.empty?
         
     | 
| 
      
 291 
     | 
    
         
            +
                  add(args.join(' '))
         
     | 
| 
       291 
292 
     | 
    
         
             
                when 'start'
         
     | 
| 
       292 
293 
     | 
    
         
             
                  args.length == 1 ? change_state(args.first.to_i, 'started') : list(nil, [':started'])
         
     | 
| 
       293 
294 
     | 
    
         
             
                when 'done'
         
     | 
| 
         @@ -297,23 +298,31 @@ def read(arguments) 
     | 
|
| 
       297 
298 
     | 
    
         
             
                when 'reset'
         
     | 
| 
       298 
299 
     | 
    
         
             
                  args.length == 1 ? change_state(args.first.to_i, 'new') : list(nil, [':new'])
         
     | 
| 
       299 
300 
     | 
    
         
             
                when 'prio'
         
     | 
| 
       300 
     | 
    
         
            -
                   
     | 
| 
      
 301 
     | 
    
         
            +
                  raise action + ' command requires exactly one parameter' if args.length != 1
         
     | 
| 
      
 302 
     | 
    
         
            +
                  set_priority(args.first.to_i)
         
     | 
| 
       301 
303 
     | 
    
         
             
                when 'due'
         
     | 
| 
       302 
     | 
    
         
            -
                   
     | 
| 
      
 304 
     | 
    
         
            +
                  raise action + ' command requires at least one parameter' if args.length < 1
         
     | 
| 
      
 305 
     | 
    
         
            +
                  due_date(args.first.to_i, (args[1..-1] || []).join(' '))
         
     | 
| 
       303 
306 
     | 
    
         
             
                when 'append'
         
     | 
| 
       304 
     | 
    
         
            -
                   
     | 
| 
      
 307 
     | 
    
         
            +
                  raise action + ' command requires at least two parameters' if args.length < 2
         
     | 
| 
      
 308 
     | 
    
         
            +
                  append(args.first.to_i, args[1..-1].join(' '))
         
     | 
| 
       305 
309 
     | 
    
         
             
                when 'rename'
         
     | 
| 
       306 
     | 
    
         
            -
                   
     | 
| 
      
 310 
     | 
    
         
            +
                  raise action + ' command requires at least two parameters' if args.length < 2
         
     | 
| 
      
 311 
     | 
    
         
            +
                  rename(args.first.to_i, args[1..-1].join(' '))
         
     | 
| 
       307 
312 
     | 
    
         
             
                when 'del'
         
     | 
| 
       308 
     | 
    
         
            -
                   
     | 
| 
      
 313 
     | 
    
         
            +
                  raise action + ' command requires exactly one parameter' if args.length != 1
         
     | 
| 
      
 314 
     | 
    
         
            +
                  delete(args.first.to_i)
         
     | 
| 
       309 
315 
     | 
    
         
             
                when 'note'
         
     | 
| 
       310 
     | 
    
         
            -
                   
     | 
| 
      
 316 
     | 
    
         
            +
                  raise action + ' command requires at least two parameters' if args.length < 2
         
     | 
| 
      
 317 
     | 
    
         
            +
                  add_note(args.first.to_i, args[1..-1].join(' '))
         
     | 
| 
       311 
318 
     | 
    
         
             
                when 'delnote'
         
     | 
| 
       312 
     | 
    
         
            -
                   
     | 
| 
      
 319 
     | 
    
         
            +
                  raise action + ' command requires exactly one parameter' if args.length != 1
         
     | 
| 
      
 320 
     | 
    
         
            +
                  delete_note(args.first.to_i)
         
     | 
| 
       313 
321 
     | 
    
         
             
                when 'list'
         
     | 
| 
       314 
322 
     | 
    
         
             
                  list(nil, args)
         
     | 
| 
       315 
323 
     | 
    
         
             
                when 'show'
         
     | 
| 
       316 
     | 
    
         
            -
                   
     | 
| 
      
 324 
     | 
    
         
            +
                  raise action + ' command requires exactly one parameter' if args.length != 1
         
     | 
| 
      
 325 
     | 
    
         
            +
                  show(args.first.to_i)
         
     | 
| 
       317 
326 
     | 
    
         
             
                when 'help'
         
     | 
| 
       318 
327 
     | 
    
         
             
                  puts usage
         
     | 
| 
       319 
328 
     | 
    
         
             
                when 'repl'
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: todo-jsonl
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.1.7
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Gabor Bata
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2020-10- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2020-10-05 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies: []
         
     | 
| 
       13 
13 
     | 
    
         
             
            description: 
         
     | 
| 
       14 
14 
     | 
    
         
             
            email: 
         
     |