Class: GemOutdatedChecker::GemList
- Inherits:
-
Object
- Object
- GemOutdatedChecker::GemList
- Extended by:
- Config
- Defined in:
- lib/gem_outdated_checker.rb
Constant Summary
Constants included from Config
Instance Method Summary collapse
-
#initialize ⇒ GemList
constructor
A new instance of GemList.
- #outdated_gems ⇒ Object
- #update_pending_gems ⇒ Object
- #update_required_gems ⇒ Object
Methods included from Config
Constructor Details
#initialize ⇒ GemList
Returns a new instance of GemList.
11 12 13 14 |
# File 'lib/gem_outdated_checker.rb', line 11 def initialize @exclude_gems = configs[:exclude_gems] || [] @bundle_path = configs[:bundle_path] || 'bundle'.freeze end |
Instance Method Details
#outdated_gems ⇒ Object
16 17 18 19 |
# File 'lib/gem_outdated_checker.rb', line 16 def outdated_gems bundle_outdated unless @execed @outdated_gems ||= @out.split("\n").grep(/\*/) end |
#update_pending_gems ⇒ Object
29 30 31 |
# File 'lib/gem_outdated_checker.rb', line 29 def update_pending_gems @update_pending_gems ||= outdated_gems - update_required_gems end |
#update_required_gems ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/gem_outdated_checker.rb', line 21 def update_required_gems return outdated_gems if @exclude_gems.empty? @update_required_gems ||= outdated_gems.reject do |gem_name| @exclude_gems.any?{ |pg| gem_name =~ /#{pg}/ } end end |