Class: Arli::Actions::GitRepo
- Includes:
- Helpers::SystemCommands
- Defined in:
- lib/arli/actions/git_repo.rb
Constant Summary
Constants included from Helpers::Output
Helpers::Output::CHAR_FAILURE, Helpers::Output::CHAR_SUCCESS
Instance Attribute Summary
Attributes inherited from Action
Instance Method Summary collapse
Methods included from Helpers::SystemCommands
#backup!, #handle_preexisting_folder, #run_system_command
Methods included from Helpers::Output
#___, #__p, #__pf, #__pt, #abort?, #action_fail, #action_ok, #backup?, #cursor, #debug, #debug?, disable!, enable!, enabled?, #error, #fuck, #header, #hr, #indent_cursor, #info, #ok, #overwrite?, #print_action_failure, #print_action_starting, #print_action_success, #print_target_dir, #quiet?, #raise_invalid_arli_command!, #report_exception, #verbose?
Methods inherited from Action
inherited, #initialize, #mv, #run!, #supported?, #to_s
Methods included from Helpers::Inherited
Constructor Details
This class inherits a constructor from Arli::Actions::Action
Instance Method Details
#execute ⇒ Object
14 15 16 17 |
# File 'lib/arli/actions/git_repo.rb', line 14 def execute run_system_command(git_clone_command) print_action_success('cloned', "cloned from #{library.url}") end |
#git_clone_command ⇒ Object
23 24 25 |
# File 'lib/arli/actions/git_repo.rb', line 23 def git_clone_command "git clone -v #{library.url} #{library.dir} 2>&1" end |
#git_update_command ⇒ Object
19 20 21 |
# File 'lib/arli/actions/git_repo.rb', line 19 def git_update_command "cd #{library.path} && git pull --rebase 2>&1" end |