knapsack 0.1.0 → 0.1.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 +4 -0
- data/README.md +2 -2
- data/knapsack_report.json +10 -9
- data/lib/knapsack/adapters/rspec_adapter.rb +5 -1
- data/lib/knapsack/version.rb +1 -1
- data/spec_examples/fast/use_shared_example_spec.rb +3 -0
- data/spec_examples/spec_helper.rb +2 -0
- data/spec_examples/support/shared_examples/common_example.rb +3 -0
- metadata +4 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 66e29adad8c5ac42ab419a5b37de9741ff51430c
         | 
| 4 | 
            +
              data.tar.gz: 6dd72187cd1fa6edc33f52d2b22ed0322b34e47a
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 88a2e270d5ad38f0df8a4d989125d533ae0c29aee78d364b07cf6991c8053d9e7602710c1b26551acb54a28311351547cfc1c0106de65a6dd73454b4b76ff629
         | 
| 7 | 
            +
              data.tar.gz: d886bee4e155577ee534d37785a1892361813c24cbfdfc70947325df8083e1bd29c23c69387fc52c08cc8aa3d04a6e6cd2da48ccde964cb84ef309ed4c4321ee
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | @@ -46,7 +46,7 @@ Add in your `Rakefile` this lines: | |
| 46 46 | 
             
                require 'knapsack'
         | 
| 47 47 | 
             
                Knapsack.load_tasks
         | 
| 48 48 |  | 
| 49 | 
            -
            Generate time execution report for your spec files.
         | 
| 49 | 
            +
            Generate time execution report for your spec files. Run it on your CI machine.
         | 
| 50 50 |  | 
| 51 51 | 
             
                $ KNAPSACK_GENERATE_REPORT=true bundle exec rspec spec
         | 
| 52 52 |  | 
| @@ -80,7 +80,7 @@ Here is example for test configuration in your `circleci.yml` file. | |
| 80 80 |  | 
| 81 81 | 
             
                test:
         | 
| 82 82 | 
             
                  override:
         | 
| 83 | 
            -
                    - bundle exec rake knapsack:rspec
         | 
| 83 | 
            +
                    - bundle exec rake knapsack:rspec:
         | 
| 84 84 | 
             
                        parallel: true
         | 
| 85 85 |  | 
| 86 86 | 
             
            ## Tests
         | 
    
        data/knapsack_report.json
    CHANGED
    
    | @@ -1,11 +1,12 @@ | |
| 1 1 | 
             
            {
         | 
| 2 | 
            -
              "spec_examples/fast/ | 
| 3 | 
            -
              "spec_examples/fast/ | 
| 4 | 
            -
              "spec_examples/ | 
| 5 | 
            -
              "spec_examples/ | 
| 6 | 
            -
              "spec_examples/fast/ | 
| 7 | 
            -
              "spec_examples/slow/b_spec.rb": 0. | 
| 8 | 
            -
              "spec_examples/fast/ | 
| 9 | 
            -
              "spec_examples/ | 
| 10 | 
            -
              "spec_examples/ | 
| 2 | 
            +
              "spec_examples/fast/3_spec.rb": 7.82012939453125e-05,
         | 
| 3 | 
            +
              "spec_examples/fast/1_spec.rb": 1.5974044799804688e-05,
         | 
| 4 | 
            +
              "spec_examples/slow/c_spec.rb": 1.002314567565918,
         | 
| 5 | 
            +
              "spec_examples/slow/a_spec.rb": 1.6023659706115723,
         | 
| 6 | 
            +
              "spec_examples/fast/2_spec.rb": 6.985664367675781e-05,
         | 
| 7 | 
            +
              "spec_examples/slow/b_spec.rb": 0.9009926319122314,
         | 
| 8 | 
            +
              "spec_examples/fast/6_spec.rb": 0.00015687942504882812,
         | 
| 9 | 
            +
              "spec_examples/fast/4_spec.rb": 9.894371032714844e-05,
         | 
| 10 | 
            +
              "spec_examples/fast/use_shared_example_spec.rb": 0.10031008720397949,
         | 
| 11 | 
            +
              "spec_examples/fast/5_spec.rb": 0.00011754035949707031
         | 
| 11 12 | 
             
            }
         | 
| @@ -38,7 +38,11 @@ module Knapsack | |
| 38 38 | 
             
                  protected
         | 
| 39 39 |  | 
| 40 40 | 
             
                  def self.spec_path
         | 
| 41 | 
            -
                    ::RSpec.current_example.metadata[:example_group] | 
| 41 | 
            +
                    example_group = ::RSpec.current_example.metadata[:example_group]
         | 
| 42 | 
            +
                    while !example_group[:parent_example_group].nil?
         | 
| 43 | 
            +
                      example_group = example_group[:parent_example_group]
         | 
| 44 | 
            +
                    end
         | 
| 45 | 
            +
                    example_group[:file_path]
         | 
| 42 46 | 
             
                  end
         | 
| 43 47 | 
             
                end
         | 
| 44 48 | 
             
              end
         | 
    
        data/lib/knapsack/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: knapsack
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - ArturT
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2014-07- | 
| 11 | 
            +
            date: 2014-07-12 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: bundler
         | 
| @@ -137,12 +137,14 @@ files: | |
| 137 137 | 
             
            - spec_examples/fast/4_spec.rb
         | 
| 138 138 | 
             
            - spec_examples/fast/5_spec.rb
         | 
| 139 139 | 
             
            - spec_examples/fast/6_spec.rb
         | 
| 140 | 
            +
            - spec_examples/fast/use_shared_example_spec.rb
         | 
| 140 141 | 
             
            - spec_examples/leftover/1_spec.rb
         | 
| 141 142 | 
             
            - spec_examples/leftover/a_spec.rb
         | 
| 142 143 | 
             
            - spec_examples/slow/a_spec.rb
         | 
| 143 144 | 
             
            - spec_examples/slow/b_spec.rb
         | 
| 144 145 | 
             
            - spec_examples/slow/c_spec.rb
         | 
| 145 146 | 
             
            - spec_examples/spec_helper.rb
         | 
| 147 | 
            +
            - spec_examples/support/shared_examples/common_example.rb
         | 
| 146 148 | 
             
            homepage: https://github.com/ArturT/knapsack
         | 
| 147 149 | 
             
            licenses:
         | 
| 148 150 | 
             
            - MIT
         |