diff options
-rw-r--r-- | lib/rubygems/commands/dependency_command.rb | 40 |
1 files changed, 25 insertions, 15 deletions
@@ -61,10 +61,16 @@ use with other commands. ss.map { |spec, _| spec } end - def fetch_specs dependency # :nodoc: specs = [] - specs.concat dependency.matching_specs if local? specs.concat fetch_remote_specs dependency if remote? ensure_specs specs @@ -72,16 +78,7 @@ use with other commands. specs.uniq.sort end - def gem_dependency args, version, prerelease # :nodoc: - args << '' if args.empty? - - pattern = if args.length == 1 and args.first =~ /\A\/(.*)\/(i)?\z/m then - flags = $2 ? Regexp::IGNORECASE : nil - Regexp.new $1, flags - else - /\A#{Regexp.union(*args)}/ - end - dependency = Gem::Deprecate.skip_during { Gem::Dependency.new pattern, version } @@ -121,10 +118,12 @@ use with other commands. def execute ensure_local_only_reverse_dependencies dependency = - gem_dependency options[:args], options[:version], options[:prerelease] - specs = fetch_specs dependency reverse = reverse_dependencies specs @@ -203,5 +202,16 @@ use with other commands. result end -end |