Change required Ruby version to >=2.3
* This commit does every 2.3 change required to get the build pass * None of the changes can be extracted, without changing the build setup
This commit is contained in:
parent
b007f3c66e
commit
99ab9ff171
363 changed files with 384 additions and 20 deletions
|
@ -4,4 +4,4 @@ AllCops:
|
|||
- 'test_app/**/*'
|
||||
- 'tmp/**/*'
|
||||
- 'vendor/**/*'
|
||||
TargetRubyVersion: 2.2
|
||||
TargetRubyVersion: 2.3
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
# v0.8.17 2018-09-12
|
||||
|
||||
* Drop support for Ruby < 2.3
|
||||
* Use frozen string literals globally
|
||||
|
||||
# v0.8.16 2018-08-03
|
||||
|
||||
* Support for rspec-3.x
|
||||
|
|
1
Gemfile
1
Gemfile
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gemspec name: 'mutant'
|
||||
|
|
16
Gemfile.lock
16
Gemfile.lock
|
@ -1,7 +1,7 @@
|
|||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
mutant (0.8.14)
|
||||
mutant (0.8.16)
|
||||
abstract_type (~> 0.0.7)
|
||||
adamantium (~> 0.2.0)
|
||||
anima (~> 0.3.0)
|
||||
|
@ -17,9 +17,9 @@ PATH
|
|||
procto (~> 0.0.2)
|
||||
regexp_parser (~> 0.4.9)
|
||||
unparser (~> 0.2.5)
|
||||
mutant-rspec (0.8.14)
|
||||
mutant (~> 0.8.14)
|
||||
rspec-core (>= 3.4.0, < 3.8.0)
|
||||
mutant-rspec (0.8.16)
|
||||
mutant (~> 0.8.16)
|
||||
rspec-core (>= 3.4.0, < 4.0.0)
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
|
@ -105,7 +105,7 @@ GEM
|
|||
codeclimate-engine-rb (~> 0.4.0)
|
||||
parser (>= 2.4.0.0, < 2.5)
|
||||
rainbow (~> 2.0)
|
||||
regexp_parser (0.4.9)
|
||||
regexp_parser (0.4.13)
|
||||
rspec (3.5.0)
|
||||
rspec-core (~> 3.5.0)
|
||||
rspec-expectations (~> 3.5.0)
|
||||
|
@ -139,13 +139,13 @@ GEM
|
|||
simplecov-html (0.10.1)
|
||||
thread_safe (0.3.6)
|
||||
unicode-display_width (1.3.0)
|
||||
unparser (0.2.6)
|
||||
unparser (0.2.8)
|
||||
abstract_type (~> 0.0.7)
|
||||
adamantium (~> 0.2.0)
|
||||
concord (~> 0.1.5)
|
||||
diff-lcs (~> 1.3)
|
||||
equalizer (~> 0.0.9)
|
||||
parser (>= 2.3.1.2, < 2.5)
|
||||
parser (>= 2.3.1.2, < 2.6)
|
||||
procto (~> 0.0.2)
|
||||
virtus (1.0.5)
|
||||
axiom-types (~> 0.1)
|
||||
|
@ -166,4 +166,4 @@ DEPENDENCIES
|
|||
mutant!
|
||||
|
||||
BUNDLED WITH
|
||||
1.15.4
|
||||
1.16.4
|
||||
|
|
1
Rakefile
1
Rakefile
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require 'devtools'
|
||||
|
||||
Devtools.init_rake_tasks
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
trap('INT') do |status|
|
||||
effective_status = status ? status + 128 : 128
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
threshold: 16
|
||||
total_score: 1316
|
||||
total_score: 1318
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require 'abstract_type'
|
||||
require 'adamantium'
|
||||
require 'anima'
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
# A minimal actor implementation
|
||||
module Actor
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module Actor
|
||||
# Actor root environment
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module Actor
|
||||
# Unbound mailbox
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module Actor
|
||||
# Receiver side of an actor
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module Actor
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
# AST helpers
|
||||
module AST
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module AST
|
||||
# Node meta information mixin
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module AST
|
||||
# Node meta information mixin
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module AST
|
||||
# Node meta information mixin
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module AST
|
||||
# Node meta information mixin
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module AST
|
||||
# Node meta information mixin
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module AST
|
||||
# Node meta information mixin
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module AST
|
||||
# Node meta information mixin
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module AST
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module AST
|
||||
# Module for node predicates
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module AST
|
||||
# Singleton nodes
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module AST
|
||||
# Regexp source mapper
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module AST
|
||||
module Regexp
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module AST
|
||||
module Regexp
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module AST
|
||||
module Regexp
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module AST
|
||||
module Regexp
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module AST
|
||||
module Regexp
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module AST
|
||||
module Regexp
|
||||
|
@ -99,7 +100,7 @@ module Mutant
|
|||
#
|
||||
# @return [String]
|
||||
def interval_text
|
||||
interval = [min, max].map { |num| num if num > 0 }.uniq
|
||||
interval = [min, max].map { |num| num if num.positive? }.uniq
|
||||
"{#{interval.join(',')}}"
|
||||
end
|
||||
end # ASTToExpression
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module AST
|
||||
module Regexp
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module AST
|
||||
module Regexp
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module AST
|
||||
module Regexp
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module AST
|
||||
# Mixin for node sexp syntax
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module AST
|
||||
# Groups of node types
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
# Commandline parser / runner
|
||||
class CLI
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
# Class to colorize strings
|
||||
class Color
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
# Standalone configuration of a mutant execution.
|
||||
#
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
# An abstract context where mutations can be applied to.
|
||||
class Context
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
# Class to create diffs from source code
|
||||
class Diff
|
||||
|
@ -17,7 +18,7 @@ module Mutant
|
|||
def diff
|
||||
return if diffs.empty?
|
||||
|
||||
minimized_hunk.diff(:unified) << NEWLINE
|
||||
minimized_hunk.diff(:unified) + NEWLINE
|
||||
end
|
||||
memoize :diff
|
||||
|
||||
|
@ -68,7 +69,7 @@ module Mutant
|
|||
# @return [Array<Diff::LCS::Hunk>]
|
||||
def hunks
|
||||
diffs.map do |diff|
|
||||
::Diff::LCS::Hunk.new(old, new, diff, max_length, 0)
|
||||
::Diff::LCS::Hunk.new(old.map(&:dup), new, diff, max_length, 0)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
# Abstract base class for mutant environments
|
||||
class Env
|
||||
|
|
1
lib/mutant/env/bootstrap.rb
vendored
1
lib/mutant/env/bootstrap.rb
vendored
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Env
|
||||
# Bootstrap environment
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
|
||||
# Abstract base class for match expression
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Expression
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Expression
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Expression
|
||||
# Abstract base class for expressions matching namespaces
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Expression
|
||||
class Parser
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
|
||||
# Abstract base class mutant test framework integrations
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rspec/core'
|
||||
|
||||
module Mutant
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Isolation
|
||||
include AbstractType
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Isolation
|
||||
# Isolation via the fork(2) systemcall.
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
# Module providing isolation
|
||||
class Isolation
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
# Base class for code loaders
|
||||
class Loader
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
# Abstract matcher to find subjects to mutate
|
||||
class Matcher
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Matcher
|
||||
# Matcher chaining results of other matchers together
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Matcher
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Matcher
|
||||
# Subject matcher configuration
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Matcher
|
||||
# Matcher filter
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Matcher
|
||||
# Abstract base class for method matchers
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Matcher
|
||||
class Method
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Matcher
|
||||
class Method
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Matcher
|
||||
# Abstract base class for matcher that returns method subjects from scope
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Matcher
|
||||
# Matcher for specific namespace
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Matcher
|
||||
# A null matcher, that does not match any subjects
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Matcher
|
||||
# Matcher expanding Mutant::Scope objects into method matches
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Matcher
|
||||
# Matcher returning subjects already known at its creation time
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
# Namespace for mutant metadata
|
||||
module Meta
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module Meta
|
||||
class Example
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module Meta
|
||||
class Example
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
module Meta
|
||||
class Example
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
# Represent a mutated node with its subject
|
||||
class Mutation
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
# Generator for mutations
|
||||
class Mutator
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
|
||||
# Generator for mutations
|
||||
|
@ -124,7 +125,7 @@ module Mutant
|
|||
# @return [nil]
|
||||
# otherwise
|
||||
def parent_node
|
||||
parent.node if parent
|
||||
parent&.node
|
||||
end
|
||||
|
||||
# Parent type
|
||||
|
@ -135,7 +136,7 @@ module Mutant
|
|||
# @return [nil]
|
||||
# otherwise
|
||||
def parent_type
|
||||
parent_node.type if parent_node
|
||||
parent_node&.type
|
||||
end
|
||||
|
||||
# Test if the node is the left of an or_asgn or op_asgn
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Mutant
|
||||
class Mutator
|
||||
class Node
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue