mutant 0.10.15 → 0.10.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mutant/mutation.rb +16 -13
- data/lib/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: 376273ed7dd5673bc6acc7d2393b3b9d05c5779a33b36fffce4a2fd93742e313
|
4
|
+
data.tar.gz: 186a12fae490b557d0f48f879017a2faf61b2edfef09cd44d8e11549c34a8526
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f2a51ac2f6e515d9e4b96f3ede03773ae20c9038e9b4f31f639e733598cff0d86ed6d7020b727b167b5e518425ae90b97c1b53a5c3c26abbc6c417bf18eacd0
|
7
|
+
data.tar.gz: bd2084f932c8267845e0371ff267d0acd2c8085684fdb7acb718253777adcd1b8098c5288c6978c4542ca9327bba0f62d8206ec90c8baad73be3fad46e471808
|
data/lib/mutant/mutation.rb
CHANGED
@@ -9,34 +9,37 @@ module Mutant
|
|
9
9
|
CODE_DELIMITER = "\0"
|
10
10
|
CODE_RANGE = (0..4).freeze
|
11
11
|
|
12
|
-
def initialize(subject, node)
|
13
|
-
super(subject, node)
|
14
|
-
|
15
|
-
@source = Unparser.unparse(node)
|
16
|
-
@code = sha1[CODE_RANGE]
|
17
|
-
@identification = "#{self.class::SYMBOL}:#{subject.identification}:#{code}"
|
18
|
-
@monkeypatch = Unparser.unparse(subject.context.root(node))
|
19
|
-
end
|
20
|
-
|
21
12
|
# Mutation identification code
|
22
13
|
#
|
23
14
|
# @return [String]
|
24
|
-
|
15
|
+
def code
|
16
|
+
sha1[CODE_RANGE]
|
17
|
+
end
|
18
|
+
memoize :code
|
25
19
|
|
26
20
|
# Normalized mutation source
|
27
21
|
#
|
28
22
|
# @return [String]
|
29
|
-
|
23
|
+
def source
|
24
|
+
Unparser.unparse(node)
|
25
|
+
end
|
26
|
+
memoize :source
|
30
27
|
|
31
28
|
# Identification string
|
32
29
|
#
|
33
30
|
# @return [String]
|
34
|
-
|
31
|
+
def identification
|
32
|
+
"#{self.class::SYMBOL}:#{subject.identification}:#{code}"
|
33
|
+
end
|
34
|
+
memoize :identification
|
35
35
|
|
36
36
|
# The monkeypatch to insert the mutation
|
37
37
|
#
|
38
38
|
# @return [String]
|
39
|
-
|
39
|
+
def monkeypatch
|
40
|
+
Unparser.unparse(subject.context.root(node))
|
41
|
+
end
|
42
|
+
memoize :monkeypatch
|
40
43
|
|
41
44
|
# Normalized original source
|
42
45
|
#
|
data/lib/mutant/version.rb
CHANGED
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.10.
|
4
|
+
version: 0.10.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Markus Schirp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-12-
|
11
|
+
date: 2020-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: abstract_type
|