mutant 0.11.25 → 0.11.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mutant/ast/pattern/lexer.rb +1 -1
- data/lib/mutant/expression/descendants.rb +1 -1
- data/lib/mutant/expression/method.rb +2 -2
- data/lib/mutant/expression/methods.rb +1 -1
- data/lib/mutant/expression/namespace.rb +3 -3
- data/lib/mutant/expression.rb +2 -2
- data/lib/mutant/license/subscription/repository.rb +4 -4
- data/lib/mutant/loader.rb +1 -1
- data/lib/mutant/matcher/config.rb +1 -1
- data/lib/mutant/mutation/config.rb +1 -1
- data/lib/mutant/mutation.rb +1 -1
- data/lib/mutant/mutator/node/index.rb +2 -2
- data/lib/mutant/mutator/node/named_value/access.rb +1 -1
- data/lib/mutant/mutator/node/rescue.rb +1 -1
- data/lib/mutant/mutator/node/send/attribute_assignment.rb +1 -1
- data/lib/mutant/repository/diff/ranges.rb +2 -2
- data/lib/mutant/repository/diff.rb +3 -3
- data/lib/mutant/subject/config.rb +2 -2
- data/lib/mutant/version.rb +1 -1
- data/lib/mutant.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cfde1fc6bf867efdfcaada6e39b084ba28089999da9d3f0c6f68a684f6cce35
|
4
|
+
data.tar.gz: 66c43239c831af01f5ff2d9e4fafcaf1f7aaacb29b5bedc47ac859b6e7044aff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2774dfb906a30402f3a6160bca215a5bfaee671035376406f9858368720a1eacda1237c3cd0794c824c5abd9347cdf8f04ead80b878063a0cadc61c5c044270
|
7
|
+
data.tar.gz: 796f8625453e50727e76359e5513cef8f1121dc9166dbb3bc7b4ec7a33114fa08c00b41dddd42f8a6f4dc36cde0a4ff6fd8813309bda54dda81dfaa825fe32c7
|
@@ -20,11 +20,11 @@ module Mutant
|
|
20
20
|
'#' => [Matcher::Methods::Instance].freeze
|
21
21
|
}.freeze
|
22
22
|
|
23
|
-
METHOD_NAME_PATTERN = /(?<method_name>.+)
|
23
|
+
METHOD_NAME_PATTERN = /(?<method_name>.+)/
|
24
24
|
|
25
25
|
private_constant(*constants(false))
|
26
26
|
|
27
|
-
REGEXP = /\A#{SCOPE_NAME_PATTERN}#{SCOPE_SYMBOL_PATTERN}#{METHOD_NAME_PATTERN}\z
|
27
|
+
REGEXP = /\A#{SCOPE_NAME_PATTERN}#{SCOPE_SYMBOL_PATTERN}#{METHOD_NAME_PATTERN}\z/
|
28
28
|
|
29
29
|
def initialize(*)
|
30
30
|
super
|
@@ -9,7 +9,7 @@ module Mutant
|
|
9
9
|
|
10
10
|
# Recursive namespace expression
|
11
11
|
class Recursive < self
|
12
|
-
REGEXP = /\A#{SCOPE_NAME_PATTERN}?\*\z
|
12
|
+
REGEXP = /\A#{SCOPE_NAME_PATTERN}?\*\z/
|
13
13
|
|
14
14
|
# Initialize object
|
15
15
|
#
|
@@ -17,7 +17,7 @@ module Mutant
|
|
17
17
|
def initialize(*)
|
18
18
|
super
|
19
19
|
|
20
|
-
@syntax = "#{scope_name}*".freeze
|
20
|
+
@syntax = "#{scope_name}*".freeze
|
21
21
|
|
22
22
|
@recursion_pattern = Regexp.union(
|
23
23
|
/\A#{scope_name}\z/,
|
@@ -60,7 +60,7 @@ module Mutant
|
|
60
60
|
MATCHER = Matcher::Scope
|
61
61
|
private_constant(*constants(false))
|
62
62
|
|
63
|
-
REGEXP = /\A#{SCOPE_NAME_PATTERN}\z
|
63
|
+
REGEXP = /\A#{SCOPE_NAME_PATTERN}\z/
|
64
64
|
|
65
65
|
# Matcher matcher on expression
|
66
66
|
#
|
data/lib/mutant/expression.rb
CHANGED
@@ -4,8 +4,8 @@ module Mutant
|
|
4
4
|
|
5
5
|
# Abstract base class for match expression
|
6
6
|
class Expression
|
7
|
-
fragment = /[A-Za-z][A-Za-z\d_]
|
8
|
-
SCOPE_NAME_PATTERN = /(?<scope_name>#{fragment}(?:#{SCOPE_OPERATOR}#{fragment})*)
|
7
|
+
fragment = /[A-Za-z][A-Za-z\d_]*/
|
8
|
+
SCOPE_NAME_PATTERN = /(?<scope_name>#{fragment}(?:#{SCOPE_OPERATOR}#{fragment})*)/
|
9
9
|
SCOPE_SYMBOL_PATTERN = '(?<scope_symbol>[.#])'
|
10
10
|
|
11
11
|
private_constant(*constants(false))
|
@@ -6,11 +6,11 @@ module Mutant
|
|
6
6
|
class Repository
|
7
7
|
include Anima.new(:host, :path)
|
8
8
|
|
9
|
-
REMOTE_REGEXP = /\A[^\t]+\t(?<url>[^ ]+) \((?:fetch|push)\)\n\z
|
10
|
-
GIT_SSH_REGEXP = %r{\A[^@]+@(?<host>[^:/]+)[:/](?<path>.+?)(?:\.git)?\z}
|
11
|
-
GIT_HTTPS_REGEXP = %r{\Ahttps://(?<host>[^/]+)/(?<path>.+?)(?:\.git)?\z}
|
9
|
+
REMOTE_REGEXP = /\A[^\t]+\t(?<url>[^ ]+) \((?:fetch|push)\)\n\z/
|
10
|
+
GIT_SSH_REGEXP = %r{\A[^@]+@(?<host>[^:/]+)[:/](?<path>.+?)(?:\.git)?\z}
|
11
|
+
GIT_HTTPS_REGEXP = %r{\Ahttps://(?<host>[^/]+)/(?<path>.+?)(?:\.git)?\z}
|
12
12
|
WILDCARD = '/*'
|
13
|
-
WILDCARD_RANGE = (..-WILDCARD.length)
|
13
|
+
WILDCARD_RANGE = (..-WILDCARD.length)
|
14
14
|
|
15
15
|
private_constant(*constants(false))
|
16
16
|
|
data/lib/mutant/loader.rb
CHANGED
@@ -5,7 +5,7 @@ module Mutant
|
|
5
5
|
include Anima.new(:binding, :kernel, :source, :subject)
|
6
6
|
|
7
7
|
FROZEN_STRING_FORMAT = "# frozen_string_literal: true\n%s"
|
8
|
-
VOID_VALUE_REGEXP = /\A[^:]+:\d+: void value expression
|
8
|
+
VOID_VALUE_REGEXP = /\A[^:]+:\d+: void value expression/
|
9
9
|
|
10
10
|
private_constant(*constants(false))
|
11
11
|
|
@@ -49,7 +49,7 @@ module Mutant
|
|
49
49
|
|
50
50
|
def merge(other)
|
51
51
|
with(
|
52
|
-
ignore_patterns: other.ignore_patterns,
|
52
|
+
ignore_patterns: other.ignore_patterns.any? ? other.ignore_patterns : ignore_patterns,
|
53
53
|
operators: other.operators || operators,
|
54
54
|
timeout: other.timeout || timeout
|
55
55
|
)
|
data/lib/mutant/mutation.rb
CHANGED
@@ -5,7 +5,7 @@ module Mutant
|
|
5
5
|
class Node
|
6
6
|
# Base mutator for index operations
|
7
7
|
class Index < self
|
8
|
-
NO_VALUE_RANGE = (1..-1)
|
8
|
+
NO_VALUE_RANGE = (1..-1)
|
9
9
|
SEND_REPLACEMENTS = %i[at fetch key?].freeze
|
10
10
|
|
11
11
|
private_constant(*constants(false))
|
@@ -67,7 +67,7 @@ module Mutant
|
|
67
67
|
|
68
68
|
# Mutator for index assignments
|
69
69
|
class Assign < self
|
70
|
-
REGULAR_RANGE = (1..-2)
|
70
|
+
REGULAR_RANGE = (1..-2)
|
71
71
|
|
72
72
|
private_constant(*constants(false))
|
73
73
|
|
@@ -4,8 +4,8 @@ module Mutant
|
|
4
4
|
module Repository
|
5
5
|
class Diff
|
6
6
|
module Ranges
|
7
|
-
DECIMAL = /(?:0|[1-9]\d*)
|
8
|
-
REGEXP = /\A@@ -(#{DECIMAL})(?:,(#{DECIMAL}))? \+(#{DECIMAL})(?:,(#{DECIMAL}))?
|
7
|
+
DECIMAL = /(?:0|[1-9]\d*)/
|
8
|
+
REGEXP = /\A@@ -(#{DECIMAL})(?:,(#{DECIMAL}))? \+(#{DECIMAL})(?:,(#{DECIMAL}))? @@/
|
9
9
|
|
10
10
|
private_constant(*constants(false))
|
11
11
|
|
@@ -6,7 +6,7 @@ module Mutant
|
|
6
6
|
class Diff
|
7
7
|
include Adamantium, Anima.new(:world, :to)
|
8
8
|
|
9
|
-
FORMAT = /\A:\d{6} \d{6} [a-f\d]{40} [a-f\d]{40} [ACDMRTUX]\t(.*)\n\z
|
9
|
+
FORMAT = /\A:\d{6} \d{6} [a-f\d]{40} [a-f\d]{40} [ACDMRTUX]\t(.*)\n\z/
|
10
10
|
|
11
11
|
private_constant(*constants(false))
|
12
12
|
|
@@ -85,8 +85,8 @@ module Mutant
|
|
85
85
|
class Path
|
86
86
|
include Adamantium, Anima.new(:world, :to, :path)
|
87
87
|
|
88
|
-
DECIMAL = /(?:0|[1-9]\d*)
|
89
|
-
REGEXP = /\A@@ -(#{DECIMAL})(?:,(#{DECIMAL}))? \+(#{DECIMAL})(?:,(#{DECIMAL}))?
|
88
|
+
DECIMAL = /(?:0|[1-9]\d*)/
|
89
|
+
REGEXP = /\A@@ -(#{DECIMAL})(?:,(#{DECIMAL}))? \+(#{DECIMAL})(?:,(#{DECIMAL}))? @@/
|
90
90
|
|
91
91
|
private_constant(*constants(false))
|
92
92
|
|
@@ -7,8 +7,8 @@ module Mutant
|
|
7
7
|
|
8
8
|
DEFAULT = new(inline_disable: false, mutation: Mutation::Config::DEFAULT)
|
9
9
|
|
10
|
-
DISABLE_REGEXP = /(\s|^)mutant:disable(?:\s|$)
|
11
|
-
SYNTAX_REGEXP = /\A(?:#|=begin\n)
|
10
|
+
DISABLE_REGEXP = /(\s|^)mutant:disable(?:\s|$)/
|
11
|
+
SYNTAX_REGEXP = /\A(?:#|=begin\n)/
|
12
12
|
|
13
13
|
def self.parse(comments:, mutation:)
|
14
14
|
new(
|
data/lib/mutant/version.rb
CHANGED
data/lib/mutant.rb
CHANGED
@@ -63,8 +63,8 @@ module Mutant
|
|
63
63
|
|
64
64
|
env_key = /[a-zA-Z_\d]+/
|
65
65
|
|
66
|
-
ENV_VARIABLE_KEY_VALUE_REGEXP = /\A(?<key>#{env_key}+)=(?<value>.*)\z
|
67
|
-
ENV_VARIABLE_KEY_REGEXP = /\A#{env_key}\z
|
66
|
+
ENV_VARIABLE_KEY_VALUE_REGEXP = /\A(?<key>#{env_key}+)=(?<value>.*)\z/
|
67
|
+
ENV_VARIABLE_KEY_REGEXP = /\A#{env_key}\z/
|
68
68
|
|
69
69
|
# rubocop:disable Metrics/BlockLength
|
70
70
|
record.call(:require_mutant_lib) do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mutant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Markus Schirp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: diff-lcs
|
@@ -373,7 +373,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
373
373
|
requirements:
|
374
374
|
- - ">="
|
375
375
|
- !ruby/object:Gem::Version
|
376
|
-
version: '
|
376
|
+
version: '3.0'
|
377
377
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
378
378
|
requirements:
|
379
379
|
- - ">="
|