Push down details of strategy plugin loading
This commit is contained in:
parent
65877b0df9
commit
3edd10c964
3 changed files with 15 additions and 3 deletions
|
@ -178,7 +178,6 @@ require 'mutant/mutator/node/splat'
|
||||||
require 'mutant/mutator/node/resbody'
|
require 'mutant/mutator/node/resbody'
|
||||||
require 'mutant/mutator/node/rescue'
|
require 'mutant/mutator/node/rescue'
|
||||||
require 'mutant/mutator/node/match_current_line'
|
require 'mutant/mutator/node/match_current_line'
|
||||||
require 'mutant/config'
|
|
||||||
require 'mutant/loader'
|
require 'mutant/loader'
|
||||||
require 'mutant/context'
|
require 'mutant/context'
|
||||||
require 'mutant/context/scope'
|
require 'mutant/context/scope'
|
||||||
|
@ -206,6 +205,7 @@ require 'mutant/test'
|
||||||
require 'mutant/integration'
|
require 'mutant/integration'
|
||||||
require 'mutant/selector'
|
require 'mutant/selector'
|
||||||
require 'mutant/selector/expression'
|
require 'mutant/selector/expression'
|
||||||
|
require 'mutant/config'
|
||||||
require 'mutant/cli'
|
require 'mutant/cli'
|
||||||
require 'mutant/color'
|
require 'mutant/color'
|
||||||
require 'mutant/diff'
|
require 'mutant/diff'
|
||||||
|
|
|
@ -128,8 +128,7 @@ module Mutant
|
||||||
# @api private
|
# @api private
|
||||||
#
|
#
|
||||||
def setup_integration(name)
|
def setup_integration(name)
|
||||||
require "mutant/integration/#{name}"
|
update(integration: Integration.setup(name))
|
||||||
update(integration: Integration.lookup(name))
|
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
raise Error, "Could not load integration #{name.inspect} (you may want to try installing the gem mutant-#{name})"
|
raise Error, "Could not load integration #{name.inspect} (you may want to try installing the gem mutant-#{name})"
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,6 +6,19 @@ module Mutant
|
||||||
|
|
||||||
REGISTRY = {}
|
REGISTRY = {}
|
||||||
|
|
||||||
|
# Setup integration
|
||||||
|
#
|
||||||
|
# @param [String] name
|
||||||
|
#
|
||||||
|
# @return [Integration]
|
||||||
|
#
|
||||||
|
# @api private
|
||||||
|
#
|
||||||
|
def self.setup(name)
|
||||||
|
require "mutant/integration/#{name}"
|
||||||
|
lookup(name)
|
||||||
|
end
|
||||||
|
|
||||||
# Lookup integration for name
|
# Lookup integration for name
|
||||||
#
|
#
|
||||||
# @param [String] name
|
# @param [String] name
|
||||||
|
|
Loading…
Add table
Reference in a new issue