diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-05-03 19:56:58 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-03-30 12:48:23 +0900 |
commit | 061add792e658878c839887682716737d9f6d677 (patch) | |
tree | b111148a604c7f2ab09f26b1804a2725d7c19680 | |
parent | c16815cca7c223698c11b4c520b75caeb0499f93 (diff) | |
download | ruby-061add792e658878c839887682716737d9f6d677.tar.gz |
[rubygems/rubygems] Enable `Style/ExtraSpacing` and auto-correct
https://github.com/rubygems/rubygems/commit/6fa0b1b679
30 files changed, 90 insertions, 90 deletions
diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb index d4ff4a262c..0e83f1b006 100644 --- a/lib/rubygems/defaults.rb +++ b/lib/rubygems/defaults.rb @@ -115,7 +115,7 @@ module Gem # The default directory for binaries def self.default_bindir - if defined? RUBY_FRAMEWORK_VERSION # mac framework support + if defined? RUBY_FRAMEWORK_VERSION # mac framework support '/usr/bin' else # generic install RbConfig::CONFIG['bindir'] diff --git a/lib/rubygems/install_update_options.rb b/lib/rubygems/install_update_options.rb index dbf787c7ba..65c2f300ed 100644 --- a/lib/rubygems/install_update_options.rb +++ b/lib/rubygems/install_update_options.rb @@ -30,7 +30,7 @@ module Gem::InstallUpdateOptions options[:bin_dir] = File.expand_path(value) end - add_option(:"Install/Update", '--document [TYPES]', Array, + add_option(:"Install/Update", '--document [TYPES]', Array, 'Generate documentation for installed gems', 'List the documentation types you wish to', 'generate. For example: rdoc,ri') do |value, options| @@ -88,7 +88,7 @@ module Gem::InstallUpdateOptions options[:ignore_dependencies] = value end - add_option(:"Install/Update", '--[no-]format-executable', + add_option(:"Install/Update", '--[no-]format-executable', 'Make installed executable names match Ruby.', 'If Ruby is ruby18, foo_exec will be', 'foo_exec18') do |value, options| diff --git a/lib/rubygems/platform.rb b/lib/rubygems/platform.rb index 521c552bea..1692eb7e5d 100644 --- a/lib/rubygems/platform.rb +++ b/lib/rubygems/platform.rb @@ -56,7 +56,7 @@ class Gem::Platform when String then arch = arch.split '-' - if arch.length > 2 and arch.last !~ /\d/ # reassemble x86-linux-gnu + if arch.length > 2 and arch.last !~ /\d/ # reassemble x86-linux-gnu extra = arch.pop arch.last << "-#{extra}" end @@ -68,7 +68,7 @@ class Gem::Platform else cpu end - if arch.length == 2 and arch.last =~ /^\d+(\.\d+)?$/ # for command-line + if arch.length == 2 and arch.last =~ /^\d+(\.\d+)?$/ # for command-line @os, @version = arch return end diff --git a/lib/rubygems/remote_fetcher.rb b/lib/rubygems/remote_fetcher.rb index b37ebc15fd..e260926da8 100644 --- a/lib/rubygems/remote_fetcher.rb +++ b/lib/rubygems/remote_fetcher.rb @@ -118,7 +118,7 @@ class Gem::RemoteFetcher def download(spec, source_uri, install_dir = Gem.dir) cache_dir = - if Dir.pwd == install_dir # see fetch_command + if Dir.pwd == install_dir # see fetch_command install_dir elsif File.writable? install_dir File.join install_dir, "cache" diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index 3a2a6090fd..6c37555dd0 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -720,7 +720,7 @@ class Gem::Specification < Gem::BasicSpecification # Deprecated: You must now specify the executable name to Gem.bin_path. attr_writer :default_executable - deprecate :default_executable=, :none, 2018, 12 + deprecate :default_executable=, :none, 2018, 12 ## # Allows deinstallation of gems with legacy platforms. @@ -733,7 +733,7 @@ class Gem::Specification < Gem::BasicSpecification # Formerly used to set rubyforge project. attr_writer :rubyforge_project - deprecate :rubyforge_project=, :none, 2019, 12 + deprecate :rubyforge_project=, :none, 2019, 12 ## # The Gem::Specification version of this gemspec. @@ -1725,7 +1725,7 @@ class Gem::Specification < Gem::BasicSpecification end result end - deprecate :default_executable, :none, 2018, 12 + deprecate :default_executable, :none, 2018, 12 ## # The default value for specification attribute +name+ @@ -1928,7 +1928,7 @@ class Gem::Specification < Gem::BasicSpecification def has_rdoc # :nodoc: true end - deprecate :has_rdoc, :none, 2018, 12 + deprecate :has_rdoc, :none, 2018, 12 ## # Deprecated and ignored. @@ -1938,10 +1938,10 @@ class Gem::Specification < Gem::BasicSpecification def has_rdoc=(ignored) # :nodoc: @has_rdoc = true end - deprecate :has_rdoc=, :none, 2018, 12 + deprecate :has_rdoc=, :none, 2018, 12 alias :has_rdoc? :has_rdoc # :nodoc: - deprecate :has_rdoc?, :none, 2018, 12 + deprecate :has_rdoc?, :none, 2018, 12 ## # True if this gem has files in test_files diff --git a/lib/rubygems/specification_policy.rb b/lib/rubygems/specification_policy.rb index a50fafbc82..d9f415d25f 100644 --- a/lib/rubygems/specification_policy.rb +++ b/lib/rubygems/specification_policy.rb @@ -8,7 +8,7 @@ class Gem::SpecificationPolicy SPECIAL_CHARACTERS = /\A[#{Regexp.escape('.-_')}]+/.freeze # :nodoc: - VALID_URI_PATTERN = %r{\Ahttps?:\/\/([^\s:@]+:[^\s:@]*@)?[A-Za-z\d\-]+(\.[A-Za-z\d\-]+)+\.?(:\d{1,5})?([\/?]\S*)?\z}.freeze # :nodoc: + VALID_URI_PATTERN = %r{\Ahttps?:\/\/([^\s:@]+:[^\s:@]*@)?[A-Za-z\d\-]+(\.[A-Za-z\d\-]+)+\.?(:\d{1,5})?([\/?]\S*)?\z}.freeze # :nodoc: METADATA_LINK_KEYS = %w[ bug_tracker_uri @@ -281,7 +281,7 @@ duplicate dependency on #{dep}, (#{prev.requirement}) use: platform = @specification.platform case platform - when Gem::Platform, Gem::Platform::RUBY # ok + when Gem::Platform, Gem::Platform::RUBY # ok else error "invalid platform #{platform.inspect}, see Gem::Platform" end diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb index 27b70222c9..ba9b6435f4 100644 --- a/lib/rubygems/test_case.rb +++ b/lib/rubygems/test_case.rb @@ -1024,7 +1024,7 @@ Also, a list: spec_fetcher = Gem::SpecFetcher.fetcher - prerelease, all = all_specs.partition { |spec| spec.version.prerelease? } + prerelease, all = all_specs.partition { |spec| spec.version.prerelease? } latest = Gem::Specification._latest_specs all_specs spec_fetcher.specs[@uri] = [] diff --git a/lib/rubygems/test_utilities.rb b/lib/rubygems/test_utilities.rb index 6ae3c0e986..0edf3d6a61 100644 --- a/lib/rubygems/test_utilities.rb +++ b/lib/rubygems/test_utilities.rb @@ -134,7 +134,7 @@ class Gem::FakeFetcher def download(spec, source_uri, install_dir = Gem.dir) name = File.basename spec.cache_file - path = if Dir.pwd == install_dir # see fetch_command + path = if Dir.pwd == install_dir # see fetch_command install_dir else File.join install_dir, "cache" diff --git a/lib/rubygems/version.rb b/lib/rubygems/version.rb index b1faedcda2..d216647e0b 100644 --- a/lib/rubygems/version.rb +++ b/lib/rubygems/version.rb @@ -187,7 +187,7 @@ class Gem::Version # ver3 = Version.create(nil) # -> nil def self.create(input) - if self === input # check yourself before you wreck yourself + if self === input # check yourself before you wreck yourself input elsif input.nil? nil diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb index 0c7e0f7502..1f5e0e6768 100644 --- a/test/rubygems/test_gem.rb +++ b/test/rubygems/test_gem.rb @@ -649,7 +649,7 @@ class TestGem < Gem::TestCase assert_directory_exists util_cache_dir end - unless win_platform? || Process.uid.zero? # only for FS that support write protection + unless win_platform? || Process.uid.zero? # only for FS that support write protection def test_self_ensure_gem_directories_write_protected gemdir = File.join @tempdir, "egd" FileUtils.rm_r gemdir rescue nil diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb index 76792603d2..4a0244c270 100644 --- a/test/rubygems/test_gem_commands_setup_command.rb +++ b/test/rubygems/test_gem_commands_setup_command.rb @@ -23,11 +23,11 @@ class TestGemCommandsSetupCommand < Gem::TestCase FileUtils.mkdir_p 'bin' FileUtils.mkdir_p 'lib/rubygems/ssl_certs/rubygems.org' - File.open 'bin/gem', 'w' do + File.open 'bin/gem', 'w' do |io| io.puts '# gem' end - File.open 'lib/rubygems.rb', 'w' do |io| + File.open 'lib/rubygems.rb', 'w' do |io| io.puts '# rubygems.rb' end @@ -42,15 +42,15 @@ class TestGemCommandsSetupCommand < Gem::TestCase FileUtils.mkdir_p 'bundler/exe' FileUtils.mkdir_p 'bundler/lib/bundler' - File.open 'bundler/exe/bundle', 'w' do |io| + File.open 'bundler/exe/bundle', 'w' do |io| io.puts '# bundle' end - File.open 'bundler/lib/bundler.rb', 'w' do |io| + File.open 'bundler/lib/bundler.rb', 'w' do |io| io.puts '# bundler.rb' end - File.open 'bundler/lib/bundler/b.rb', 'w' do |io| + File.open 'bundler/lib/bundler/b.rb', 'w' do |io| io.puts '# b.rb' end @@ -63,7 +63,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase gemspec.bindir = "exe" gemspec.executables = ["bundle"] - File.open 'bundler/bundler.gemspec', 'w' do |io| + File.open 'bundler/bundler.gemspec', 'w' do |io| io.puts gemspec.to_ruby end @@ -317,19 +317,19 @@ class TestGemCommandsSetupCommand < Gem::TestCase FileUtils.mkdir_p lib_rubygems_defaults FileUtils.mkdir_p lib_bundler - File.open securerandom_rb, 'w' do |io| + File.open securerandom_rb, 'w' do |io| io.puts '# securerandom.rb' end - File.open old_builder_rb, 'w' do |io| + File.open old_builder_rb, 'w' do |io| io.puts '# builder.rb' end - File.open old_format_rb, 'w' do |io| + File.open old_format_rb, 'w' do |io| io.puts '# format.rb' end - File.open old_bundler_c_rb, 'w' do |io| + File.open old_bundler_c_rb, 'w' do |io| io.puts '# c.rb' end @@ -337,7 +337,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase io.puts '# jruby.rb' end - File.open os_defaults_rb, 'w' do |io| + File.open os_defaults_rb, 'w' do |io| io.puts '# operating_system.rb' end diff --git a/test/rubygems/test_gem_commands_signin_command.rb b/test/rubygems/test_gem_commands_signin_command.rb index c000c7a77a..fee67fe438 100644 --- a/test/rubygems/test_gem_commands_signin_command.rb +++ b/test/rubygems/test_gem_commands_signin_command.rb @@ -16,7 +16,7 @@ class TestGemCommandsSigninCommand < Gem::TestCase def teardown credentials_path = Gem.configuration.credentials_path - File.delete(credentials_path) if File.exist?(credentials_path) + File.delete(credentials_path) if File.exist?(credentials_path) super end diff --git a/test/rubygems/test_gem_commands_yank_command.rb b/test/rubygems/test_gem_commands_yank_command.rb index 9f337ec67e..ad05d9a8ea 100644 --- a/test/rubygems/test_gem_commands_yank_command.rb +++ b/test/rubygems/test_gem_commands_yank_command.rb @@ -47,7 +47,7 @@ class TestGemCommandsYankCommand < Gem::TestCase end assert_match %r{Yanking gem from http://example}, @ui.output - assert_match %r{Successfully yanked}, @ui.output + assert_match %r{Successfully yanked}, @ui.output platform = Gem.platforms[1] body = @fetcher.last_request.body.split('&').sort @@ -78,7 +78,7 @@ class TestGemCommandsYankCommand < Gem::TestCase assert_match 'You have enabled multi-factor authentication. Please enter OTP code.', @otp_ui.output assert_match 'Code: ', @otp_ui.output assert_match %r{Yanking gem from http://example}, @otp_ui.output - assert_match %r{Successfully yanked}, @otp_ui.output + assert_match %r{Successfully yanked}, @otp_ui.output assert_equal '111111', @fetcher.last_request['OTP'] end @@ -133,7 +133,7 @@ class TestGemCommandsYankCommand < Gem::TestCase end assert_match %r{Yanking gem from https://other.example}, @ui.output - assert_match %r{Successfully yanked}, @ui.output + assert_match %r{Successfully yanked}, @ui.output body = @fetcher.last_request.body.split('&').sort assert_equal %w[gem_name=a version=1.0], body diff --git a/test/rubygems/test_gem_config_file.rb b/test/rubygems/test_gem_config_file.rb index 8ea8fa61e5..260a94953e 100644 --- a/test/rubygems/test_gem_config_file.rb +++ b/test/rubygems/test_gem_config_file.rb @@ -385,7 +385,7 @@ if you believe they were disclosed to a third party. util_config_file # These should not be written out to the config file. - assert_equal false, @cfg.backtrace, 'backtrace' + assert_equal false, @cfg.backtrace, 'backtrace' assert_equal Gem::ConfigFile::DEFAULT_BULK_THRESHOLD, @cfg.bulk_threshold, 'bulk_threshold' assert_equal true, @cfg.update_sources, 'update_sources' diff --git a/test/rubygems/test_gem_dependency_installer.rb b/test/rubygems/test_gem_dependency_installer.rb index b01954a446..50ae3f049b 100644 --- a/test/rubygems/test_gem_dependency_installer.rb +++ b/test/rubygems/test_gem_dependency_installer.rb @@ -148,7 +148,7 @@ class TestGemDependencyInstaller < Gem::TestCase FileUtils.mv @a1_gem, @tempdir FileUtils.mv @b1_gem, @tempdir - FileUtils.mv e1_gem, @tempdir + FileUtils.mv e1_gem, @tempdir inst = nil @@ -239,7 +239,7 @@ class TestGemDependencyInstaller < Gem::TestCase FileUtils.mv @a1_gem, @tempdir FileUtils.mv a2_gem, @tempdir # not in index FileUtils.mv @b1_gem, @tempdir - FileUtils.mv a3_gem, @tempdir + FileUtils.mv a3_gem, @tempdir Dir.chdir @tempdir do Gem::DependencyInstaller.new.install 'a', req("= 2") diff --git a/test/rubygems/test_gem_dependency_list.rb b/test/rubygems/test_gem_dependency_list.rb index 6bf803fe5f..a04d9a756f 100644 --- a/test/rubygems/test_gem_dependency_list.rb +++ b/test/rubygems/test_gem_dependency_list.rb @@ -134,7 +134,7 @@ class TestGemDependencyList < Gem::TestCase end def test_why_not_ok_eh - assert_equal({}, @deplist.why_not_ok?) + assert_equal({}, @deplist.why_not_ok?) @deplist.add @b2 @@ -162,7 +162,7 @@ class TestGemDependencyList < Gem::TestCase @deplist.add a, b0, b1 - assert_equal({}, @deplist.why_not_ok?) + assert_equal({}, @deplist.why_not_ok?) end def test_ok_eh_mismatch diff --git a/test/rubygems/test_gem_package.rb b/test/rubygems/test_gem_package.rb index eb203916c5..b328d20b3a 100644 --- a/test/rubygems/test_gem_package.rb +++ b/test/rubygems/test_gem_package.rb @@ -151,7 +151,7 @@ class TestGemPackage < Gem::Package::TarTestCase FileUtils.mkdir_p 'lib/empty' - File.open 'lib/code.rb', 'w' do |io| + File.open 'lib/code.rb', 'w' do |io| io.write '# lib/code.rb' end @@ -185,7 +185,7 @@ class TestGemPackage < Gem::Package::TarTestCase FileUtils.mkdir_p 'lib' - File.open 'lib/code.rb', 'w' do |io| + File.open 'lib/code.rb', 'w' do |io| io.write '# lib/code.rb' end @@ -536,11 +536,11 @@ class TestGemPackage < Gem::Package::TarTestCase package = Gem::Package.new @gem tgz_io = util_tar_gz do |tar| - tar.add_file 'relative.rb', 0644 do |io| + tar.add_file 'relative.rb', 0644 do |io| io.write 'hi' end - tar.mkdir 'lib', 0755 + tar.mkdir 'lib', 0755 tar.add_symlink 'lib/foo.rb', '../relative.rb', 0644 end @@ -635,7 +635,7 @@ class TestGemPackage < Gem::Package::TarTestCase tar.add_file 'lib/foo.rb', 0644 do |io| io.write 'hi' end - tar.mkdir 'lib/foo', 0755 + tar.mkdir 'lib/foo', 0755 end package.extract_tar_gz tgz_io, @destination @@ -1097,7 +1097,7 @@ class TestGemPackage < Gem::Package::TarTestCase $bad_name = vm entry = Object.new - def entry.full_name() $bad_name end + def entry.full_name() $bad_name end package = Gem::Package.new(@gem) package.instance_variable_set(:@files, []) diff --git a/test/rubygems/test_gem_package_task.rb b/test/rubygems/test_gem_package_task.rb index e01f4a4043..21fa9638a1 100644 --- a/test/rubygems/test_gem_package_task.rb +++ b/test/rubygems/test_gem_package_task.rb @@ -26,7 +26,7 @@ class TestGemPackageTask < Gem::TestCase g.summary = 'summary' end - pkg = Gem::PackageTask.new(gem) do |p| + pkg = Gem::PackageTask.new(gem) do |p| p.package_files << "y" end @@ -49,7 +49,7 @@ class TestGemPackageTask < Gem::TestCase g.files = Rake::FileList["x"].resolve g.platform = Gem::Platform::CURRENT end - pkg = Gem::PackageTask.new(gem) do |p| + pkg = Gem::PackageTask.new(gem) do |p| p.package_files << "y" end assert_equal ["x", "y"], pkg.package_files @@ -62,7 +62,7 @@ class TestGemPackageTask < Gem::TestCase g.files = Rake::FileList["x"].resolve g.platform = Gem::Platform::RUBY end - pkg = Gem::PackageTask.new(gem) do |p| + pkg = Gem::PackageTask.new(gem) do |p| p.package_files << "y" end assert_equal ["x", "y"], pkg.package_files diff --git a/test/rubygems/test_gem_remote_fetcher.rb b/test/rubygems/test_gem_remote_fetcher.rb index c9779aed5d..cdb006285d 100644 --- a/test/rubygems/test_gem_remote_fetcher.rb +++ b/test/rubygems/test_gem_remote_fetcher.rb @@ -1043,7 +1043,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg== @ssl_server_thread.kill.join @ssl_server_thread = nil end - utils = WEBrick::Utils # TimeoutHandler is since 1.9 + utils = WEBrick::Utils # TimeoutHandler is since 1.9 utils::TimeoutHandler.terminate if defined?(utils::TimeoutHandler.terminate) end diff --git a/test/rubygems/test_gem_resolver_api_set.rb b/test/rubygems/test_gem_resolver_api_set.rb index f6b3e49c74..79c286d292 100644 --- a/test/rubygems/test_gem_resolver_api_set.rb +++ b/test/rubygems/test_gem_resolver_api_set.rb @@ -23,14 +23,14 @@ class TestGemResolverAPISet < Gem::TestCase assert_equal URI('https://rubygemsserver.com/mygems/api/v1/dependencies'), set.dep_uri assert_equal URI('https://rubygemsserver.com/mygems/'), set.uri - assert_equal Gem::Source.new(URI('https://rubygemsserver.com/mygems/')), set.source + assert_equal Gem::Source.new(URI('https://rubygemsserver.com/mygems/')), set.source end def test_initialize_uri set = @DR::APISet.new @dep_uri assert_equal URI("#{@gem_repo}api/v1/dependencies"), set.dep_uri - assert_equal URI("#{@gem_repo}"), set.uri + assert_equal URI("#{@gem_repo}"), set.uri end def test_find_all diff --git a/test/rubygems/test_gem_source.rb b/test/rubygems/test_gem_source.rb index caf969ff5f..05e443c7f1 100644 --- a/test/rubygems/test_gem_source.rb +++ b/test/rubygems/test_gem_source.rb @@ -199,21 +199,21 @@ class TestGemSource < Gem::TestCase installed = Gem::Source::Installed.new local = Gem::Source::Local.new - assert_equal(0, remote.<=>(remote), 'remote <=> remote') + assert_equal(0, remote.<=>(remote), 'remote <=> remote') - assert_equal(-1, remote.<=>(specific), 'remote <=> specific') - assert_equal(1, specific.<=>(remote), 'specific <=> remote') + assert_equal(-1, remote.<=>(specific), 'remote <=> specific') + assert_equal(1, specific.<=>(remote), 'specific <=> remote') - assert_equal(-1, remote.<=>(local), 'remote <=> local') - assert_equal(1, local.<=>(remote), 'local <=> remote') + assert_equal(-1, remote.<=>(local), 'remote <=> local') + assert_equal(1, local.<=>(remote), 'local <=> remote') assert_equal(-1, remote.<=>(installed), 'remote <=> installed') - assert_equal(1, installed.<=>(remote), 'installed <=> remote') + assert_equal(1, installed.<=>(remote), 'installed <=> remote') no_uri = @source.dup no_uri.instance_variable_set :@uri, nil - assert_equal(-1, remote.<=>(no_uri), 'remote <=> no_uri') + assert_equal(-1, remote.<=>(no_uri), 'remote <=> no_uri') end def test_spaceship_order_is_preserved_when_uri_differs diff --git a/test/rubygems/test_gem_source_git.rb b/test/rubygems/test_gem_source_git.rb index f3cfcb9c46..54107a2b9f 100644 --- a/test/rubygems/test_gem_source_git.rb +++ b/test/rubygems/test_gem_source_git.rb @@ -211,13 +211,13 @@ class TestGemSourceGit < Gem::TestCase assert_equal(0, git.<=>(git), 'git <=> git') assert_equal(1, git.<=>(remote), 'git <=> remote') - assert_equal(-1, remote.<=>(git), 'remote <=> git') + assert_equal(-1, remote.<=>(git), 'remote <=> git') assert_equal(1, git.<=>(installed), 'git <=> installed') - assert_equal(-1, installed.<=>(git), 'installed <=> git') + assert_equal(-1, installed.<=>(git), 'installed <=> git') - assert_equal(-1, git.<=>(vendor), 'git <=> vendor') - assert_equal(1, vendor.<=>(git), 'vendor <=> git') + assert_equal(-1, git.<=>(vendor), 'git <=> vendor') + assert_equal(1, vendor.<=>(git), 'vendor <=> git') end def test_specs diff --git a/test/rubygems/test_gem_source_installed.rb b/test/rubygems/test_gem_source_installed.rb index 2530aa479b..1d14b1ccd2 100644 --- a/test/rubygems/test_gem_source_installed.rb +++ b/test/rubygems/test_gem_source_installed.rb @@ -27,10 +27,10 @@ class TestGemSourceInstalled < Gem::TestCase assert_equal(1, installed.<=>(specific), 'installed <=> specific') assert_equal(1, git. <=>(installed), 'git <=> installed') - assert_equal(-1, installed.<=>(git), 'installed <=> git') + assert_equal(-1, installed.<=>(git), 'installed <=> git') assert_equal(1, vendor.<=>(installed), 'vendor <=> installed') - assert_equal(-1, installed.<=>(vendor), 'installed <=> vendor') + assert_equal(-1, installed.<=>(vendor), 'installed <=> vendor') end end diff --git a/test/rubygems/test_gem_source_local.rb b/test/rubygems/test_gem_source_local.rb index a58a3ddfc4..5a61e63a39 100644 --- a/test/rubygems/test_gem_source_local.rb +++ b/test/rubygems/test_gem_source_local.rb @@ -93,16 +93,16 @@ class TestGemSourceLocal < Gem::TestCase installed = Gem::Source::Installed.new local = Gem::Source::Local.new - assert_equal(0, local.<=>(local), 'local <=> local') + assert_equal(0, local.<=>(local), 'local <=> local') - assert_equal(-1, remote.<=>(local), 'remote <=> local') - assert_equal(1, local.<=>(remote), 'local <=> remote') + assert_equal(-1, remote.<=>(local), 'remote <=> local') + assert_equal(1, local.<=>(remote), 'local <=> remote') - assert_equal(1, installed.<=>(local), 'installed <=> local') + assert_equal(1, installed.<=>(local), 'installed <=> local') assert_equal(-1, local.<=>(installed), 'local <=> installed') - assert_equal(-1, specific.<=>(local), 'specific <=> local') - assert_equal(1, local.<=>(specific), 'local <=> specific') + assert_equal(-1, specific.<=>(local), 'specific <=> local') + assert_equal(1, local.<=>(specific), 'local <=> specific') end end diff --git a/test/rubygems/test_gem_source_lock.rb b/test/rubygems/test_gem_source_lock.rb index 5ceb5af968..fcd290ef6c 100644 --- a/test/rubygems/test_gem_source_lock.rb +++ b/test/rubygems/test_gem_source_lock.rb @@ -66,8 +66,8 @@ class TestGemSourceLock < Gem::TestCase installed = Gem::Source::Installed.new lock = Gem::Source::Lock.new installed - assert_equal(1, lock.<=>(installed), 'lock <=> installed') - assert_equal(-1, installed.<=>(lock), 'installed <=> lock') + assert_equal(1, lock.<=>(installed), 'lock <=> installed') + assert_equal(-1, installed.<=>(lock), 'installed <=> lock') end def test_spaceship_local @@ -75,7 +75,7 @@ class TestGemSourceLock < Gem::TestCase lock = Gem::Source::Lock.new local # nonsense assert_equal(1, lock.<=>(local), 'lock <=> local') - assert_equal(-1, local.<=>(lock), 'local <=> lock') + assert_equal(-1, local.<=>(lock), 'local <=> lock') end def test_spaceship_remote @@ -83,7 +83,7 @@ class TestGemSourceLock < Gem::TestCase lock = Gem::Source::Lock.new remote assert_equal(1, lock.<=>(remote), 'lock <=> remote') - assert_equal(-1, remote.<=>(lock), 'remote <=> lock') + assert_equal(-1, remote.<=>(lock), 'remote <=> lock') end def test_spaceship_specific_file @@ -92,7 +92,7 @@ class TestGemSourceLock < Gem::TestCase specific = Gem::Source::SpecificFile.new gem lock = Gem::Source::Lock.new specific # nonsense - assert_equal(1, lock.<=>(specific), 'lock <=> specific') + assert_equal(1, lock.<=>(specific), 'lock <=> specific') assert_equal(-1, specific.<=>(lock), 'specific <=> lock') end @@ -101,7 +101,7 @@ class TestGemSourceLock < Gem::TestCase lock = Gem::Source::Lock.new vendor assert_equal(1, lock.<=>(vendor), 'lock <=> vendor') - assert_equal(-1, vendor.<=>(lock), 'vendor <=> lock') + assert_equal(-1, vendor.<=>(lock), 'vendor <=> lock') end def test_uri diff --git a/test/rubygems/test_gem_source_specific_file.rb b/test/rubygems/test_gem_source_specific_file.rb index d73b0bf1db..aaaa1602c7 100644 --- a/test/rubygems/test_gem_source_specific_file.rb +++ b/test/rubygems/test_gem_source_specific_file.rb @@ -46,16 +46,16 @@ class TestGemSourceSpecificFile < Gem::TestCase installed = Gem::Source::Installed.new local = Gem::Source::Local.new - assert_equal(0, specific.<=>(specific), 'specific <=> specific') + assert_equal(0, specific.<=>(specific), 'specific <=> specific') - assert_equal(-1, remote.<=>(specific), 'remote <=> specific') - assert_equal(1, specific.<=>(remote), 'specific <=> remote') + assert_equal(-1, remote.<=>(specific), 'remote <=> specific') + assert_equal(1, specific.<=>(remote), 'specific <=> remote') assert_equal(-1, specific.<=>(local), 'specific <=> local') assert_equal(1, local. <=>(specific), 'local <=> specific') assert_equal(-1, specific. <=>(installed), 'specific <=> installed') - assert_equal(1, installed.<=>(specific), 'installed <=> specific') + assert_equal(1, installed.<=>(specific), 'installed <=> specific') a2 = quick_gem 'a', '2' util_build_gem a2 diff --git a/test/rubygems/test_gem_source_vendor.rb b/test/rubygems/test_gem_source_vendor.rb index 2c5f728166..b9b078ea33 100644 --- a/test/rubygems/test_gem_source_vendor.rb +++ b/test/rubygems/test_gem_source_vendor.rb @@ -19,13 +19,13 @@ class TestGemSourceVendor < Gem::TestCase assert_equal(0, vendor.<=>(vendor), 'vendor <=> vendor') assert_equal(1, vendor.<=>(remote), 'vendor <=> remote') - assert_equal(-1, remote.<=>(vendor), 'remote <=> vendor') + assert_equal(-1, remote.<=>(vendor), 'remote <=> vendor') - assert_equal(1, vendor.<=>(git), 'vendor <=> git') - assert_equal(-1, git.<=>(vendor), 'git <=> vendor') + assert_equal(1, vendor.<=>(git), 'vendor <=> git') + assert_equal(-1, git.<=>(vendor), 'git <=> vendor') assert_equal(1, vendor.<=>(installed), 'vendor <=> installed') - assert_equal(-1, installed.<=>(vendor), 'installed <=> vendor') + assert_equal(-1, installed.<=>(vendor), 'installed <=> vendor') end end diff --git a/test/rubygems/test_gem_spec_fetcher.rb b/test/rubygems/test_gem_spec_fetcher.rb index 5259e62ccc..b7547112bb 100644 --- a/test/rubygems/test_gem_spec_fetcher.rb +++ b/test/rubygems/test_gem_spec_fetcher.rb @@ -322,7 +322,7 @@ class TestGemSpecFetcher < Gem::TestCase specs, _ = @sf.available_specs(:prerelease) expected = Gem::NameTuple.from_list \ - [['a', v('2.a'), Gem::Platform::RUBY]] + [['a', v('2.a'), Gem::Platform::RUBY]] assert_equal expected, specs[@source] end diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb index ab923efbc7..1df7d71d8e 100644 --- a/test/rubygems/test_gem_specification.rb +++ b/test/rubygems/test_gem_specification.rb @@ -246,7 +246,7 @@ end a1 = util_spec "a", "1", "b" => "> 0" b1 = util_spec "b", "1", "c" => ">= 0" # unresolved b2 = util_spec "b", "2", "c" => ">= 0" - c1 = util_spec "c", "1", nil, "lib/c#{$$}.rb" # 1st level + c1 = util_spec "c", "1", nil, "lib/c#{$$}.rb" # 1st level c2 = util_spec "c", "2", nil, "lib/c#{$$}.rb" install_specs c1, c2, b1, b2, a1 @@ -264,7 +264,7 @@ end a1 = util_spec "a", "1", "b" => "> 0" b1 = util_spec "b", "1", "c" => ">= 0" # unresolved b2 = util_spec "b", "2", "c" => ">= 0" - c1 = util_spec "c", "1", "d" => ">= 0" # 1st level + c1 = util_spec "c", "1", "d" => ">= 0" # 1st level c2 = util_spec "c", "2", "d" => ">= 0" d1 = util_spec "d", "1", nil, "lib/d#{$$}.rb" # 2nd level d2 = util_spec "d", "2", nil, "lib/d#{$$}.rb" @@ -520,11 +520,11 @@ end def test_self_activate_via_require_wtf save_loaded_features do - a1 = util_spec "a", "1", "b" => "> 0", "d" => "> 0" # this + a1 = util_spec "a", "1", "b" => "> 0", "d" => "> 0" # this b1 = util_spec "b", "1", { "c" => ">= 1" }, "lib/b#{$$}.rb" b2 = util_spec "b", "2", { "c" => ">= 2" }, "lib/b#{$$}.rb" # this c1 = util_spec "c", "1" - c2 = util_spec "c", "2" # this + c2 = util_spec "c", "2" # this d1 = util_spec "d", "1", { "c" => "< 2" }, "lib/d#{$$}.rb" d2 = util_spec "d", "2", { "c" => "< 2" }, "lib/d#{$$}.rb" # this @@ -1187,7 +1187,7 @@ dependencies: [] # create user spec user_spec_dir = File.join Gem.user_dir, 'specifications' - FileUtils.mkdir_p(user_spec_dir) unless Dir.exist? user_spec_dir + FileUtils.mkdir_p(user_spec_dir) unless Dir.exist? user_spec_dir # dirs doesn't include user ? Gem::Specification.dirs << user_spec_dir diff --git a/test/rubygems/test_gem_text.rb b/test/rubygems/test_gem_text.rb index ccac812c6d..43e8496f0c 100644 --- a/test/rubygems/test_gem_text.rb +++ b/test/rubygems/test_gem_text.rb @@ -23,7 +23,7 @@ class TestGemText < Gem::TestCase end def test_format_text_no_space - assert_equal "texttowr\nap", format_text("texttowrap", 8) + assert_equal "texttowr\nap", format_text("texttowrap", 8) end def test_format_text_trailing # for two spaces after . |