Class: RailsNewApp::RubyLinterProcessor
- Inherits:
-
Processor
- Object
- Processor
- RailsNewApp::RubyLinterProcessor
show all
- Defined in:
- lib/rails-new-app/processors/ruby_linter_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
14
15
16
17
18
19
20
|
# File 'lib/rails-new-app/processors/ruby_linter_processor.rb', line 14
def configure(config)
puts "Processing Ruby Linter config"
case config[:ruby_linter][:key]
when "rubocop" then apply_template "rubocop-config"
when "standardrb" then apply_template "standardrb-config"
end
end
|
#update_gemfile(config) ⇒ Object
3
4
5
6
7
8
9
10
11
12
|
# File 'lib/rails-new-app/processors/ruby_linter_processor.rb', line 3
def update_gemfile(config)
case config[:ruby_linter][:key]
when "rubocop", "standardrb"
apply_template "#{config[:ruby_linter][:key]}-gemfile"
case config[:test_runner][:key]
when "minitest" then apply_template "rubocop-minitest-gemfile"
when "rspec" then apply_template "rubocop-rspec-gemfile"
end
end
end
|