Class: Maintainer::GitRunner
- Inherits:
-
Object
- Object
- Maintainer::GitRunner
- Defined in:
- lib/maintainer_core/gitRunner.rb
Class Method Summary collapse
Class Method Details
.install_git! ⇒ Object
8 9 10 11 |
# File 'lib/maintainer_core/gitRunner.rb', line 8 def install_git!() Writer.write(message: "Setting up git..\n This will require sudo access. Sudo access means .... but don't worry, you'll be entering it directly into your machine, I can't see what you type.") CommandRunner.execute(command: Commands::Git::Install, error: nil) end |
.is_git_installed! ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/maintainer_core/gitRunner.rb', line 13 def is_git_installed!() version = CommandRunner.execute(command: Commands::Git::Version, error: nil) if /^(\d+)(.\d+)?(.\d+)?$/ =~ version return true end puts "VERSION: #{version}" return false end |
.uninstall_git! ⇒ Object
4 5 6 |
# File 'lib/maintainer_core/gitRunner.rb', line 4 def uninstall_git!() CommandRunner.execute(command: Commands::Git::Uninstall, error: nil) end |