crude-mutant 0.2.0 → 0.2.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: b7995d07eb23c4dd27bbdcef0e9e9bc91f30ea5cea9c0cea1d499ebac7fe7d1b
4
- data.tar.gz: 3fe7b7e6a49d02ddaa4a76aa46f54f098f83ef567900c0823a711cd04e0f39ec
3
+ metadata.gz: 84b41616b8f4a60cf89f845acb820e8460939e6ce8f62ebc4b4562eaf8762b16
4
+ data.tar.gz: 697c8567d6117ff9a8630fd9cf9f7095f6459ac132f8974d2bbfe229e58d6698
5
5
  SHA512:
6
- metadata.gz: 86da63240b24bfafbf875881bf5f0703b8aec128143ee449cc2f82bb33d238b904fc5221c5c9742aae4e975627571447dddf08a5c58b108e6ad15fab6f04bd24
7
- data.tar.gz: 0cf59d5285e79fd00e071add6feca8fff67bf2db308d291ff2fda0fc6e5ca9c44ba086826359bbab6479ff859fef6592f73aaec3bdf780c6e5cf0f82dd2f0542
6
+ metadata.gz: 5995d7d2253c7c0cc85eb1c3f91bc5fae2a4b440394f351288f5372f4ca6359c6366479a26cb12e8f271b9510457f223feda807632f798b49da9d7122dff0978
7
+ data.tar.gz: 272f6fedebec06960a8e6e52b68e6b7e5769163b2012527f5611f042704da2eb2a3ceb05c963712cd790a6d9bfad03de19d066fa67d7a6621890d42aa0f5d964
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- crude-mutant (0.2.0)
4
+ crude-mutant (0.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -20,12 +20,10 @@ module CrudeMutant
20
20
  file = FileLoader.load(file_path)
21
21
  num_lines_in_file = file.lines_in_file
22
22
 
23
- test_runs = []
24
23
  begin
25
24
  line_number = -1
26
25
  test_runs = file.contents_as_array.reduce([]) do |acc, contents|
27
26
  line_number += 1
28
- result = nil
29
27
 
30
28
  if contents.strip.size != 0
31
29
  result = [perform_run(
@@ -7,6 +7,8 @@ module CrudeMutant
7
7
  contents_as_array.each do |line|
8
8
  f.write(line)
9
9
  end
10
+
11
+ f.flush
10
12
  end
11
13
  end
12
14
  end
@@ -11,8 +11,8 @@ module CrudeMutant
11
11
  stream.print clear_string
12
12
  stream.print "\r"
13
13
 
14
- number_of_line_digits = result.successful_runs_even_with_mutations.size > 0 ?
15
- Math.log10(result.successful_runs_even_with_mutations.size).to_i + 1 :
14
+ number_of_line_digits = result.run_results.size > 0 ?
15
+ Math.log10(result.run_results.size).to_i + 1 :
16
16
  0
17
17
 
18
18
  result.run_results.each do |run_result|
@@ -24,7 +24,8 @@ module CrudeMutant
24
24
  line += "#{green(run_result.line_contents.slice(0, term_width - line.size))}"
25
25
  end
26
26
 
27
- stream.print "#{line}\n"
27
+ line += "\n" if !line.include?("\n")
28
+ stream.print "#{line}"
28
29
  end
29
30
 
30
31
  stream.print "Finished mutating #{result.file_path}. ^^^ Results above ^^^\n"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CrudeMutant
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crude-mutant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kelly Sutton