summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-07-24 13:30:56 +0200
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-07-24 13:46:57 +0200
commit832fb900f092faf0e6ae6937d98384f8d61e5336 (patch)
tree4686115f9ed62b676bc64d5b09357d0e9bdccc81
parent69bee117fbd0aa9d05bdc73cd370dc5c5dc80876 (diff)
downloadbundler-832fb900f092faf0e6ae6937d98384f8d61e5336.tar.gz
Move `options_include_groups` to an attribute
Co-authored-by: Guillermo Guerrero <wolf.fox1985@gmail.com> Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
-rw-r--r--lib/bundler/cli/outdated.rb10
1 files changed, 5 insertions, 5 deletions
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|