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:
parent
e33dd659d4
commit
4e76aef280
1 changed files with 5 additions and 5 deletions
|
@ -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|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue