Class: GemWatch::Check::Update
- Inherits:
-
GemWatch::Check
- Object
- GemWatch::Check
- GemWatch::Check::Update
- Defined in:
- lib/gem_watch/checks/update.rb
Overview
Implements a simple check to assure that installed gem(s) are up to date.
Instance Attribute Summary
Attributes inherited from GemWatch::Check
Instance Method Summary collapse
-
#results ⇒ Object
Displays a formated result with gem name, local and remote version.
-
#run ⇒ Object
Check if specified gem(s) are up to date.
Methods inherited from GemWatch::Check
Constructor Details
This class inherits a constructor from GemWatch::Check
Instance Method Details
#results ⇒ Object
Displays a formated result with gem name, local and remote version.
17 18 19 20 21 |
# File 'lib/gem_watch/checks/update.rb', line 17 def results @impacts.collect do |name, (local_version, remote_version)| "%-20s%-10s%s" % [name, local_version, remote_version] end end |
#run ⇒ Object
Check if specified gem(s) are up to date.
8 9 10 11 12 13 14 |
# File 'lib/gem_watch/checks/update.rb', line 8 def run if gem_name.to_s == 'all' Gem::SourceIndex.from_installed_gems.outdated.each {|g| run_on g} else run_on gem_name end end |