Class: Hoboken::AddOns::Metrics
- Inherits:
-
Group
- Object
- Thor::Group
- Group
- Hoboken::AddOns::Metrics
show all
- Defined in:
- lib/hoboken/add_ons/metrics.rb
Overview
Add metrics (flog, flay, simplecov).
Instance Method Summary
collapse
Methods inherited from Group
#classic?, #modular?, #rspec?, #rubocop?, #sequel?, source_root
#gem, #indent
Instance Method Details
#add_gems ⇒ Object
8
9
10
11
12
|
# File 'lib/hoboken/add_ons/metrics.rb', line 8
def add_gems
gem 'flog', version: '4.6', group: :test
gem 'flay', version: '2.12', group: :test
gem 'simplecov', version: '0.21', require: false, group: :test
end
|
#copy_task_templates ⇒ Object
14
15
16
17
|
# File 'lib/hoboken/add_ons/metrics.rb', line 14
def copy_task_templates
empty_directory('tasks')
template('hoboken/templates/metrics.rake.tt', 'tasks/metrics.rake')
end
|
#reminders ⇒ Object
35
36
37
|
# File 'lib/hoboken/add_ons/metrics.rb', line 35
def reminders
say "\nGemfile updated... don't forget to 'bundle install'"
end
|
#simplecov_rspec ⇒ Object
27
28
29
30
31
32
33
|
# File 'lib/hoboken/add_ons/metrics.rb', line 27
def simplecov_rspec
return unless rspec?
insert_into_file 'spec/spec_helper.rb', before: snippet_location do
snippet('spec')
end
end
|
#simplecov_test_unit ⇒ Object
19
20
21
22
23
24
25
|
# File 'lib/hoboken/add_ons/metrics.rb', line 19
def simplecov_test_unit
return if rspec?
insert_into_file 'test/test_helper.rb', before: snippet_location do
snippet('test')
end
end
|