[rubygems/rubygems] util/rubocop -A --only Layout/SpaceBeforeComma

https://github.com/rubygems/rubygems/commit/4a5b70b508
This commit is contained in:
Hiroshi SHIBATA 2023-03-16 11:26:53 +09:00
parent 23150e0274
commit 7c1d590a8a
7 changed files with 13 additions and 13 deletions

View File

@ -1303,7 +1303,7 @@ class TestGem < Gem::TestCase
Gem.paths = { "foo" => [],
"bar" => Object.new,
"GEM_HOME" => Gem.paths.home,
"GEM_PATH" => "foo"}
"GEM_PATH" => "foo" }
end
assert_equal ["foo", Gem.paths.home], Gem.paths.path
assert_equal "", stderr
@ -1312,14 +1312,14 @@ class TestGem < Gem::TestCase
def test_setting_paths_does_not_mutate_parameter_object
Gem.paths = { "GEM_HOME" => Gem.paths.home,
"GEM_PATH" => "foo"} .freeze
"GEM_PATH" => "foo" } .freeze
assert_equal ["foo", Gem.paths.home], Gem.paths.path
end
def test_deprecated_paths=
stdout, stderr = capture_output do
Gem.paths = { "GEM_HOME" => Gem.paths.home,
"GEM_PATH" => [Gem.paths.home, "foo"]}
"GEM_PATH" => [Gem.paths.home, "foo"] }
end
assert_equal [Gem.paths.home, "foo"], Gem.paths.path
assert_match(/Array values in the parameter to `Gem.paths=` are deprecated.\nPlease use a String or nil/m, stderr)

View File

@ -91,7 +91,7 @@ class TestGemCommandsOpenCommand < Gem::TestCase
end
end
assert_match %r{'foo' is a default gem and can't be opened\.} , @ui.output
assert_match %r{'foo' is a default gem and can't be opened\.}, @ui.output
assert_equal "", @ui.error
end
end

View File

@ -360,7 +360,7 @@ class TestGemCommandsUninstallCommand < Gem::InstallerTestCase
gemhome2 = "#{@gemhome}2"
a_4, = util_gem "a", 4
install_gem a_4 , :install_dir => gemhome2
install_gem a_4, :install_dir => gemhome2
assert_gems_presence "a-4", dirs: [@gemhome, gemhome2]
@ -379,7 +379,7 @@ class TestGemCommandsUninstallCommand < Gem::InstallerTestCase
gemhome2 = "#{@gemhome}2"
a_4, = util_gem "a", 4
install_gem a_4 , :install_dir => gemhome2
install_gem a_4, :install_dir => gemhome2
assert_gems_presence "a-4", dirs: [@gemhome, gemhome2]

View File

@ -330,7 +330,7 @@ if you believe they were disclosed to a third party.
util_config_file
assert_equal({ :rubygems => "701229f217cdf23b1344c7b4b54ca97",
:other => "a5fdbb6ba150cbb83aad2bb2fede64c"} , @cfg.api_keys)
:other => "a5fdbb6ba150cbb83aad2bb2fede64c" }, @cfg.api_keys)
end
def test_load_api_keys_bad_permission

View File

@ -39,7 +39,7 @@ class TestGemResolverAPISet < Gem::TestCase
{ :name => "a",
:number => "1",
:platform => "ruby",
:dependencies => []} ,
:dependencies => [] },
]
@fetcher.data["#{@dep_uri}a"] = "---\n1 "
@ -62,11 +62,11 @@ class TestGemResolverAPISet < Gem::TestCase
{ :name => "a",
:number => "1",
:platform => "ruby",
:dependencies => []} ,
:dependencies => [] },
{ :name => "a",
:number => "2.a",
:platform => "ruby",
:dependencies => []} ,
:dependencies => [] },
]
@fetcher.data["#{@dep_uri}a"] = "---\n1\n2.a"
@ -91,7 +91,7 @@ class TestGemResolverAPISet < Gem::TestCase
{ :name => "a",
:number => "1",
:platform => "ruby",
:dependencies => []} ,
:dependencies => [] },
]
@fetcher.data["#{@dep_uri}a"] = "---\n1 "

View File

@ -2992,7 +2992,7 @@ Please report a bug if this causes problems.
def set_orig(cls)
s_cls = cls.singleton_class
s_cls.send :alias_method, :orig_unresolved_deps , :unresolved_deps
s_cls.send :alias_method, :orig_unresolved_deps, :unresolved_deps
s_cls.send :alias_method, :orig_find_all_by_name, :find_all_by_name
end

View File

@ -69,6 +69,6 @@ class GemTest < Gem::TestCase
end
def ruby_with_rubygems_and_fake_operating_system_in_load_path(operating_system_path)
[Gem.ruby, "-I", operating_system_path, "-I" , $LOAD_PATH.find {|p| p == File.dirname($LOADED_FEATURES.find {|f| f.end_with?("/rubygems.rb") }) }]
[Gem.ruby, "-I", operating_system_path, "-I", $LOAD_PATH.find {|p| p == File.dirname($LOADED_FEATURES.find {|f| f.end_with?("/rubygems.rb") }) }]
end
end