checkoff 0.178.0 → 0.180.0
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
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 8ceda0a224245a150ec0e9a2a5a13bd5977ff985e9b621c3922a839f29b8d8ff
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 75758cd84def7f935d9fc2b09a281867c60894bab6d9b726bf51bb9eb495e2ee
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: dd2d5f5cf6b74502ac3392b96842afe53ea239fdfd0598e2dee02d9525a1011b2d204a7d274f59745f2b19fe33bcaceabd27bcdd51dc8c9bd8e439f049c50cda
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 35bd117de452142c2640cfe0a21e2975047cd8d1355669b55f08b57a724d153043b39d05f50acc796146ff0cecab364c394f5a1f9f62d933f0e4832118a893d5
         
     | 
    
        data/Gemfile.lock
    CHANGED
    
    
| 
         @@ -33,11 +33,10 @@ module Checkoff 
     | 
|
| 
       33 
33 
     | 
    
         
             
                    end
         
     | 
| 
       34 
34 
     | 
    
         | 
| 
       35 
35 
     | 
    
         
             
                    # @param _resource [Asana::Resources::Task,Asana::Resources::Project]
         
     | 
| 
       36 
     | 
    
         
            -
                    # @param  
     | 
| 
       37 
     | 
    
         
            -
                    # @ 
     | 
| 
       38 
     | 
    
         
            -
                     
     | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
       40 
     | 
    
         
            -
                      lhs || rhs
         
     | 
| 
      
 36 
     | 
    
         
            +
                    # @param args [Array<Object>]
         
     | 
| 
      
 37 
     | 
    
         
            +
                    # @return [Boolean]
         
     | 
| 
      
 38 
     | 
    
         
            +
                    def evaluate(_resource, *args)
         
     | 
| 
      
 39 
     | 
    
         
            +
                      args.any? { |arg| arg }
         
     | 
| 
       41 
40 
     | 
    
         
             
                    end
         
     | 
| 
       42 
41 
     | 
    
         
             
                  end
         
     | 
| 
       43 
42 
     | 
    
         | 
| 
         @@ -6,6 +6,31 @@ require 'checkoff/internal/task_timing' 
     | 
|
| 
       6 
6 
     | 
    
         
             
            module Checkoff
         
     | 
| 
       7 
7 
     | 
    
         
             
              module SelectorClasses
         
     | 
| 
       8 
8 
     | 
    
         
             
                module Task
         
     | 
| 
      
 9 
     | 
    
         
            +
                  # :in_a_real_project? function
         
     | 
| 
      
 10 
     | 
    
         
            +
                  class InARealProjectPFunctionEvaluator < FunctionEvaluator
         
     | 
| 
      
 11 
     | 
    
         
            +
                    def matches?
         
     | 
| 
      
 12 
     | 
    
         
            +
                      fn?(selector, :in_a_real_project?)
         
     | 
| 
      
 13 
     | 
    
         
            +
                    end
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
                    # @param _index [Integer]
         
     | 
| 
      
 16 
     | 
    
         
            +
                    def evaluate_arg?(_index)
         
     | 
| 
      
 17 
     | 
    
         
            +
                      false
         
     | 
| 
      
 18 
     | 
    
         
            +
                    end
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                    # @sg-ignore
         
     | 
| 
      
 21 
     | 
    
         
            +
                    # @param task [Asana::Resources::Task]
         
     | 
| 
      
 22 
     | 
    
         
            +
                    # @return [Boolean]
         
     | 
| 
      
 23 
     | 
    
         
            +
                    def evaluate(task)
         
     | 
| 
      
 24 
     | 
    
         
            +
                      # @type [Hash{'unwrapped' => Hash}]
         
     | 
| 
      
 25 
     | 
    
         
            +
                      task_data = @tasks.task_to_h(task)
         
     | 
| 
      
 26 
     | 
    
         
            +
                      # @type [Hash{'membership_by_project_name' => Hash}]
         
     | 
| 
      
 27 
     | 
    
         
            +
                      unwrapped = task_data.fetch('unwrapped')
         
     | 
| 
      
 28 
     | 
    
         
            +
                      # @type [Array]
         
     | 
| 
      
 29 
     | 
    
         
            +
                      projects = unwrapped.fetch('membership_by_project_name').keys
         
     | 
| 
      
 30 
     | 
    
         
            +
                      !(projects - [:my_tasks]).empty?
         
     | 
| 
      
 31 
     | 
    
         
            +
                    end
         
     | 
| 
      
 32 
     | 
    
         
            +
                  end
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
       9 
34 
     | 
    
         
             
                  # :section_name_starts_with? function
         
     | 
| 
       10 
35 
     | 
    
         
             
                  class SectionNameStartsWithPFunctionEvaluator < FunctionEvaluator
         
     | 
| 
       11 
36 
     | 
    
         
             
                    def matches?
         
     | 
    
        data/lib/checkoff/version.rb
    CHANGED