crude-mutant 0.2.1 → 0.2.2
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/.travis.yml +1 -0
 - data/Gemfile.lock +1 -1
 - data/README.md +1 -1
 - data/lib/crude_mutant.rb +7 -0
 - data/lib/crude_mutant/progress.rb +3 -1
 - data/lib/crude_mutant/result_printer.rb +1 -0
 - data/lib/crude_mutant/version.rb +1 -1
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 30c70ccce932ab3310d011413c98acd642aa980de6b6ffd188b2ad76ab524122
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 0f40c8889e26dc985309775435efaa3cd6c920deefd655bf221ec445200f5adb
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: fe717c339d38bba664d6f0482453563dc313f81f118096edd75bf17a757d48b57d1bc49eca112ffe2d2ed24339d291e5de61cc4a4c7691f3b788c378c5ab3486
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 13635ad04411c19140c8ac3c37e93fd9bab5d002381ba8bd77e15938b6006afe51474948aec8e8ae2a1ed2b1026b79baa69145a4bdcc538c367f46d8c3ac2244
         
     | 
    
        data/.travis.yml
    CHANGED
    
    
    
        data/Gemfile.lock
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | 
         @@ -1,4 +1,4 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # crude-mutant 
         
     | 
| 
      
 1 
     | 
    
         
            +
            # crude-mutant [](https://travis-ci.org/kellysutton/crude-mutant)
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            A Ruby-based, language-agnostic tool for performing [mutation testing](https://en.wikipedia.org/wiki/Mutation_testing) on a file.
         
     | 
| 
       4 
4 
     | 
    
         | 
    
        data/lib/crude_mutant.rb
    CHANGED
    
    | 
         @@ -14,12 +14,19 @@ require "crude_mutant/version" 
     | 
|
| 
       14 
14 
     | 
    
         | 
| 
       15 
15 
     | 
    
         
             
            module CrudeMutant
         
     | 
| 
       16 
16 
     | 
    
         
             
              class Error < StandardError; end
         
     | 
| 
      
 17 
     | 
    
         
            +
              class NeutralCaseError < StandardError; end
         
     | 
| 
       17 
18 
     | 
    
         | 
| 
       18 
19 
     | 
    
         
             
              class << self
         
     | 
| 
       19 
20 
     | 
    
         
             
                def start(file_path, test_command, &block)
         
     | 
| 
       20 
21 
     | 
    
         
             
                  file = FileLoader.load(file_path)
         
     | 
| 
       21 
22 
     | 
    
         
             
                  num_lines_in_file = file.lines_in_file
         
     | 
| 
       22 
23 
     | 
    
         | 
| 
      
 24 
     | 
    
         
            +
                  initial_success = Executor.call(test_command)
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
                  if !initial_success
         
     | 
| 
      
 27 
     | 
    
         
            +
                    raise NeutralCaseError, 'Initial test run did not succeed'
         
     | 
| 
      
 28 
     | 
    
         
            +
                  end
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
       23 
30 
     | 
    
         
             
                  begin
         
     | 
| 
       24 
31 
     | 
    
         
             
                    line_number = -1
         
     | 
| 
       25 
32 
     | 
    
         
             
                    test_runs = file.contents_as_array.reduce([]) do |acc, contents|
         
     | 
| 
         @@ -28,6 +28,7 @@ module CrudeMutant 
     | 
|
| 
       28 
28 
     | 
    
         
             
                      stream.print "#{line}"
         
     | 
| 
       29 
29 
     | 
    
         
             
                    end
         
     | 
| 
       30 
30 
     | 
    
         | 
| 
      
 31 
     | 
    
         
            +
                    stream.print "\n"
         
     | 
| 
       31 
32 
     | 
    
         
             
                    stream.print "Finished mutating #{result.file_path}. ^^^ Results above ^^^\n"
         
     | 
| 
       32 
33 
     | 
    
         
             
                    stream.print "Performed #{result.run_results.size} line mutations in total.\n"
         
     | 
| 
       33 
34 
     | 
    
         
             
                    stream.print "There are #{red(result.successful_runs_even_with_mutations.size)} #{red('problematic lines')}:\n"
         
     | 
    
        data/lib/crude_mutant/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: crude-mutant
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.2. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.2.2
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Kelly Sutton
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2018-12- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2018-12-28 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bundler
         
     |