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

https://github.com/rubygems/rubygems/commit/8e64298989
This commit is contained in:
Hiroshi SHIBATA 2023-03-16 12:00:41 +09:00
Родитель 9ffd73523d
Коммит 4b285e5c6f
3 изменённых файлов: 22 добавлений и 22 удалений

Просмотреть файл

@ -144,15 +144,15 @@ class Gem::BasicSpecification
def full_require_paths def full_require_paths
@full_require_paths ||= @full_require_paths ||=
begin begin
full_paths = raw_require_paths.map do |path| full_paths = raw_require_paths.map do |path|
File.join full_gem_path, path.tap(&Gem::UNTAINT) File.join full_gem_path, path.tap(&Gem::UNTAINT)
end
full_paths << extension_dir if have_extensions?
full_paths
end end
full_paths << extension_dir if have_extensions?
full_paths
end
end end
## ##
@ -171,15 +171,15 @@ class Gem::BasicSpecification
if activated? if activated?
@paths_map ||= {} @paths_map ||= {}
@paths_map[path] ||= @paths_map[path] ||=
begin begin
fullpath = nil fullpath = nil
suffixes = Gem.suffixes suffixes = Gem.suffixes
suffixes.find do |suf| suffixes.find do |suf|
full_require_paths.find do |dir| full_require_paths.find do |dir|
File.file?(fullpath = "#{dir}/#{path}#{suf}") File.file?(fullpath = "#{dir}/#{path}#{suf}")
end end
end ? fullpath : nil end ? fullpath : nil
end end
else else
nil nil
end end

Просмотреть файл

@ -84,10 +84,10 @@ class Gem::StubSpecification < Gem::BasicSpecification
def activated? def activated?
@activated ||= @activated ||=
begin begin
loaded = Gem.loaded_specs[name] loaded = Gem.loaded_specs[name]
loaded && loaded.version == version loaded && loaded.version == version
end end
end end
def default_gem? def default_gem?

Просмотреть файл

@ -164,7 +164,7 @@ class TestGemSource < Gem::TestCase
latest_specs << Gem::NameTuple.new("fixed", Gem::Version.new("1.0.0"), "ruby") latest_specs << Gem::NameTuple.new("fixed", Gem::Version.new("1.0.0"), "ruby")
# Setup valid data on the 'remote' # Setup valid data on the 'remote'
@fetcher.data["#{@gem_repo}latest_specs.#{Gem.marshal_version}.gz"] = @fetcher.data["#{@gem_repo}latest_specs.#{Gem.marshal_version}.gz"] =
util_gzip(Marshal.dump(latest_specs)) util_gzip(Marshal.dump(latest_specs))
cache_dir = File.join Gem.spec_cache_dir, "gems.example.com%80" cache_dir = File.join Gem.spec_cache_dir, "gems.example.com%80"