Class: PolishGeeks::DevTools::Config
- Inherits:
-
Object
- Object
- PolishGeeks::DevTools::Config
- Defined in:
- lib/polishgeeks/dev-tools/config.rb
Overview
Note:
No commands are enabled by default
Configurator for enabling specific command runners Config.configure do |conf|
conf.rubocop = true
end
Constant Summary collapse
- COMMANDS =
Available commands All commands will be executed in this order (first rubocop, then rspec, etc)
%i( readme expires_in brakeman rubocop final_blank_line empty_method haml_lint allowed_extensions yml_parser rspec_files_names rspec_files_structure tasks_files_names rspec simplecov yard examples_comparator rubycritic )
Class Attribute Summary collapse
-
.config ⇒ PolishGeeks::DevTools::Config
Config for dev tools.
Instance Attribute Summary collapse
-
#simplecov_threshold ⇒ Object
Returns the value of attribute simplecov_threshold.
Class Method Summary collapse
-
.setup(&block) ⇒ Object
Configurating method.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
Initializes configuration and turn on by default all the commands.
Constructor Details
Class Attribute Details
.config ⇒ PolishGeeks::DevTools::Config
Note:
We check if it initialized, because if user wants to use it with all the commands enabled and without any changes, he won’t create a polishgeeks_dev_tools.rb initializer file so we need to configure it with defaults
Returns config for dev tools.
18 19 20 |
# File 'lib/polishgeeks/dev-tools/config.rb', line 18 def config @config end |
Instance Attribute Details
#simplecov_threshold ⇒ Object
Returns the value of attribute simplecov_threshold.
23 24 25 |
# File 'lib/polishgeeks/dev-tools/config.rb', line 23 def simplecov_threshold @simplecov_threshold end |
Class Method Details
.setup(&block) ⇒ Object
Configurating method
76 77 78 79 80 81 |
# File 'lib/polishgeeks/dev-tools/config.rb', line 76 def self.setup(&block) self.config = new block.call(config) config.freeze end |