Class: Dependencies::Gem
- Inherits:
-
VersionedDependency
- Object
- Dependency
- VersionedDependency
- Dependencies::Gem
- Defined in:
- lib/dependencies/gem.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, #failure?, #initialize, #output, #should_meet?, #success?, #type
Constructor Details
This class inherits a constructor from Dependency
Instance Method Details
#meet ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/dependencies/gem.rb', line 13 def meet if versioned? execute("#{sudo_string}gem install #{user_install_string}'#{dep_name}' -v '#{dep_version}'") else execute("#{sudo_string}gem install #{user_install_string}'#{name}'") end end |
#met? ⇒ Boolean
5 6 7 8 9 10 11 |
# File 'lib/dependencies/gem.rb', line 5 def met? if versioned? execute("gem list -i '^#{dep_name}$' -v '#{dep_version}'") if versioned? else execute("gem list -i '^#{name}$'") end end |
#unmeet ⇒ Object
21 22 23 24 |
# File 'lib/dependencies/gem.rb', line 21 def unmeet # do nothing; we don't want to uninstall packages and reinstall them every time true end |