simplecov 0.18.0 → 0.18.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 +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +10 -0
- data/lib/simplecov/source_file.rb +7 -3
- data/lib/simplecov/version.rb +1 -1
- metadata +4 -4
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 6139c9ec905e1f20dec5bdfd8fef48fe8b9091ce24ae1b55e89b850093cfcf69
         | 
| 4 | 
            +
              data.tar.gz: 3e15d4dbbc0f68b9453241603c0a1beade1b29ca2fbf64190f742f69db307b13
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 3af5aa2cad84980d28f95c606d0e7cc8282d5c81689bdaa637cb29a971ffe2842b7cd91ba2d602a6214f7c917851886ead8a62b50a8e071a12edbddbb7355a45
         | 
| 7 | 
            +
              data.tar.gz: a3afd317b84ae5b11b907384c3ee17436e3a033c956c7ebdc000db0fca852442e4e658b72dc09c07f3c510f659297ab386f07af4fbee1c43b8a81794da595f6a
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -1,9 +1,19 @@ | |
| 1 | 
            +
            0.18.1 (2020-01-31)
         | 
| 2 | 
            +
            ===================
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            Small Bugfix release.
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            ## Bugfixes
         | 
| 7 | 
            +
            * Just putting `# :nocov:` on top of a file or having an uneven number of them in general works again and acts as if ignoring until the end of the file. See [#846](https://github.com/colszowka/simplecov/issues/846) and thanks [@DannyBen](https://github.com/DannyBen) for the report.
         | 
| 8 | 
            +
             | 
| 1 9 | 
             
            0.18.0 (2020-01-28)
         | 
| 2 10 | 
             
            ===================
         | 
| 3 11 |  | 
| 4 12 | 
             
            Huge release! Highlights are support for branch coverage (Ruby 2.5+) and dropping support for EOL'ed Ruby versions (< 2.4).
         | 
| 5 13 | 
             
            Please also read the other beta patch notes.
         | 
| 6 14 |  | 
| 15 | 
            +
            You can run with branch coverage by putting `enable_coverage :branch` into your SimpleCov configuration (like the `SimpleCov.start do .. end` block)
         | 
| 16 | 
            +
             | 
| 7 17 | 
             
            ## Enhancements
         | 
| 8 18 | 
             
            * You can now define the minimum expected coverage by criterion like `minimum_coverage line: 90, branch: 80`
         | 
| 9 19 | 
             
            * Memoized some internal data structures that didn't change to reduce SimpleCov overhead
         | 
    
        data/README.md
    CHANGED
    
    | @@ -726,6 +726,10 @@ You can define the minimum coverage percentage expected. SimpleCov will return n | |
| 726 726 |  | 
| 727 727 | 
             
            ```ruby
         | 
| 728 728 | 
             
            SimpleCov.minimum_coverage 90
         | 
| 729 | 
            +
            # same as above (the default is to check line coverage)
         | 
| 730 | 
            +
            SimpleCov.minimum_coverage line: 90
         | 
| 731 | 
            +
            # check for a minimum line coverage of 90% and minimum 80% branch coverage
         | 
| 732 | 
            +
            SimpleCov.minimum_coverage line: 90, branch: 80
         | 
| 729 733 | 
             
            ```
         | 
| 730 734 |  | 
| 731 735 | 
             
            ### Minimum coverage by file
         | 
| @@ -737,6 +741,8 @@ to help ensure coverage is relatively consistent, rather than being skewed by pa | |
| 737 741 | 
             
            SimpleCov.minimum_coverage_by_file 80
         | 
| 738 742 | 
             
            ```
         | 
| 739 743 |  | 
| 744 | 
            +
            (not yet supported for branch coverage)
         | 
| 745 | 
            +
             | 
| 740 746 | 
             
            ### Maximum coverage drop
         | 
| 741 747 |  | 
| 742 748 | 
             
            You can define the maximum coverage drop percentage at once. SimpleCov will return non-zero if exceeded.
         | 
| @@ -745,6 +751,8 @@ You can define the maximum coverage drop percentage at once. SimpleCov will retu | |
| 745 751 | 
             
            SimpleCov.maximum_coverage_drop 5
         | 
| 746 752 | 
             
            ```
         | 
| 747 753 |  | 
| 754 | 
            +
            (not yet supported for branch coverage)
         | 
| 755 | 
            +
             | 
| 748 756 | 
             
            ### Refuse dropping coverage
         | 
| 749 757 |  | 
| 750 758 | 
             
            You can also entirely refuse dropping coverage between test runs:
         | 
| @@ -753,6 +761,8 @@ You can also entirely refuse dropping coverage between test runs: | |
| 753 761 | 
             
            SimpleCov.refuse_coverage_drop
         | 
| 754 762 | 
             
            ```
         | 
| 755 763 |  | 
| 764 | 
            +
            (not yet supported for branch coverage)
         | 
| 765 | 
            +
             | 
| 756 766 | 
             
            ## Using your own formatter
         | 
| 757 767 |  | 
| 758 768 | 
             
            You can use your own formatter with:
         | 
| @@ -162,11 +162,15 @@ module SimpleCov | |
| 162 162 | 
             
                end
         | 
| 163 163 |  | 
| 164 164 | 
             
                def build_no_cov_chunks
         | 
| 165 | 
            -
                  no_cov_lines = src.map.with_index(1).select { | | 
| 165 | 
            +
                  no_cov_lines = src.map.with_index(1).select { |line_src, _index| LinesClassifier.no_cov_line?(line_src) }
         | 
| 166 166 |  | 
| 167 | 
            -
                   | 
| 167 | 
            +
                  # if we have an uneven number of nocovs we assume they go to the
         | 
| 168 | 
            +
                  # end of the file, the source doesn't really matter
         | 
| 169 | 
            +
                  # Can't deal with this within the each_slice due to differing
         | 
| 170 | 
            +
                  # behavior in JRuby: jruby/jruby#6048
         | 
| 171 | 
            +
                  no_cov_lines << ["", src.size] if no_cov_lines.size.odd?
         | 
| 168 172 |  | 
| 169 | 
            -
                  no_cov_lines.each_slice(2).map do |( | 
| 173 | 
            +
                  no_cov_lines.each_slice(2).map do |(_line_src_start, index_start), (_line_src_end, index_end)|
         | 
| 170 174 | 
             
                    index_start..index_end
         | 
| 171 175 | 
             
                  end
         | 
| 172 176 | 
             
                end
         | 
    
        data/lib/simplecov/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: simplecov
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.18. | 
| 4 | 
            +
              version: 0.18.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Christoph Olszowka
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2020-01- | 
| 11 | 
            +
            date: 2020-01-31 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: docile
         | 
| @@ -96,9 +96,9 @@ licenses: | |
| 96 96 | 
             
            metadata:
         | 
| 97 97 | 
             
              bug_tracker_uri: https://github.com/colszowka/simplecov/issues
         | 
| 98 98 | 
             
              changelog_uri: https://github.com/colszowka/simplecov/blob/master/CHANGELOG.md
         | 
| 99 | 
            -
              documentation_uri: https://www.rubydoc.info/gems/simplecov/0.18. | 
| 99 | 
            +
              documentation_uri: https://www.rubydoc.info/gems/simplecov/0.18.1
         | 
| 100 100 | 
             
              mailing_list_uri: https://groups.google.com/forum/#!forum/simplecov
         | 
| 101 | 
            -
              source_code_uri: https://github.com/colszowka/simplecov/tree/v0.18. | 
| 101 | 
            +
              source_code_uri: https://github.com/colszowka/simplecov/tree/v0.18.1
         | 
| 102 102 | 
             
            post_install_message: 
         | 
| 103 103 | 
             
            rdoc_options: []
         | 
| 104 104 | 
             
            require_paths:
         |