Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix --config-file option with no equals and subsequent options to pro…

…perly assign config file. Previously config file was overwritten by subsequent option. Fixes Bug 16688.

git-svn-id: http://rubygems.rubyforge.org/svn/trunk@1781 3d4018f9-ac1a-0410-99e9-8a154d859a19
  • Loading branch information...
commit 7ad0d11c60b092ad0f34b8f16b6ca34a772c089d 1 parent 9a96d64
thewoolleyman authored
View
11 ChangeLog
@@ -1,9 +1,16 @@
+2008-06-18 Chad Woolley <thewoolleyman@gmail.com>
+
+ * lib/rubygems/config_file.rb: Fix --config-file option with no
+ equals and subsequent options to properly assign config file.
+ Previously config file was overwritten by subsequent option.
+ Fixes Bug 16688.
+
2008-06-17 Eric Hodel <drbrain@segment7.net>
* lib/rubygems/version.rb: Gem::Version #hash and #eql? now operate
on the version string, terms of the version string, so "1" and "1.0"
no longer correspond to the same slot. Fixes indexer bug reported by
- Chad Wooley.
+ Chad Woolley.
* setup.rb: Fix --format-executable. Patch #20698 by Richard Brown.
* util/gem_prelude.rb: Prevent infinite recursion, check for Gem now.
Patch from ruby trunk by nobu.
@@ -24,7 +31,7 @@
2008-06-15 Eric Hodel <drbrain@segment7.net>
* lib/rubygems/server.rb: Store off if we are returning Marshal
- format before running =~ again. Fixes bug reported by Chad Wooley.
+ format before running =~ again. Fixes bug reported by Chad Woolley.
* lib/rubygems/commands/stale_command.rb: `gem stale` lists gems by
last access time. Patch #20593 by Aaron Patterson.
* lib/rubygems/setup.rb: Add --vendor and --destdir to setup.rb for
View
1  lib/rubygems/config_file.rb
@@ -79,6 +79,7 @@ def initialize(arg_list)
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
View
6 test/test_gem_config_file.rb
@@ -72,6 +72,12 @@ def test_initialize_handle_arguments_config_file
assert_equal @temp_conf, @cfg.config_file_name
end
+ def test_initialize_handle_arguments_config_file_with_other_params
+ util_config_file %W[--config-file #{@temp_conf} --backtrace]
+
+ assert_equal @temp_conf, @cfg.config_file_name
+ end
+
def test_initialize_handle_arguments_config_file_equals
util_config_file %W[--config-file=#{@temp_conf}]
Please sign in to comment.
Something went wrong with that request. Please try again.