diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-19 18:15:26 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-19 18:15:26 +0000 |
commit | 08837d081d764af01a30d325007c3c9527e383a6 (patch) | |
tree | 227a49d530df51dd8f00972a4637bd568a3ca717 /lib/rubygems | |
parent | 4394ffe521ca03b22761ce4d4afed6645a62ea3d (diff) | |
download | ruby-08837d081d764af01a30d325007c3c9527e383a6.tar.gz |
Update to RubyGems 1.1.1 r1784 (pre 1.2)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems')
-rw-r--r-- | lib/rubygems/commands/dependency_command.rb | 11 | ||||
-rw-r--r-- | lib/rubygems/config_file.rb | 1 |
2 files changed, 10 insertions, 2 deletions
diff --git a/lib/rubygems/commands/dependency_command.rb b/lib/rubygems/commands/dependency_command.rb index 8fae87c90f..44b269bb11 100644 --- a/lib/rubygems/commands/dependency_command.rb +++ b/lib/rubygems/commands/dependency_command.rb @@ -43,14 +43,21 @@ class Gem::Commands::DependencyCommand < Gem::Command end def execute - options[:args] << '.' if options[:args].empty? + options[:args] << '' if options[:args].empty? specs = {} source_indexes = Hash.new do |h, source_uri| h[source_uri] = Gem::SourceIndex.new end - pattern = /\A#{Regexp.union(*options[:args])}/ + pattern = if options[:args].length == 1 and + options[:args].first =~ /\A\/(.*)\/(i)?\z/m then + flags = $2 ? Regexp::IGNORECASE : nil + Regexp.new $1, flags + else + /\A#{Regexp.union(*options[:args])}/ + end + dependency = Gem::Dependency.new pattern, options[:version] if options[:reverse_dependencies] and remote? and not local? then diff --git a/lib/rubygems/config_file.rb b/lib/rubygems/config_file.rb index c657bf7f01..8cea513790 100644 --- a/lib/rubygems/config_file.rb +++ b/lib/rubygems/config_file.rb @@ -79,6 +79,7 @@ class Gem::ConfigFile arg_list = arg_list.map do |arg| if need_config_file_name then @config_file_name = arg + need_config_file_name = false nil elsif arg =~ /^--config-file=(.*)/ then @config_file_name = $1 |