From 4e76aef280f8440a9e499a05a2d74e6f2ba7cdd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Wed, 24 Jul 2019 13:30:56 +0200 Subject: [bundler/bundler] Move `options_include_groups` to an attribute MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Guillermo Guerrero Co-authored-by: David Rodríguez https://github.com/bundler/bundler/commit/832fb900f0 --- lib/bundler/cli/outdated.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/bundler/cli') diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb index 2075fe83c8..4fa41a7a6f 100644 --- a/lib/bundler/cli/outdated.rb +++ b/lib/bundler/cli/outdated.rb @@ -2,11 +2,15 @@ module Bundler class CLI::Outdated - attr_reader :options, :gems + attr_reader :options, :gems, :options_include_groups def initialize(options, gems) @options = options @gems = gems + + @options_include_groups = [:group, :groups].select do |v| + options.keys.include?(v.to_s) + end end def run @@ -115,10 +119,6 @@ module Bundler end end - options_include_groups = [:group, :groups].select do |v| - options.keys.include?(v.to_s) - end - if options_include_groups.any? ordered_groups = outdated_gems_by_groups.keys.compact.sort [nil, ordered_groups].flatten.each do |groups| -- cgit v1.2.3