summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-08-22 15:36:29 (GMT)
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-09-05 09:48:15 (GMT)
commitd9e6315177be2a1264213a1e7cb215312a23384a (patch)
treef5ea71299d7a0be4bfd8c986d7491af1976529be
parent0b9b0774c3dc0c4113335a57717bbc9d3d9595e8 (diff)
[rubygems/rubygems] Bump rubocop to 0.74.0 and fix new offenses
https://github.com/rubygems/rubygems/commit/d4fc383497
-rw-r--r--lib/rubygems/basic_specification.rb4
-rw-r--r--lib/rubygems/dependency.rb4
-rw-r--r--lib/rubygems/dependency_installer.rb10
-rw-r--r--lib/rubygems/ext/builder.rb2
-rw-r--r--lib/rubygems/installer.rb2
-rw-r--r--lib/rubygems/specification.rb8
-rw-r--r--lib/rubygems/version.rb2
-rw-r--r--test/rubygems/test_gem_commands_install_command.rb2
-rw-r--r--test/rubygems/test_gem_commands_setup_command.rb2
-rw-r--r--test/rubygems/test_gem_commands_signin_command.rb2
-rw-r--r--test/rubygems/test_gem_dependency_installer.rb2
-rw-r--r--test/rubygems/test_gem_resolver.rb4
12 files changed, 22 insertions, 22 deletions
diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb
index 86abc4d..347f8c3 100644
--- a/lib/rubygems/basic_specification.rb
+++ b/lib/rubygems/basic_specification.rb
@@ -206,8 +206,8 @@ class Gem::BasicSpecification
def internal_init # :nodoc:
@extension_dir = nil
- @full_gem_path = nil
- @gem_dir = nil
+ @full_gem_path = nil
+ @gem_dir = nil
@ignored = nil
end
diff --git a/lib/rubygems/dependency.rb b/lib/rubygems/dependency.rb
index 3c91392..a033603 100644
--- a/lib/rubygems/dependency.rb
+++ b/lib/rubygems/dependency.rb
@@ -140,7 +140,7 @@ class Gem::Dependency
if defined?(@version_requirement) && @version_requirement
version = @version_requirement.instance_variable_get :@version
- @version_requirement = nil
+ @version_requirement = nil
@version_requirements = Gem::Requirement.new version
end
@@ -266,7 +266,7 @@ class Gem::Dependency
end
default = Gem::Requirement.default
- self_req = self.requirement
+ self_req = self.requirement
other_req = other.requirement
return self.class.new name, self_req if other_req == default
diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb
index a5738ca..6d45688 100644
--- a/lib/rubygems/dependency_installer.rb
+++ b/lib/rubygems/dependency_installer.rb
@@ -88,14 +88,14 @@ class Gem::DependencyInstaller
@wrappers = options[:wrappers]
@build_args = options[:build_args]
@build_docs_in_background = options[:build_docs_in_background]
- @install_as_default = options[:install_as_default]
- @dir_mode = options[:dir_mode]
- @data_mode = options[:data_mode]
- @prog_mode = options[:prog_mode]
+ @install_as_default = options[:install_as_default]
+ @dir_mode = options[:dir_mode]
+ @data_mode = options[:data_mode]
+ @prog_mode = options[:prog_mode]
# Indicates that we should not try to update any deps unless
# we absolutely must.
- @minimal_deps = options[:minimal_deps]
+ @minimal_deps = options[:minimal_deps]
@available = nil
@installed_gems = []
diff --git a/lib/rubygems/ext/builder.rb b/lib/rubygems/ext/builder.rb
index 3fd0a87..d91ecd2 100644
--- a/lib/rubygems/ext/builder.rb
+++ b/lib/rubygems/ext/builder.rb
@@ -108,7 +108,7 @@ class Gem::Ext::Builder
@build_args = build_args
@gem_dir = spec.full_gem_path
- @ran_rake = false
+ @ran_rake = false
end
##
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index 9481bd2..a40deef 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -698,7 +698,7 @@ class Gem::Installer
@development = options[:development]
@build_root = options[:build_root]
- @build_args = options[:build_args] || Gem::Command.build_args
+ @build_args = options[:build_args] || Gem::Command.build_args
unless @build_root.nil?
require 'pathname'
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index 5aceb8d..c023e4f 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -190,8 +190,8 @@ class Gem::Specification < Gem::BasicSpecification
# Sentinel object to represent "not found" stubs
NOT_FOUND = Struct.new(:to_spec, :this).new # :nodoc:
- @@spec_with_requirable_file = {}
- @@active_stub_with_requirable_file = {}
+ @@spec_with_requirable_file = {}
+ @@active_stub_with_requirable_file = {}
######################################################################
# :section: Required gemspec attributes
@@ -1230,8 +1230,8 @@ class Gem::Specification < Gem::BasicSpecification
@@all = nil
@@stubs = nil
@@stubs_by_name = {}
- @@spec_with_requirable_file = {}
- @@active_stub_with_requirable_file = {}
+ @@spec_with_requirable_file = {}
+ @@active_stub_with_requirable_file = {}
_clear_load_cache
unresolved = unresolved_deps
unless unresolved.empty?
diff --git a/lib/rubygems/version.rb b/lib/rubygems/version.rb
index 86a2350..619f327 100644
--- a/lib/rubygems/version.rb
+++ b/lib/rubygems/version.rb
@@ -392,7 +392,7 @@ class Gem::Version
def _split_segments
string_start = _segments.index {|s| s.is_a?(String) }
- string_segments = segments
+ string_segments = segments
numeric_segments = string_segments.slice!(0, string_start || string_segments.size)
return numeric_segments, string_segments
end
diff --git a/test/rubygems/test_gem_commands_install_command.rb b/test/rubygems/test_gem_commands_install_command.rb
index fb7629c..a233377 100644
--- a/test/rubygems/test_gem_commands_install_command.rb
+++ b/test/rubygems/test_gem_commands_install_command.rb
@@ -670,7 +670,7 @@ ERROR: Possible alternatives: non_existent_with_hint
@cmd.options[:args] = [a2.name]
- gemdir = File.join @gemhome, 'specifications'
+ gemdir = File.join @gemhome, 'specifications'
a2_gemspec = File.join(gemdir, "a-2.gemspec")
a1_gemspec = File.join(gemdir, "a-1.gemspec")
diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb
index ad29b1b..02171ec 100644
--- a/test/rubygems/test_gem_commands_setup_command.rb
+++ b/test/rubygems/test_gem_commands_setup_command.rb
@@ -222,7 +222,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase
lib_bundler = File.join lib, 'bundler'
lib_rubygems_defaults = File.join lib_rubygems, 'defaults'
- securerandom_rb = File.join lib, 'securerandom.rb'
+ securerandom_rb = File.join lib, 'securerandom.rb'
engine_defaults_rb = File.join lib_rubygems_defaults, 'jruby.rb'
os_defaults_rb = File.join lib_rubygems_defaults, 'operating_system.rb'
diff --git a/test/rubygems/test_gem_commands_signin_command.rb b/test/rubygems/test_gem_commands_signin_command.rb
index 6276ea0..c000c7a 100644
--- a/test/rubygems/test_gem_commands_signin_command.rb
+++ b/test/rubygems/test_gem_commands_signin_command.rb
@@ -87,7 +87,7 @@ class TestGemCommandsSigninCommand < Gem::TestCase
fetcher.data[data_key] = response
Gem::RemoteFetcher.fetcher = fetcher
- sign_in_ui = ui_stub || Gem::MockGemUi.new("#{email}\n#{password}\n")
+ sign_in_ui = ui_stub || Gem::MockGemUi.new("#{email}\n#{password}\n")
use_ui sign_in_ui do
yield
diff --git a/test/rubygems/test_gem_dependency_installer.rb b/test/rubygems/test_gem_dependency_installer.rb
index 15fc8c7..22f3a91 100644
--- a/test/rubygems/test_gem_dependency_installer.rb
+++ b/test/rubygems/test_gem_dependency_installer.rb
@@ -32,7 +32,7 @@ class TestGemDependencyInstaller < Gem::TestCase
@a1_pre, @a1_pre_gem = util_gem 'a', '1.a'
- @b1, @b1_gem = util_gem 'b', '1' do |s|
+ @b1, @b1_gem = util_gem 'b', '1' do |s|
s.add_dependency 'a'
s.add_development_dependency 'aa'
end
diff --git a/test/rubygems/test_gem_resolver.rb b/test/rubygems/test_gem_resolver.rb
index 172b46a..c35a264 100644
--- a/test/rubygems/test_gem_resolver.rb
+++ b/test/rubygems/test_gem_resolver.rb
@@ -740,7 +740,7 @@ class TestGemResolver < Gem::TestCase
def test_select_local_platforms
r = Gem::Resolver.new nil, nil
- a1 = util_spec 'a', 1
+ a1 = util_spec 'a', 1
a1_p1 = util_spec 'a', 1 do |s|
s.platform = Gem::Platform.local
@@ -756,7 +756,7 @@ class TestGemResolver < Gem::TestCase
end
def test_search_for_local_platform_partial_string_match
- a1 = util_spec 'a', 1
+ a1 = util_spec 'a', 1
a1_p1 = util_spec 'a', 1 do |s|
s.platform = Gem::Platform.local.os