Class: RailsNewApp::CodeCoverageProcessor

Inherits:
Processor
  • Object
show all
Defined in:
lib/rails-new-app/processors/code_coverage_processor.rb

Constant Summary

Constants inherited from Processor

Processor::PATH

Instance Method Summary collapse

Methods inherited from Processor

#apply_template, configure, update_gemfile

Instance Method Details

#configure(config) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/rails-new-app/processors/code_coverage_processor.rb', line 11

def configure(config)
  return if config[:test_runner][:key] == ""

  puts "Processing Code Coverage config"
  case config[:code_coverage][:key]
  when "simplecov" then apply_template "simplecov-#{config[:test_runner][:key]}-config"
  end
end

#update_gemfile(config) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/rails-new-app/processors/code_coverage_processor.rb', line 3

def update_gemfile(config)
  return if config[:test_runner][:key] == ""

  case config[:code_coverage][:key]
  when "simplecov" then apply_template "simplecov-gemfile"
  end
end