Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Remove unnecessary outdated_gems_by_groups
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez committed Sep 25, 2019
1 parent 041271a commit b7bc8d4
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/bundler/cli/outdated.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Bundler
class CLI::Outdated
attr_reader :options, :gems, :options_include_groups, :filter_options_patch, :sources, :strict
attr_accessor :outdated_gems_by_groups, :outdated_gems_list
attr_accessor :outdated_gems_list

def initialize(options, gems)
@options = options
Expand All @@ -12,7 +12,6 @@ def initialize(options, gems)

@filter_options_patch = options.keys & %w[filter-major filter-minor filter-patch]

@outdated_gems_by_groups = {}
@outdated_gems_list = []

@options_include_groups = [:group, :groups].any? do |v|
Expand Down Expand Up @@ -92,9 +91,6 @@ def run
:current_spec => current_spec,
:dependency => dependency,
:groups => groups }

outdated_gems_by_groups[groups] ||= []
outdated_gems_by_groups[groups] << outdated_gems_list[-1]
end

if outdated_gems_list.empty?
Expand All @@ -105,7 +101,7 @@ def run
end

if options_include_groups
outdated_gems_by_groups.sort.each do |groups, gems|
outdated_gems_list.group_by {|g| g[:groups] }.sort.each do |groups, gems|
contains_group = groups.split(", ").include?(options[:group])
next unless options[:groups] || contains_group

Expand Down

0 comments on commit b7bc8d4

Please sign in to comment.