Sha256: a7bd1a89312d408207b7f7789317475cc5037b8e7c3a0113cf588aafdc478bb0
Contents?: true
Size: 1.46 KB
Versions: 9
Compression:
Stored size: 1.46 KB
Contents
# frozen_string_literal: true require 'avm/eac_ruby_base1/rubygems/gemspec' require 'avm/eac_ruby_base1/sources/update_dependency_requirements' require 'eac_cli/core_ext' module Avm module EacRubyBase1 module Sources module Runners class UpdateDependenciesRequirements runner_with :help do bool_opt '-a', '--all' arg_opt '-e', '--exclude', repeat: true pos_arg :gem_name, repeat: true, optional: true end def run runner_context.call(:source_banner) infov 'Gems to update', gem_names.count gem_names.each do |gem_name| infov 'Gem to update', gem_name ::Avm::EacRubyBase1::Sources::UpdateDependencyRequirements .new(runner_context.call(:source), gem_name).perform end end def gemspec ::Avm::EacRubyBase1::Rubygems::Gemspec.from_file( runner_context.call(:source).gemspec_path ) end private def exclude?(gem_name) parsed.exclude.include?(gem_name) end def gem_names_uncached ::Set.new(parsed.gem_name + gem_names_from_all).reject { |gem_name| exclude?(gem_name) } .sort end def gem_names_from_all return [] unless parsed.all? gemspec.dependencies.map(&:gem_name) end end end end end end
Version data entries
9 entries across 9 versions & 2 rubygems