From 8f96b7ec69356fab941e79ef9ca7f9d4fbd0d387 Mon Sep 17 00:00:00 2001 From: John Backus Date: Sat, 24 Sep 2016 17:57:33 -0700 Subject: [PATCH] Upgrade devtools to 0.1.12 and fix reek smells --- lib/mutant/env/bootstrap.rb | 9 +++++++-- lib/mutant/reporter/cli.rb | 2 ++ lib/mutant/zombifier.rb | 7 ++++++- mutant.gemspec | 2 +- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/lib/mutant/env/bootstrap.rb b/lib/mutant/env/bootstrap.rb index 03836587..ced80d19 100644 --- a/lib/mutant/env/bootstrap.rb +++ b/lib/mutant/env/bootstrap.rb @@ -56,17 +56,22 @@ module Mutant Env.new( actor_env: Actor::Env.new(Thread), config: config, - integration: @integration, + integration: integration, matchable_scopes: matchable_scopes, mutations: subjects.flat_map(&:mutations), parser: parser, - selector: Selector::Expression.new(@integration), + selector: Selector::Expression.new(integration), subjects: subjects ) end private + # Configured mutant integration + # + # @return [Mutant::Integration] + attr_reader :integration + # Scope name from scoping object # # @param [Class, Module] scope diff --git a/lib/mutant/reporter/cli.rb b/lib/mutant/reporter/cli.rb index 635df612..a9fbd1f4 100644 --- a/lib/mutant/reporter/cli.rb +++ b/lib/mutant/reporter/cli.rb @@ -9,6 +9,8 @@ module Mutant # @param [IO] output # # @return [Reporter::CLI] + # + # :reek:ManualDispatch def self.build(output) tput = Tput.detect tty = output.respond_to?(:tty?) && output.tty? diff --git a/lib/mutant/zombifier.rb b/lib/mutant/zombifier.rb index f028b39e..51c604b1 100644 --- a/lib/mutant/zombifier.rb +++ b/lib/mutant/zombifier.rb @@ -38,6 +38,11 @@ module Mutant private + # Original require method + # + # @return [Method] + attr_reader :original + # Run zombifier # # @return [undefined] @@ -61,7 +66,7 @@ module Mutant # true if successful and false if feature already loaded def require(logical_name) logical_name = logical_name.to_s - loaded = @original.call(logical_name) + loaded = original.call(logical_name) return loaded unless include?(logical_name) @zombified << logical_name zombify(find(logical_name)) diff --git a/mutant.gemspec b/mutant.gemspec index 2f528f84..a4c60d6e 100644 --- a/mutant.gemspec +++ b/mutant.gemspec @@ -37,7 +37,7 @@ Gem::Specification.new do |gem| gem.add_runtime_dependency('concord', '~> 0.1.5') gem.add_runtime_dependency('regexp_parser', '~> 0.3.6') - gem.add_development_dependency('devtools', '= 0.1.10') + gem.add_development_dependency('devtools', '~> 0.1.12') gem.add_development_dependency('bundler', '~> 1.10') gem.add_development_dependency('ffi', '~> 1.9.6') end