Use Adamantium::Flat from mbj/adamantium at configurable-freezers branch
This commit is contained in:
parent
74b704b220
commit
637ea8a849
19 changed files with 19 additions and 23 deletions
4
Gemfile
4
Gemfile
|
@ -2,10 +2,10 @@ source 'https://rubygems.org'
|
||||||
|
|
||||||
gemspec
|
gemspec
|
||||||
|
|
||||||
gem 'adamantium', :git => 'https://github.com/mbj/adamantium.git', :branch => :'no-deep-freeze-etc'
|
gem 'adamantium', :git => 'https://github.com/mbj/adamantium.git', :branch => :'configurable-freezers'
|
||||||
gem 'descendants_tracker', :git => 'https://github.com/dkubb/descendants_tracker.git'
|
gem 'descendants_tracker', :git => 'https://github.com/dkubb/descendants_tracker.git'
|
||||||
gem 'abstract_class', :git => 'https://github.com/dkubb/abstract_class.git'
|
gem 'abstract_class', :git => 'https://github.com/dkubb/abstract_class.git'
|
||||||
gem 'equalizer', :git => 'https://github.com/mbj/equalizer.git', :branch => :'adamantium-no-deep-freeze'
|
gem 'equalizer', :git => 'https://github.com/dkubb/equalizer.git'
|
||||||
gem 'anima', :git => 'https://github.com/mbj/anima.git'
|
gem 'anima', :git => 'https://github.com/mbj/anima.git'
|
||||||
gem 'to_source', :git => 'https://github.com/mbj/to_source.git'
|
gem 'to_source', :git => 'https://github.com/mbj/to_source.git'
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
module Mutant
|
module Mutant
|
||||||
# Comandline parser
|
# Comandline parser
|
||||||
class CLI
|
class CLI
|
||||||
include Adamantium
|
include Adamantium::Flat
|
||||||
|
|
||||||
# Error raised when CLI argv is inalid
|
# Error raised when CLI argv is inalid
|
||||||
Error = Class.new(RuntimeError)
|
Error = Class.new(RuntimeError)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
module Mutant
|
module Mutant
|
||||||
# Class to colorize strings
|
# Class to colorize strings
|
||||||
class Color
|
class Color
|
||||||
include Adamantium
|
include Adamantium::Flat
|
||||||
|
|
||||||
# Initialize color object
|
# Initialize color object
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
module Mutant
|
module Mutant
|
||||||
# An abstract context where mutations can be appied to.
|
# An abstract context where mutations can be appied to.
|
||||||
class Context
|
class Context
|
||||||
include Adamantium, AbstractClass
|
include Adamantium::Flat, AbstractClass
|
||||||
|
|
||||||
# Return root ast node
|
# Return root ast node
|
||||||
#
|
#
|
||||||
|
|
|
@ -2,7 +2,7 @@ module Mutant
|
||||||
class Context
|
class Context
|
||||||
# Scope context for mutation (Class or Module)
|
# Scope context for mutation (Class or Module)
|
||||||
class Scope < self
|
class Scope < self
|
||||||
include Adamantium, AbstractClass
|
include Adamantium::Flat, AbstractClass
|
||||||
|
|
||||||
# Class context for mutation
|
# Class context for mutation
|
||||||
class Class < self
|
class Class < self
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
module Mutant
|
module Mutant
|
||||||
# Class to create diffs from source code
|
# Class to create diffs from source code
|
||||||
class Differ
|
class Differ
|
||||||
include Adamantium
|
include Adamantium::Flat
|
||||||
|
|
||||||
# Return source diff
|
# Return source diff
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
module Mutant
|
module Mutant
|
||||||
# Abstract runner for mutant killers
|
# Abstract runner for mutant killers
|
||||||
class Killer
|
class Killer
|
||||||
include Adamantium, AbstractClass
|
include Adamantium::Flat, AbstractClass
|
||||||
extend MethodObject
|
extend MethodObject
|
||||||
|
|
||||||
# Test for kill failure
|
# Test for kill failure
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
module Mutant
|
module Mutant
|
||||||
# Abstract matcher to find ASTs to mutate
|
# Abstract matcher to find ASTs to mutate
|
||||||
class Matcher
|
class Matcher
|
||||||
include Enumerable, AbstractClass, Adamantium
|
include Adamantium::Flat, Enumerable, AbstractClass
|
||||||
extend DescendantsTracker
|
extend DescendantsTracker
|
||||||
|
|
||||||
# Enumerate subjects
|
# Enumerate subjects
|
||||||
|
|
|
@ -2,7 +2,7 @@ module Mutant
|
||||||
class Matcher
|
class Matcher
|
||||||
# Matcher to find AST for method
|
# Matcher to find AST for method
|
||||||
class Method < self
|
class Method < self
|
||||||
include Adamantium, Equalizer.new(:identification)
|
include Adamantium::Flat, Equalizer.new(:identification)
|
||||||
|
|
||||||
# Parse a method string into filter
|
# Parse a method string into filter
|
||||||
#
|
#
|
||||||
|
|
|
@ -3,7 +3,7 @@ module Mutant
|
||||||
class Method < self
|
class Method < self
|
||||||
# A classifier for input strings
|
# A classifier for input strings
|
||||||
class Classifier
|
class Classifier
|
||||||
include Adamantium
|
include Adamantium::Flat
|
||||||
|
|
||||||
TABLE = {
|
TABLE = {
|
||||||
'.' => Matcher::Method::Singleton,
|
'.' => Matcher::Method::Singleton,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
module Mutant
|
module Mutant
|
||||||
# Represent a mutated node with its subject
|
# Represent a mutated node with its subject
|
||||||
class Mutation
|
class Mutation
|
||||||
include Adamantium, Equalizer.new(:sha1)
|
include Adamantium::Flat, Equalizer.new(:sha1)
|
||||||
|
|
||||||
# Return mutation subject
|
# Return mutation subject
|
||||||
#
|
#
|
||||||
|
|
|
@ -2,7 +2,7 @@ module Mutant
|
||||||
class Mutation
|
class Mutation
|
||||||
# Abstract filter for mutations
|
# Abstract filter for mutations
|
||||||
class Filter
|
class Filter
|
||||||
include Adamantium, AbstractClass
|
include Adamantium::Flat, AbstractClass
|
||||||
extend DescendantsTracker
|
extend DescendantsTracker
|
||||||
|
|
||||||
# Check for match
|
# Check for match
|
||||||
|
|
|
@ -2,7 +2,7 @@ module Mutant
|
||||||
class Mutation
|
class Mutation
|
||||||
class Filter
|
class Filter
|
||||||
class Whitelist < self
|
class Whitelist < self
|
||||||
include Adamantium, Equalizer.new(:whitelist)
|
include Adamantium::Flat, Equalizer.new(:whitelist)
|
||||||
|
|
||||||
# Test for match
|
# Test for match
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
module Mutant
|
module Mutant
|
||||||
# Generator for mutations
|
# Generator for mutations
|
||||||
class Mutator
|
class Mutator
|
||||||
include Adamantium, AbstractClass
|
include Adamantium::Flat, AbstractClass
|
||||||
|
|
||||||
# Enumerate mutations on node
|
# Enumerate mutations on node
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
module Mutant
|
module Mutant
|
||||||
# Abstract reporter
|
# Abstract reporter
|
||||||
class Reporter
|
class Reporter
|
||||||
include Adamantium, AbstractClass
|
include Adamantium::Flat, AbstractClass
|
||||||
|
|
||||||
# Report subject
|
# Report subject
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
module Mutant
|
module Mutant
|
||||||
# Runner that allows to mutate an entire project
|
# Runner that allows to mutate an entire project
|
||||||
class Runner
|
class Runner
|
||||||
include Adamantium, Anima
|
include Adamantium::Flat, Anima
|
||||||
extend MethodObject
|
extend MethodObject
|
||||||
|
|
||||||
attribute :matcher
|
attribute :matcher
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
module Mutant
|
module Mutant
|
||||||
# Subject of mutation
|
# Subject of mutation
|
||||||
class Subject
|
class Subject
|
||||||
include Adamantium, Enumerable
|
include Adamantium::Flat, Enumerable
|
||||||
|
|
||||||
# Return context
|
# Return context
|
||||||
#
|
#
|
||||||
|
|
|
@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
|
||||||
gem.extra_rdoc_files = %w[TODO]
|
gem.extra_rdoc_files = %w[TODO]
|
||||||
|
|
||||||
gem.add_runtime_dependency('to_source', '~> 0.1.3')
|
gem.add_runtime_dependency('to_source', '~> 0.1.3')
|
||||||
gem.add_runtime_dependency('ice_nine', '~> 0.4.0')
|
gem.add_runtime_dependency('ice_nine', '~> 0.5.0')
|
||||||
gem.add_runtime_dependency('descendants_tracker', '~> 0.0.1')
|
gem.add_runtime_dependency('descendants_tracker', '~> 0.0.1')
|
||||||
gem.add_runtime_dependency('backports', '~> 2.6')
|
gem.add_runtime_dependency('backports', '~> 2.6')
|
||||||
gem.add_runtime_dependency('adamantium', '~> 0.0.1')
|
gem.add_runtime_dependency('adamantium', '~> 0.0.1')
|
||||||
|
|
|
@ -5,10 +5,6 @@ module TestApp
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.freeze
|
|
||||||
raise
|
|
||||||
end
|
|
||||||
|
|
||||||
def string
|
def string
|
||||||
'string'
|
'string'
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue