class Maintainer::PipRunner
Public Class Methods
install(pkg: nil)
click to toggle source
# File lib/maintainer_core/pipRunner.rb, line 16 def install(pkg: nil) # if not self.is_pip_installed! # self.install_pip! # end CommandRunner.execute(command: "pip3 install #{pkg}", error: nil) end
install_pip!()
click to toggle source
# File lib/maintainer_core/pipRunner.rb, line 12 def install_pip!() CommandRunner.execute(command: Commands::Pip::Install, error: nil) end
is_pip_installed!()
click to toggle source
# File lib/maintainer_core/pipRunner.rb, line 23 def is_pip_installed!() version = CommandRunner.execute(command: Commands::Pip::Version, error: nil) if /^(\d+)(.\d+)?(.\d+)?$/ =~ version return true end puts "pip not installed" return true end
uninstall_pip!()
click to toggle source
# File lib/maintainer_core/pipRunner.rb, line 8 def uninstall_pip!() CommandRunner.execute(command: Commands::Pip::Uninstall, error: nil) end