crude-mutant 0.1.1 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b2b98dfe716c076de7969855f83a746f9f86448fe3ae893d60581f6d2914db66
4
- data.tar.gz: cba5edbaf726bf8ff7806ba1e8c9aa4db368f48aaa31b711586098897427c350
3
+ metadata.gz: b7995d07eb23c4dd27bbdcef0e9e9bc91f30ea5cea9c0cea1d499ebac7fe7d1b
4
+ data.tar.gz: 3fe7b7e6a49d02ddaa4a76aa46f54f098f83ef567900c0823a711cd04e0f39ec
5
5
  SHA512:
6
- metadata.gz: da2e670cf49f081d8ca233925eb607f3e7976c20f528d69bacb2bf83d3e5d940b08252b60383452a72082ee9d03404e4ca01721a7dbe7f04a6b005fd135d0552
7
- data.tar.gz: bf8e68cc7ac3e9c3561a48c7ed7d423302bb8108af8cef64f071fe301878ab7009208de29f5af485d657512a0a78d7eb80945e814706d7fafcbf915b2c2f4df5
6
+ metadata.gz: 86da63240b24bfafbf875881bf5f0703b8aec128143ee449cc2f82bb33d238b904fc5221c5c9742aae4e975627571447dddf08a5c58b108e6ad15fab6f04bd24
7
+ data.tar.gz: 0cf59d5285e79fd00e071add6feca8fff67bf2db308d291ff2fda0fc6e5ca9c44ba086826359bbab6479ff859fef6592f73aaec3bdf780c6e5cf0f82dd2f0542
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- crude-mutant (0.1.1)
4
+ crude-mutant (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -23,13 +23,13 @@ It's assumed that the command will return a non-zero status code on test failure
23
23
  Here's a Ruby-centric example:
24
24
 
25
25
  ```
26
- crude-mutant "app/models/post.rb" "bundle exec rspec"
26
+ crude-mutant "bundle exec rspec" "app/models/post.rb"
27
27
  ```
28
28
 
29
29
  You can also use the shortened `cm`:
30
30
 
31
31
  ```
32
- cm "app/models/post.rb" "bundle exec rspec"
32
+ cm "bundle exec rspec" "app/models/post.rb"
33
33
  ```
34
34
 
35
35
  ## See Also
data/exe/cm CHANGED
@@ -3,8 +3,16 @@
3
3
 
4
4
  require "crude-mutant"
5
5
 
6
- file_to_mutate = ARGV[0]
7
- test_command = ARGV[1]
6
+ test_command = ARGV[0]
7
+ file_to_mutate = ARGV[1]
8
+
9
+ if !file_to_mutate || !test_command
10
+ puts "Usage: crude-mutant [test command] [file to mutate]"
11
+ puts ""
12
+ puts "Example:"
13
+ puts " crude-mutant \"bundle exec rspec\" app/models/post.rb"
14
+ exit(1)
15
+ end
8
16
 
9
17
  CrudeMutant.start(file_to_mutate, test_command) do |progress|
10
18
  clear_string = ' ' * CrudeMutant::TerminalCalculator.new.calculate_length
data/exe/crude-mutant CHANGED
@@ -3,8 +3,16 @@
3
3
 
4
4
  require "crude-mutant"
5
5
 
6
- file_to_mutate = ARGV[0]
7
- test_command = ARGV[1]
6
+ test_command = ARGV[0]
7
+ file_to_mutate = ARGV[1]
8
+
9
+ if !file_to_mutate || !test_command
10
+ puts "Usage: crude-mutant [test command] [file to mutate]"
11
+ puts ""
12
+ puts "Example:"
13
+ puts " crude-mutant \"bundle exec rspec\" app/models/post.rb"
14
+ exit(1)
15
+ end
8
16
 
9
17
  CrudeMutant.start(file_to_mutate, test_command) do |progress|
10
18
  clear_string = ' ' * CrudeMutant::TerminalCalculator.new.calculate_length
@@ -6,7 +6,7 @@ module CrudeMutant
6
6
 
7
7
  def self.load(file_path)
8
8
  if !file_path.is_a?(String) || !File.exist?(file_path)
9
- raise LoadError
9
+ raise LoadError, "Could not load file: #{file_path}"
10
10
  end
11
11
 
12
12
  new(file_path, File.readlines(file_path))
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CrudeMutant
4
- VERSION = "0.1.1"
4
+ VERSION = "0.2.0"
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.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kelly Sutton