quality 21.0.6 → 22.0.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 +4 -4
 - data/README.md +1 -1
 - data/lib/quality/tools/flake8.rb +36 -0
 - data/lib/quality/tools/pep8.rb +16 -12
 - data/lib/quality/version.rb +1 -1
 - data/quality.gemspec +0 -1
 - metadata +3 -16
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 34c649082351ada4e29748634b94f0cb25784b4a
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: be28c5baec25bf09c2db42b78d15ab81b5fecc0d
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 8fcd7499757198b78ab88052cc2a788fd89c7dfd2d3f3547a17a2c18788877d2cc33e518d6a8e41902b8a1c1babddec465703b9977cc657e07d05aedb475bc1d
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 1f655f360e13af9c419821b0e8bbf97edc15c9c8d0a6d164e877b17b9abe4441061d02f5870ca05327a54c3a31cafcece8bf9c23621ad72f3ba3945772b54731
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -157,7 +157,7 @@ After your first run, check in your coverage/.last_run.json. 
     | 
|
| 
       157 
157 
     | 
    
         | 
| 
       158 
158 
     | 
    
         
             
            ## Maturity
         
     | 
| 
       159 
159 
     | 
    
         | 
| 
       160 
     | 
    
         
            -
            Quality uses [semantic versioning](http://semver.org/)--any incompatible changes will come out as major number updates.
         
     | 
| 
      
 160 
     | 
    
         
            +
            Quality uses [semantic versioning](http://semver.org/)--any incompatible changes (including new tools being added) will come out as major number updates.
         
     | 
| 
       161 
161 
     | 
    
         | 
| 
       162 
162 
     | 
    
         
             
            ## Supported Ruby Versions
         
     | 
| 
       163 
163 
     | 
    
         | 
| 
         @@ -0,0 +1,36 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module Quality
         
     | 
| 
      
 2 
     | 
    
         
            +
              module Tools
         
     | 
| 
      
 3 
     | 
    
         
            +
                # Adds 'flake8' tool support to quality gem
         
     | 
| 
      
 4 
     | 
    
         
            +
                module Flake8
         
     | 
| 
      
 5 
     | 
    
         
            +
                  private
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
                  def flake8_args
         
     | 
| 
      
 8 
     | 
    
         
            +
                    python_files.join(' ')
         
     | 
| 
      
 9 
     | 
    
         
            +
                  end
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
                  def flake8_count_errors(line)
         
     | 
| 
      
 12 
     | 
    
         
            +
                    if line =~ /^Usage:/
         
     | 
| 
      
 13 
     | 
    
         
            +
                      # no files specified
         
     | 
| 
      
 14 
     | 
    
         
            +
                      0
         
     | 
| 
      
 15 
     | 
    
         
            +
                    elsif line =~ /^flake8: /
         
     | 
| 
      
 16 
     | 
    
         
            +
                      # no files specified
         
     | 
| 
      
 17 
     | 
    
         
            +
                      0
         
     | 
| 
      
 18 
     | 
    
         
            +
                    elsif line =~ /^$/
         
     | 
| 
      
 19 
     | 
    
         
            +
                      # no files specified
         
     | 
| 
      
 20 
     | 
    
         
            +
                      0
         
     | 
| 
      
 21 
     | 
    
         
            +
                    else
         
     | 
| 
      
 22 
     | 
    
         
            +
                      1
         
     | 
| 
      
 23 
     | 
    
         
            +
                    end
         
     | 
| 
      
 24 
     | 
    
         
            +
                  end
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
                  def quality_flake8
         
     | 
| 
      
 27 
     | 
    
         
            +
                    ratchet_quality_cmd('flake8',
         
     | 
| 
      
 28 
     | 
    
         
            +
                                        args: flake8_args,
         
     | 
| 
      
 29 
     | 
    
         
            +
                                        gives_error_code_on_no_relevant_code:
         
     | 
| 
      
 30 
     | 
    
         
            +
                                          true) do |line|
         
     | 
| 
      
 31 
     | 
    
         
            +
                      flake8_count_errors(line)
         
     | 
| 
      
 32 
     | 
    
         
            +
                    end
         
     | 
| 
      
 33 
     | 
    
         
            +
                  end
         
     | 
| 
      
 34 
     | 
    
         
            +
                end
         
     | 
| 
      
 35 
     | 
    
         
            +
              end
         
     | 
| 
      
 36 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/quality/tools/pep8.rb
    CHANGED
    
    | 
         @@ -8,23 +8,27 @@ module Quality 
     | 
|
| 
       8 
8 
     | 
    
         
             
                    python_files.join(' ')
         
     | 
| 
       9 
9 
     | 
    
         
             
                  end
         
     | 
| 
       10 
10 
     | 
    
         | 
| 
      
 11 
     | 
    
         
            +
                  def pep8_count_errors(line)
         
     | 
| 
      
 12 
     | 
    
         
            +
                    if line =~ /^Usage:/
         
     | 
| 
      
 13 
     | 
    
         
            +
                      # no files specified
         
     | 
| 
      
 14 
     | 
    
         
            +
                      0
         
     | 
| 
      
 15 
     | 
    
         
            +
                    elsif line =~ /^pep8: /
         
     | 
| 
      
 16 
     | 
    
         
            +
                      # no files specified
         
     | 
| 
      
 17 
     | 
    
         
            +
                      0
         
     | 
| 
      
 18 
     | 
    
         
            +
                    elsif line =~ /^$/
         
     | 
| 
      
 19 
     | 
    
         
            +
                      # no files specified
         
     | 
| 
      
 20 
     | 
    
         
            +
                      0
         
     | 
| 
      
 21 
     | 
    
         
            +
                    else
         
     | 
| 
      
 22 
     | 
    
         
            +
                      1
         
     | 
| 
      
 23 
     | 
    
         
            +
                    end
         
     | 
| 
      
 24 
     | 
    
         
            +
                  end
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
       11 
26 
     | 
    
         
             
                  def quality_pep8
         
     | 
| 
       12 
27 
     | 
    
         
             
                    ratchet_quality_cmd('pep8',
         
     | 
| 
       13 
28 
     | 
    
         
             
                                        args: pep8_args,
         
     | 
| 
       14 
29 
     | 
    
         
             
                                        gives_error_code_on_no_relevant_code:
         
     | 
| 
       15 
30 
     | 
    
         
             
                                          true) do |line|
         
     | 
| 
       16 
     | 
    
         
            -
                       
     | 
| 
       17 
     | 
    
         
            -
                        # no files specified
         
     | 
| 
       18 
     | 
    
         
            -
                        0
         
     | 
| 
       19 
     | 
    
         
            -
                      elsif line =~ /^pep8: /
         
     | 
| 
       20 
     | 
    
         
            -
                        # no files specified
         
     | 
| 
       21 
     | 
    
         
            -
                        0
         
     | 
| 
       22 
     | 
    
         
            -
                      elsif line =~ /^$/
         
     | 
| 
       23 
     | 
    
         
            -
                        # no files specified
         
     | 
| 
       24 
     | 
    
         
            -
                        0
         
     | 
| 
       25 
     | 
    
         
            -
                      else
         
     | 
| 
       26 
     | 
    
         
            -
                        1
         
     | 
| 
       27 
     | 
    
         
            -
                      end
         
     | 
| 
      
 31 
     | 
    
         
            +
                      pep8_count_errors(line)
         
     | 
| 
       28 
32 
     | 
    
         
             
                    end
         
     | 
| 
       29 
33 
     | 
    
         
             
                  end
         
     | 
| 
       30 
34 
     | 
    
         
             
                end
         
     | 
    
        data/lib/quality/version.rb
    CHANGED
    
    
    
        data/quality.gemspec
    CHANGED
    
    | 
         @@ -43,7 +43,6 @@ Gem::Specification.new do |s| 
     | 
|
| 
       43 
43 
     | 
    
         
             
              s.add_runtime_dependency('punchlist', ['>= 1.1'])
         
     | 
| 
       44 
44 
     | 
    
         
             
              s.add_runtime_dependency('brakeman')
         
     | 
| 
       45 
45 
     | 
    
         
             
              s.add_runtime_dependency('rails_best_practices')
         
     | 
| 
       46 
     | 
    
         
            -
              s.add_runtime_dependency('bigdecimal')
         
     | 
| 
       47 
46 
     | 
    
         | 
| 
       48 
47 
     | 
    
         
             
              # need above 3.2.2 to support Ruby 2.0 syntax
         
     | 
| 
       49 
48 
     | 
    
         
             
              #
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: quality
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version:  
     | 
| 
      
 4 
     | 
    
         
            +
              version: 22.0.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Vince Broz
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2016-08- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2016-08-28 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: activesupport
         
     | 
| 
         @@ -198,20 +198,6 @@ dependencies: 
     | 
|
| 
       198 
198 
     | 
    
         
             
                - - ">="
         
     | 
| 
       199 
199 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       200 
200 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       201 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency
         
     | 
| 
       202 
     | 
    
         
            -
              name: bigdecimal
         
     | 
| 
       203 
     | 
    
         
            -
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       204 
     | 
    
         
            -
                requirements:
         
     | 
| 
       205 
     | 
    
         
            -
                - - ">="
         
     | 
| 
       206 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       207 
     | 
    
         
            -
                    version: '0'
         
     | 
| 
       208 
     | 
    
         
            -
              type: :runtime
         
     | 
| 
       209 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       210 
     | 
    
         
            -
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       211 
     | 
    
         
            -
                requirements:
         
     | 
| 
       212 
     | 
    
         
            -
                - - ">="
         
     | 
| 
       213 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       214 
     | 
    
         
            -
                    version: '0'
         
     | 
| 
       215 
201 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       216 
202 
     | 
    
         
             
              name: ruby_parser
         
     | 
| 
       217 
203 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -340,6 +326,7 @@ files: 
     | 
|
| 
       340 
326 
     | 
    
         
             
            - lib/quality/tools/bundle_audit.rb
         
     | 
| 
       341 
327 
     | 
    
         
             
            - lib/quality/tools/cane.rb
         
     | 
| 
       342 
328 
     | 
    
         
             
            - lib/quality/tools/eslint.rb
         
     | 
| 
      
 329 
     | 
    
         
            +
            - lib/quality/tools/flake8.rb
         
     | 
| 
       343 
330 
     | 
    
         
             
            - lib/quality/tools/flay.rb
         
     | 
| 
       344 
331 
     | 
    
         
             
            - lib/quality/tools/flog.rb
         
     | 
| 
       345 
332 
     | 
    
         
             
            - lib/quality/tools/jscs.rb
         
     |