rubocop-graphql 0.14.0 → 0.14.1
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: 99da3dd6f8e99724cb14b723f2f4ed2c7149dd2921b1295e4a669697b1eed8d2
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 964c04401fb03c769213c7ccd3142e8969b83a741e8325b5916ee91c9daea11d
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: d284c67aec9969f151437f45751978f8d26da471484b816adcb633f31d8e55950ef09d8035d686382cc44c4eae8c895192dbdbfcf9652cb1cd2594961fbc295c
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: af01d1a6e41a303bafa730578bb187462ce4f8ecf5c2436544c68192eceacc99d99c1d01c4cd1cff235e53341ddf9dd1d298f75b2f5f565fd0bd0a3cfc7ba01a
         
     | 
| 
         @@ -20,13 +20,18 @@ module RuboCop 
     | 
|
| 
       20 
20 
     | 
    
         
             
                module DescriptionMethod
         
     | 
| 
       21 
21 
     | 
    
         
             
                  extend RuboCop::NodePattern::Macros
         
     | 
| 
       22 
22 
     | 
    
         | 
| 
       23 
     | 
    
         
            -
                   
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
      
 23 
     | 
    
         
            +
                  DESCRIPTION_STRING = "{({str|dstr|const} ...)|(send const ...)|(send ({str|dstr} ...) _)}"
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
                  def_node_matcher :description_method_call?, <<~PATTERN
         
     | 
| 
      
 26 
     | 
    
         
            +
                    (send nil? :description #{DESCRIPTION_STRING})
         
     | 
| 
      
 27 
     | 
    
         
            +
                  PATTERN
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
                  def_node_matcher :description_with_block_arg?, <<~PATTERN
         
     | 
| 
      
 30 
     | 
    
         
            +
                    (send (lvar _) {:description= :description} #{DESCRIPTION_STRING})
         
     | 
| 
       26 
31 
     | 
    
         
             
                  PATTERN
         
     | 
| 
       27 
32 
     | 
    
         | 
| 
       28 
33 
     | 
    
         
             
                  def find_description_method(nodes)
         
     | 
| 
       29 
     | 
    
         
            -
                    nodes.find { |kwarg|  
     | 
| 
      
 34 
     | 
    
         
            +
                    nodes.find { |kwarg| description_method_call?(kwarg) || description_with_block_arg?(kwarg) }
         
     | 
| 
       30 
35 
     | 
    
         
             
                  end
         
     | 
| 
       31 
36 
     | 
    
         
             
                end
         
     | 
| 
       32 
37 
     | 
    
         
             
              end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: rubocop-graphql
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.14. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.14.1
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Dmitry Tsepelev
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire:
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2022-03- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2022-03-25 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bundler
         
     |