todo-jsonl 0.1.19 → 0.1.20
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 +5 -5
 - 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: d39cdc12b9d904368b86e79438a242689700825c668b0ca69aedba68025c9c9f
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: f219916b78035ba1daab7211c4318dc7063123a10f9fdcbc6aae91e62265b2b0
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 4bb6565bd2a1d4890f3c06fa9b88b7a711d48f1f02fad0b8fcac306c8348a1b65635b9e48245d12abfee95c1eb465ab1790593e3b746c0dc5508d7e97524df23
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: d1d9bdcebc0c579ca4e15e1aeb6723885766c5b8790accf284d7619f507e3f4d613ef2cca98c8b7d6e25e43e4bdb55523a28a5616ba1ed95ca1a763ed50bb459
         
     | 
    
        data/bin/todo.rb
    CHANGED
    
    | 
         @@ -165,8 +165,8 @@ class Todo 
     | 
|
| 
       165 
165 
     | 
    
         
             
              end
         
     | 
| 
       166 
166 
     | 
    
         | 
| 
       167 
167 
     | 
    
         
             
              def setup
         
     | 
| 
       168 
     | 
    
         
            -
                @today =  
     | 
| 
       169 
     | 
    
         
            -
                next_7_days = (0..6).map do |day|  
     | 
| 
      
 168 
     | 
    
         
            +
                @today = Date.today
         
     | 
| 
      
 169 
     | 
    
         
            +
                next_7_days = (0..6).map do |day| @today + day end
         
     | 
| 
       170 
170 
     | 
    
         
             
                @due_date_days = next_7_days.map do |day| day.strftime('%A').downcase end
         
     | 
| 
       171 
171 
     | 
    
         
             
                due_dates_for_queries = next_7_days.map do |day| day.strftime(DATE_FORMAT) end
         
     | 
| 
       172 
172 
     | 
    
         | 
| 
         @@ -316,7 +316,7 @@ class Todo 
     | 
|
| 
       316 
316 
     | 
    
         
             
                  priority_flag = task[:priority] ? colorize(PRIORITY_FLAG, :red) : ' '
         
     | 
| 
       317 
317 
     | 
    
         
             
                  due_date = ''
         
     | 
| 
       318 
318 
     | 
    
         
             
                  if task[:due] && state != 'done'
         
     | 
| 
       319 
     | 
    
         
            -
                    date_diff = (Date. 
     | 
| 
      
 319 
     | 
    
         
            +
                    date_diff = (Date.strptime(task[:due], DATE_FORMAT) - @today).to_i
         
     | 
| 
       320 
320 
     | 
    
         
             
                    if date_diff < 0
         
     | 
| 
       321 
321 
     | 
    
         
             
                      due_date = colorize("(#{date_diff.abs}d overdue)", :red)
         
     | 
| 
       322 
322 
     | 
    
         
             
                    elsif date_diff == 0 || date_diff == 1
         
     | 
| 
         @@ -379,9 +379,9 @@ class Todo 
     | 
|
| 
       379 
379 
     | 
    
         
             
                  DUE_DATE_DAYS_SIMPLE.index(date.to_s.downcase) ||
         
     | 
| 
       380 
380 
     | 
    
         
             
                  @due_date_days.map do |day| day[0..2] end.index(date.to_s.downcase)
         
     | 
| 
       381 
381 
     | 
    
         
             
                if day_index
         
     | 
| 
       382 
     | 
    
         
            -
                  due = (@today 
     | 
| 
      
 382 
     | 
    
         
            +
                  due = (@today + day_index).strftime(DATE_FORMAT)
         
     | 
| 
       383 
383 
     | 
    
         
             
                else
         
     | 
| 
       384 
     | 
    
         
            -
                  due = date.nil? || date.empty? ? nil : Date. 
     | 
| 
      
 384 
     | 
    
         
            +
                  due = date.nil? || date.empty? ? nil : Date.strptime(date, DATE_FORMAT).strftime(DATE_FORMAT)
         
     | 
| 
       385 
385 
     | 
    
         
             
                end
         
     | 
| 
       386 
386 
     | 
    
         
             
                return due
         
     | 
| 
       387 
387 
     | 
    
         
             
              end
         
     | 
    
        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.20
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Gabor Bata
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2021-03- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2021-03-02 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies: []
         
     | 
| 
       13 
13 
     | 
    
         
             
            description: 
         
     | 
| 
       14 
14 
     | 
    
         
             
            email: 
         
     |