Class: Quipper::Rubocop::Config::CLI
- Inherits:
-
Thor
- Object
- Thor
- Quipper::Rubocop::Config::CLI
- Defined in:
- lib/quipper/rubocop/config.rb
Constant Summary collapse
- RUBOCOP_CONFIG_FILE_NAME =
".rubocop.yml"
- RUBOCOP_TODO_FILE_NAME =
".rubocop_todo.yml"
- GITHOOK_FILE_PATH =
".git/hooks/pre-push"
Instance Method Summary collapse
Instance Method Details
#install ⇒ Object
16 17 18 19 |
# File 'lib/quipper/rubocop/config.rb', line 16 def install create_rubocop_config!(RUBOCOP_CONFIG_FILE_NAME) create_rubocop_todo_file! if [:with_todo] end |
#install_prepush ⇒ Object
22 23 24 |
# File 'lib/quipper/rubocop/config.rb', line 22 def install_prepush create_prepush_hook!(GITHOOK_FILE_PATH) end |
#uninstall ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/quipper/rubocop/config.rb', line 28 def uninstall remove_file(RUBOCOP_CONFIG_FILE_NAME) unless [:hook] remove_file(RUBOCOP_TODO_FILE_NAME) unless [:hook] remove_file(GITHOOK_FILE_PATH) puts "Uninstallation complete" end |