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:
Markus Schirp 2018-09-12 14:21:24 +00:00
parent b007f3c66e
commit 99ab9ff171
363 changed files with 384 additions and 20 deletions

View file

@ -4,4 +4,4 @@ AllCops:
- 'test_app/**/*' - 'test_app/**/*'
- 'tmp/**/*' - 'tmp/**/*'
- 'vendor/**/*' - 'vendor/**/*'
TargetRubyVersion: 2.2 TargetRubyVersion: 2.3

View file

@ -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 # v0.8.16 2018-08-03
* Support for rspec-3.x * Support for rspec-3.x

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
source 'https://rubygems.org' source 'https://rubygems.org'
gemspec name: 'mutant' gemspec name: 'mutant'

View file

@ -1,7 +1,7 @@
PATH PATH
remote: . remote: .
specs: specs:
mutant (0.8.14) mutant (0.8.16)
abstract_type (~> 0.0.7) abstract_type (~> 0.0.7)
adamantium (~> 0.2.0) adamantium (~> 0.2.0)
anima (~> 0.3.0) anima (~> 0.3.0)
@ -17,9 +17,9 @@ PATH
procto (~> 0.0.2) procto (~> 0.0.2)
regexp_parser (~> 0.4.9) regexp_parser (~> 0.4.9)
unparser (~> 0.2.5) unparser (~> 0.2.5)
mutant-rspec (0.8.14) mutant-rspec (0.8.16)
mutant (~> 0.8.14) mutant (~> 0.8.16)
rspec-core (>= 3.4.0, < 3.8.0) rspec-core (>= 3.4.0, < 4.0.0)
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
@ -105,7 +105,7 @@ GEM
codeclimate-engine-rb (~> 0.4.0) codeclimate-engine-rb (~> 0.4.0)
parser (>= 2.4.0.0, < 2.5) parser (>= 2.4.0.0, < 2.5)
rainbow (~> 2.0) rainbow (~> 2.0)
regexp_parser (0.4.9) regexp_parser (0.4.13)
rspec (3.5.0) rspec (3.5.0)
rspec-core (~> 3.5.0) rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0) rspec-expectations (~> 3.5.0)
@ -139,13 +139,13 @@ GEM
simplecov-html (0.10.1) simplecov-html (0.10.1)
thread_safe (0.3.6) thread_safe (0.3.6)
unicode-display_width (1.3.0) unicode-display_width (1.3.0)
unparser (0.2.6) unparser (0.2.8)
abstract_type (~> 0.0.7) abstract_type (~> 0.0.7)
adamantium (~> 0.2.0) adamantium (~> 0.2.0)
concord (~> 0.1.5) concord (~> 0.1.5)
diff-lcs (~> 1.3) diff-lcs (~> 1.3)
equalizer (~> 0.0.9) equalizer (~> 0.0.9)
parser (>= 2.3.1.2, < 2.5) parser (>= 2.3.1.2, < 2.6)
procto (~> 0.0.2) procto (~> 0.0.2)
virtus (1.0.5) virtus (1.0.5)
axiom-types (~> 0.1) axiom-types (~> 0.1)
@ -166,4 +166,4 @@ DEPENDENCIES
mutant! mutant!
BUNDLED WITH BUNDLED WITH
1.15.4 1.16.4

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'devtools' require 'devtools'
Devtools.init_rake_tasks Devtools.init_rake_tasks

View file

@ -1,4 +1,5 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
# frozen_string_literal: true
trap('INT') do |status| trap('INT') do |status|
effective_status = status ? status + 128 : 128 effective_status = status ? status + 128 : 128

View file

@ -1,3 +1,3 @@
--- ---
threshold: 16 threshold: 16
total_score: 1316 total_score: 1318

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'abstract_type' require 'abstract_type'
require 'adamantium' require 'adamantium'
require 'anima' require 'anima'

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
# A minimal actor implementation # A minimal actor implementation
module Actor module Actor

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module Actor module Actor
# Actor root environment # Actor root environment

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module Actor module Actor
# Unbound mailbox # Unbound mailbox

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module Actor module Actor
# Receiver side of an actor # Receiver side of an actor

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module Actor module Actor

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
# AST helpers # AST helpers
module AST module AST

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module AST module AST
# Node meta information mixin # Node meta information mixin

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module AST module AST
# Node meta information mixin # Node meta information mixin

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module AST module AST
# Node meta information mixin # Node meta information mixin

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module AST module AST
# Node meta information mixin # Node meta information mixin

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module AST module AST
# Node meta information mixin # Node meta information mixin

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module AST module AST
# Node meta information mixin # Node meta information mixin

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module AST module AST
# Node meta information mixin # Node meta information mixin

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module AST module AST

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module AST module AST
# Module for node predicates # Module for node predicates

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module AST module AST
# Singleton nodes # Singleton nodes

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module AST module AST
# Regexp source mapper # Regexp source mapper

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module AST module AST
module Regexp module Regexp

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module AST module AST
module Regexp module Regexp

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module AST module AST
module Regexp module Regexp

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module AST module AST
module Regexp module Regexp

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module AST module AST
module Regexp module Regexp

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module AST module AST
module Regexp module Regexp
@ -99,7 +100,7 @@ module Mutant
# #
# @return [String] # @return [String]
def interval_text 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(',')}}" "{#{interval.join(',')}}"
end end
end # ASTToExpression end # ASTToExpression

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module AST module AST
module Regexp module Regexp

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module AST module AST
module Regexp module Regexp

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module AST module AST
module Regexp module Regexp

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module AST module AST
# Mixin for node sexp syntax # Mixin for node sexp syntax

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module AST module AST
# Groups of node types # Groups of node types

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
# Commandline parser / runner # Commandline parser / runner
class CLI class CLI

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
# Class to colorize strings # Class to colorize strings
class Color class Color

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
# Standalone configuration of a mutant execution. # Standalone configuration of a mutant execution.
# #

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
# An abstract context where mutations can be applied to. # An abstract context where mutations can be applied to.
class Context class Context

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
# Class to create diffs from source code # Class to create diffs from source code
class Diff class Diff
@ -17,7 +18,7 @@ module Mutant
def diff def diff
return if diffs.empty? return if diffs.empty?
minimized_hunk.diff(:unified) << NEWLINE minimized_hunk.diff(:unified) + NEWLINE
end end
memoize :diff memoize :diff
@ -68,7 +69,7 @@ module Mutant
# @return [Array<Diff::LCS::Hunk>] # @return [Array<Diff::LCS::Hunk>]
def hunks def hunks
diffs.map do |diff| 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
end end

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
# Abstract base class for mutant environments # Abstract base class for mutant environments
class Env class Env

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Env class Env
# Bootstrap environment # Bootstrap environment

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
# Abstract base class for match expression # Abstract base class for match expression

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Expression class Expression

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Expression class Expression

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Expression class Expression
# Abstract base class for expressions matching namespaces # Abstract base class for expressions matching namespaces

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Expression class Expression
class Parser class Parser

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
# Abstract base class mutant test framework integrations # Abstract base class mutant test framework integrations

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'rspec/core' require 'rspec/core'
module Mutant module Mutant

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Isolation class Isolation
include AbstractType include AbstractType

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Isolation class Isolation
# Isolation via the fork(2) systemcall. # Isolation via the fork(2) systemcall.

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
# Module providing isolation # Module providing isolation
class Isolation class Isolation

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
# Base class for code loaders # Base class for code loaders
class Loader class Loader

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
# Abstract matcher to find subjects to mutate # Abstract matcher to find subjects to mutate
class Matcher class Matcher

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Matcher class Matcher
# Matcher chaining results of other matchers together # Matcher chaining results of other matchers together

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Matcher class Matcher

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Matcher class Matcher
# Subject matcher configuration # Subject matcher configuration

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Matcher class Matcher
# Matcher filter # Matcher filter

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Matcher class Matcher
# Abstract base class for method matchers # Abstract base class for method matchers

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Matcher class Matcher
class Method class Method

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Matcher class Matcher
class Method class Method

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Matcher class Matcher
# Abstract base class for matcher that returns method subjects from scope # Abstract base class for matcher that returns method subjects from scope

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Matcher class Matcher
# Matcher for specific namespace # Matcher for specific namespace

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Matcher class Matcher
# A null matcher, that does not match any subjects # A null matcher, that does not match any subjects

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Matcher class Matcher
# Matcher expanding Mutant::Scope objects into method matches # Matcher expanding Mutant::Scope objects into method matches

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Matcher class Matcher
# Matcher returning subjects already known at its creation time # Matcher returning subjects already known at its creation time

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
# Namespace for mutant metadata # Namespace for mutant metadata
module Meta module Meta

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module Meta module Meta
class Example class Example

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module Meta module Meta
class Example class Example

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
module Meta module Meta
class Example class Example

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
# Represent a mutated node with its subject # Represent a mutated node with its subject
class Mutation class Mutation

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
# Generator for mutations # Generator for mutations
class Mutator class Mutator

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
# Generator for mutations # Generator for mutations
@ -124,7 +125,7 @@ module Mutant
# @return [nil] # @return [nil]
# otherwise # otherwise
def parent_node def parent_node
parent.node if parent parent&.node
end end
# Parent type # Parent type
@ -135,7 +136,7 @@ module Mutant
# @return [nil] # @return [nil]
# otherwise # otherwise
def parent_type def parent_type
parent_node.type if parent_node parent_node&.type
end end
# Test if the node is the left of an or_asgn or op_asgn # Test if the node is the left of an or_asgn or op_asgn

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Mutator class Mutator
class Node class Node

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Mutator class Mutator
class Node class Node

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Mutator class Mutator
class Node class Node

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Mutator class Mutator
class Node class Node

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Mutator class Mutator
class Node class Node

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Mutator class Mutator
class Node class Node

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Mutator class Mutator
class Node class Node

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Mutator class Mutator
class Node class Node

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Mutator class Mutator
class Node class Node

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Mutator class Mutator
class Node class Node

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Mutator class Mutator
class Node class Node

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Mutator class Mutator
class Node class Node

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Mutator class Mutator
class Node class Node

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Mutator class Mutator
class Node class Node

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Mutator class Mutator
class Node class Node

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Mutator class Mutator
class Node class Node

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Mutator class Mutator
class Node class Node

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Mutator class Mutator
class Node class Node

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Mutator class Mutator
class Node class Node

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Mutator class Mutator
class Node class Node

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Mutator class Mutator
class Node class Node

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Mutator class Mutator
class Node class Node

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Mutator class Mutator
class Node class Node

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Mutator class Mutator
class Node class Node

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Mutator class Mutator
class Node class Node

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant module Mutant
class Mutator class Mutator
class Node class Node

Some files were not shown because too many files have changed in this diff Show more