1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[bundler/bundler] 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>

832fb900f0
This commit is contained in:
David Rodríguez 2019-07-24 13:30:56 +02:00 committed by Hiroshi SHIBATA
parent e33dd659d4
commit 4e76aef280
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2

View file

@ -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|