[rubygems/rubygems] util/rubocop -A --only Layout/LeadingCommentSpace
https://github.com/rubygems/rubygems/commit/4d680320e3
This commit is contained in:
parent
d9f92511ad
commit
c480a0c46a
@ -119,7 +119,7 @@ module Gem::QueryUtils
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#Guts of original execute
|
# Guts of original execute
|
||||||
def show_gems(name)
|
def show_gems(name)
|
||||||
show_local_gems(name) if local?
|
show_local_gems(name) if local?
|
||||||
show_remote_gems(name) if remote?
|
show_remote_gems(name) if remote?
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#) frozen_string_literal: true
|
# ) frozen_string_literal: true
|
||||||
require_relative "parser"
|
require_relative "parser"
|
||||||
|
|
||||||
class Gem::RequestSet::Lockfile::Tokenizer
|
class Gem::RequestSet::Lockfile::Tokenizer
|
||||||
|
@ -9,7 +9,7 @@ require_relative "version"
|
|||||||
# together in RubyGems.
|
# together in RubyGems.
|
||||||
|
|
||||||
class Gem::Requirement
|
class Gem::Requirement
|
||||||
OPS = { #:nodoc:
|
OPS = { # :nodoc:
|
||||||
"=" => lambda {|v, r| v == r },
|
"=" => lambda {|v, r| v == r },
|
||||||
"!=" => lambda {|v, r| v != r },
|
"!=" => lambda {|v, r| v != r },
|
||||||
">" => lambda {|v, r| v > r },
|
">" => lambda {|v, r| v > r },
|
||||||
@ -119,7 +119,7 @@ class Gem::Requirement
|
|||||||
# An array of requirement pairs. The first element of the pair is
|
# An array of requirement pairs. The first element of the pair is
|
||||||
# the op, and the second is the Gem::Version.
|
# the op, and the second is the Gem::Version.
|
||||||
|
|
||||||
attr_reader :requirements #:nodoc:
|
attr_reader :requirements # :nodoc:
|
||||||
|
|
||||||
##
|
##
|
||||||
# Constructs a requirement from +requirements+. Requirements can be
|
# Constructs a requirement from +requirements+. Requirements can be
|
||||||
|
@ -178,7 +178,7 @@ class TestGemCommandManager < Gem::TestCase
|
|||||||
|
|
||||||
# HACK move to install command test
|
# HACK move to install command test
|
||||||
def test_process_args_install
|
def test_process_args_install
|
||||||
#capture all install options
|
# capture all install options
|
||||||
use_ui @ui do
|
use_ui @ui do
|
||||||
check_options = nil
|
check_options = nil
|
||||||
@command_manager["install"].when_invoked do |options|
|
@command_manager["install"].when_invoked do |options|
|
||||||
@ -186,7 +186,7 @@ class TestGemCommandManager < Gem::TestCase
|
|||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
#check defaults
|
# check defaults
|
||||||
@command_manager.process_args %w[install]
|
@command_manager.process_args %w[install]
|
||||||
assert_equal %w[ri], check_options[:document].sort
|
assert_equal %w[ri], check_options[:document].sort
|
||||||
assert_equal false, check_options[:force]
|
assert_equal false, check_options[:force]
|
||||||
@ -196,7 +196,7 @@ class TestGemCommandManager < Gem::TestCase
|
|||||||
assert_nil check_options[:install_dir]
|
assert_nil check_options[:install_dir]
|
||||||
assert_nil check_options[:bin_dir]
|
assert_nil check_options[:bin_dir]
|
||||||
|
|
||||||
#check settings
|
# check settings
|
||||||
check_options = nil
|
check_options = nil
|
||||||
@command_manager.process_args %w[
|
@command_manager.process_args %w[
|
||||||
install --force --local --document=ri,rdoc --install-dir .
|
install --force --local --document=ri,rdoc --install-dir .
|
||||||
@ -210,17 +210,17 @@ class TestGemCommandManager < Gem::TestCase
|
|||||||
assert_equal Dir.pwd, check_options[:install_dir]
|
assert_equal Dir.pwd, check_options[:install_dir]
|
||||||
assert_equal Dir.pwd, check_options[:bin_dir]
|
assert_equal Dir.pwd, check_options[:bin_dir]
|
||||||
|
|
||||||
#check remote domain
|
# check remote domain
|
||||||
check_options = nil
|
check_options = nil
|
||||||
@command_manager.process_args %w[install --remote]
|
@command_manager.process_args %w[install --remote]
|
||||||
assert_equal :remote, check_options[:domain]
|
assert_equal :remote, check_options[:domain]
|
||||||
|
|
||||||
#check both domain
|
# check both domain
|
||||||
check_options = nil
|
check_options = nil
|
||||||
@command_manager.process_args %w[install --both]
|
@command_manager.process_args %w[install --both]
|
||||||
assert_equal :both, check_options[:domain]
|
assert_equal :both, check_options[:domain]
|
||||||
|
|
||||||
#check both domain
|
# check both domain
|
||||||
check_options = nil
|
check_options = nil
|
||||||
@command_manager.process_args %w[install --both]
|
@command_manager.process_args %w[install --both]
|
||||||
assert_equal :both, check_options[:domain]
|
assert_equal :both, check_options[:domain]
|
||||||
@ -229,18 +229,18 @@ class TestGemCommandManager < Gem::TestCase
|
|||||||
|
|
||||||
# HACK move to uninstall command test
|
# HACK move to uninstall command test
|
||||||
def test_process_args_uninstall
|
def test_process_args_uninstall
|
||||||
#capture all uninstall options
|
# capture all uninstall options
|
||||||
check_options = nil
|
check_options = nil
|
||||||
@command_manager["uninstall"].when_invoked do |options|
|
@command_manager["uninstall"].when_invoked do |options|
|
||||||
check_options = options
|
check_options = options
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
#check defaults
|
# check defaults
|
||||||
@command_manager.process_args %w[uninstall]
|
@command_manager.process_args %w[uninstall]
|
||||||
assert_equal Gem::Requirement.default, check_options[:version]
|
assert_equal Gem::Requirement.default, check_options[:version]
|
||||||
|
|
||||||
#check settings
|
# check settings
|
||||||
check_options = nil
|
check_options = nil
|
||||||
@command_manager.process_args %w[uninstall foobar --version 3.0]
|
@command_manager.process_args %w[uninstall foobar --version 3.0]
|
||||||
assert_equal "foobar", check_options[:args].first
|
assert_equal "foobar", check_options[:args].first
|
||||||
@ -249,18 +249,18 @@ class TestGemCommandManager < Gem::TestCase
|
|||||||
|
|
||||||
# HACK move to check command test
|
# HACK move to check command test
|
||||||
def test_process_args_check
|
def test_process_args_check
|
||||||
#capture all check options
|
# capture all check options
|
||||||
check_options = nil
|
check_options = nil
|
||||||
@command_manager["check"].when_invoked do |options|
|
@command_manager["check"].when_invoked do |options|
|
||||||
check_options = options
|
check_options = options
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
#check defaults
|
# check defaults
|
||||||
@command_manager.process_args %w[check]
|
@command_manager.process_args %w[check]
|
||||||
assert_equal true, check_options[:alien]
|
assert_equal true, check_options[:alien]
|
||||||
|
|
||||||
#check settings
|
# check settings
|
||||||
check_options = nil
|
check_options = nil
|
||||||
@command_manager.process_args %w[check foobar --alien]
|
@command_manager.process_args %w[check foobar --alien]
|
||||||
assert_equal true, check_options[:alien]
|
assert_equal true, check_options[:alien]
|
||||||
@ -268,18 +268,18 @@ class TestGemCommandManager < Gem::TestCase
|
|||||||
|
|
||||||
# HACK move to build command test
|
# HACK move to build command test
|
||||||
def test_process_args_build
|
def test_process_args_build
|
||||||
#capture all build options
|
# capture all build options
|
||||||
check_options = nil
|
check_options = nil
|
||||||
@command_manager["build"].when_invoked do |options|
|
@command_manager["build"].when_invoked do |options|
|
||||||
check_options = options
|
check_options = options
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
#check defaults
|
# check defaults
|
||||||
@command_manager.process_args %w[build]
|
@command_manager.process_args %w[build]
|
||||||
#NOTE: Currently no defaults
|
# NOTE: Currently no defaults
|
||||||
|
|
||||||
#check settings
|
# check settings
|
||||||
check_options = nil
|
check_options = nil
|
||||||
@command_manager.process_args %w[build foobar.rb]
|
@command_manager.process_args %w[build foobar.rb]
|
||||||
assert_equal "foobar.rb", check_options[:args].first
|
assert_equal "foobar.rb", check_options[:args].first
|
||||||
@ -287,14 +287,14 @@ class TestGemCommandManager < Gem::TestCase
|
|||||||
|
|
||||||
# HACK move to query command test
|
# HACK move to query command test
|
||||||
def test_process_args_query
|
def test_process_args_query
|
||||||
#capture all query options
|
# capture all query options
|
||||||
check_options = nil
|
check_options = nil
|
||||||
@command_manager["query"].when_invoked do |options|
|
@command_manager["query"].when_invoked do |options|
|
||||||
check_options = options
|
check_options = options
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
#check defaults
|
# check defaults
|
||||||
Gem::Deprecate.skip_during do
|
Gem::Deprecate.skip_during do
|
||||||
@command_manager.process_args %w[query]
|
@command_manager.process_args %w[query]
|
||||||
end
|
end
|
||||||
@ -302,7 +302,7 @@ class TestGemCommandManager < Gem::TestCase
|
|||||||
assert_equal :local, check_options[:domain]
|
assert_equal :local, check_options[:domain]
|
||||||
assert_equal false, check_options[:details]
|
assert_equal false, check_options[:details]
|
||||||
|
|
||||||
#check settings
|
# check settings
|
||||||
check_options = nil
|
check_options = nil
|
||||||
Gem::Deprecate.skip_during do
|
Gem::Deprecate.skip_during do
|
||||||
@command_manager.process_args %w[query --name foobar --local --details]
|
@command_manager.process_args %w[query --name foobar --local --details]
|
||||||
@ -311,14 +311,14 @@ class TestGemCommandManager < Gem::TestCase
|
|||||||
assert_equal :local, check_options[:domain]
|
assert_equal :local, check_options[:domain]
|
||||||
assert_equal true, check_options[:details]
|
assert_equal true, check_options[:details]
|
||||||
|
|
||||||
#remote domain
|
# remote domain
|
||||||
check_options = nil
|
check_options = nil
|
||||||
Gem::Deprecate.skip_during do
|
Gem::Deprecate.skip_during do
|
||||||
@command_manager.process_args %w[query --remote]
|
@command_manager.process_args %w[query --remote]
|
||||||
end
|
end
|
||||||
assert_equal :remote, check_options[:domain]
|
assert_equal :remote, check_options[:domain]
|
||||||
|
|
||||||
#both (local/remote) domains
|
# both (local/remote) domains
|
||||||
check_options = nil
|
check_options = nil
|
||||||
Gem::Deprecate.skip_during do
|
Gem::Deprecate.skip_during do
|
||||||
@command_manager.process_args %w[query --both]
|
@command_manager.process_args %w[query --both]
|
||||||
@ -328,18 +328,18 @@ class TestGemCommandManager < Gem::TestCase
|
|||||||
|
|
||||||
# HACK move to update command test
|
# HACK move to update command test
|
||||||
def test_process_args_update
|
def test_process_args_update
|
||||||
#capture all update options
|
# capture all update options
|
||||||
check_options = nil
|
check_options = nil
|
||||||
@command_manager["update"].when_invoked do |options|
|
@command_manager["update"].when_invoked do |options|
|
||||||
check_options = options
|
check_options = options
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
#check defaults
|
# check defaults
|
||||||
@command_manager.process_args %w[update]
|
@command_manager.process_args %w[update]
|
||||||
assert_includes check_options[:document], "ri"
|
assert_includes check_options[:document], "ri"
|
||||||
|
|
||||||
#check settings
|
# check settings
|
||||||
check_options = nil
|
check_options = nil
|
||||||
@command_manager.process_args %w[update --force --document=ri --install-dir .]
|
@command_manager.process_args %w[update --force --document=ri --install-dir .]
|
||||||
assert_includes check_options[:document], "ri"
|
assert_includes check_options[:document], "ri"
|
||||||
|
@ -498,7 +498,7 @@ gem 'other', version
|
|||||||
wrapper = File.read installed_exec
|
wrapper = File.read installed_exec
|
||||||
assert_match %r{generated by RubyGems}, wrapper
|
assert_match %r{generated by RubyGems}, wrapper
|
||||||
# HACK some gems don't have #! in their executables, restore 2008/06
|
# HACK some gems don't have #! in their executables, restore 2008/06
|
||||||
#assert_no_match %r|generated by RubyGems|, wrapper
|
# assert_no_match %r|generated by RubyGems|, wrapper
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_generate_bin_script_wrappers
|
def test_generate_bin_script_wrappers
|
||||||
|
@ -1080,7 +1080,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
|
|||||||
end
|
end
|
||||||
|
|
||||||
class NilLog < WEBrick::Log
|
class NilLog < WEBrick::Log
|
||||||
def log(level, data) #Do nothing
|
def log(level, data) # Do nothing
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1034,7 +1034,7 @@ dependencies: []
|
|||||||
v = "1.1.1"
|
v = "1.1.1"
|
||||||
platforms = ["x86-mingw32", "x64-mingw32"]
|
platforms = ["x86-mingw32", "x64-mingw32"]
|
||||||
|
|
||||||
#create specs
|
# create specs
|
||||||
platforms.each do |plat|
|
platforms.each do |plat|
|
||||||
spec = Gem::Specification.new(gem, v) {|s| s.platform = plat }
|
spec = Gem::Specification.new(gem, v) {|s| s.platform = plat }
|
||||||
File.open File.join(user_spec_dir, "#{gem}-#{v}-#{plat}.gemspec"), "w" do |io|
|
File.open File.join(user_spec_dir, "#{gem}-#{v}-#{plat}.gemspec"), "w" do |io|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user