Class: Dependencies::Apt
- Inherits:
-
VersionedDependency
- Object
- Dependency
- VersionedDependency
- Dependencies::Apt
- Defined in:
- lib/dependencies/apt.rb
Constant Summary
Constants inherited from VersionedDependency
VersionedDependency::VERSION_SEPARATOR
Constants inherited from Dependency
Dependency::DESCRIPTION_TYPE_WIDTH
Instance Attribute Summary
Attributes inherited from Dependency
Instance Method Summary collapse
Methods inherited from VersionedDependency
#dep_name, #dep_version, #versioned?
Methods inherited from Dependency
#always_act?, #exit_code, #initialize, #output, #success?, #type
Constructor Details
This class inherits a constructor from Dependency
Instance Method Details
#meet ⇒ Object
14 15 16 |
# File 'lib/dependencies/apt.rb', line 14 def meet execute("#{sudo_string}apt-get install -y #{name}") end |
#met? ⇒ Boolean
8 9 10 11 12 |
# File 'lib/dependencies/apt.rb', line 8 def met? return apt_cache_policy.installed_version == dep_version if dep_version apt_cache_policy.installed? end |
#should_meet? ⇒ Boolean
23 24 25 |
# File 'lib/dependencies/apt.rb', line 23 def should_meet? `uname`.chomp == "Linux" && system("which apt-get") end |
#unmeet ⇒ Object
18 19 20 21 |
# File 'lib/dependencies/apt.rb', line 18 def unmeet # do nothing; we don't want to uninstall packages and reinstall them every time true end |