summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsvn <svn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-27 10:05:06 +0000
committersvn <svn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-27 10:05:06 +0000
commit73c8b1ea296ca9631f684609d62e908fd5f5d10c (patch)
tree477f8a9f48e7f5456c1a6835c2e8e0a11de0af6b
parent85d461456c154d7b4a72b20369e0d65d7880ce02 (diff)
* remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--lib/rubygems/requirement.rb2
-rw-r--r--lib/rubygems/specification_policy.rb4
-rw-r--r--test/rubygems/test_gem_commands_install_command.rb16
-rw-r--r--test/rubygems/test_gem_commands_query_command.rb2
-rw-r--r--test/rubygems/test_gem_server.rb8
-rw-r--r--test/rubygems/test_gem_specification.rb2
6 files changed, 17 insertions, 17 deletions
diff --git a/lib/rubygems/requirement.rb b/lib/rubygems/requirement.rb
index 430f351..0717739 100644
--- a/lib/rubygems/requirement.rb
+++ b/lib/rubygems/requirement.rb
@@ -284,7 +284,7 @@ class Gem::Requirement
end
def sort_requirements! # :nodoc:
- @requirements.sort! do |l, r|
+ @requirements.sort! do |l, r|
comp = l.last <=> r.last # first, sort by the requirement's version
next comp unless comp == 0
l.first <=> r.first # then, sort by the operator (for stability)
diff --git a/lib/rubygems/specification_policy.rb b/lib/rubygems/specification_policy.rb
index 853cca5..d117120 100644
--- a/lib/rubygems/specification_policy.rb
+++ b/lib/rubygems/specification_policy.rb
@@ -245,13 +245,13 @@ open-ended dependency on #{dep} is not recommended
def validate_self_inclusion_in_files_list
return unless files.include?(file_name)
-
+
error "#{full_name} contains itself (#{file_name}), check your files list"
end
def validate_specification_version
return if specification_version.is_a?(Integer)
-
+
error 'specification_version must be an Integer (did you mean version?)'
end
diff --git a/test/rubygems/test_gem_commands_install_command.rb b/test/rubygems/test_gem_commands_install_command.rb
index 03ceec9..bd7dcfc 100644
--- a/test/rubygems/test_gem_commands_install_command.rb
+++ b/test/rubygems/test_gem_commands_install_command.rb
@@ -451,23 +451,23 @@ ERROR: Possible alternatives: non_existent_with_hint
specs = spec_fetcher do |fetcher|
fetcher.gem 'a', 2
end
-
+
Gem.done_installing(&Gem::RDoc.method(:generation_hook))
-
+
@cmd.options[:document] = %w[rdoc ri]
@cmd.options[:domain] = :local
@cmd.options[:install_dir] = 'whatever'
-
+
a2 = specs['a-2']
FileUtils.mv a2.cache_file, @tempdir
-
+
@cmd.options[:args] = %w[a]
-
+
use_ui @ui do
# Don't use Dir.chdir with a block, it warnings a lot because
# of a downstream Dir.chdir with a block
old = Dir.getwd
-
+
begin
Dir.chdir @tempdir
assert_raises Gem::MockGemUi::SystemExitException, @ui.error do
@@ -477,9 +477,9 @@ ERROR: Possible alternatives: non_existent_with_hint
Dir.chdir old
end
end
-
+
wait_for_child_process_to_exit
-
+
assert_path_exists 'whatever/doc/a-2', 'documentation not installed'
end
diff --git a/test/rubygems/test_gem_commands_query_command.rb b/test/rubygems/test_gem_commands_query_command.rb
index db6c16e..7957689 100644
--- a/test/rubygems/test_gem_commands_query_command.rb
+++ b/test/rubygems/test_gem_commands_query_command.rb
@@ -11,7 +11,7 @@ module TestGemCommandsQueryCommandSetup
@specs = add_gems_to_fetcher
@stub_ui = Gem::MockGemUi.new
@stub_fetcher = Gem::FakeFetcher.new
-
+
@stub_fetcher.data["#{@gem_repo}Marshal.#{Gem.marshal_version}"] = proc do
raise Gem::RemoteFetcher::FetchError
end
diff --git a/test/rubygems/test_gem_server.rb b/test/rubygems/test_gem_server.rb
index 6886ec4..8a3e641 100644
--- a/test/rubygems/test_gem_server.rb
+++ b/test/rubygems/test_gem_server.rb
@@ -377,9 +377,9 @@ class TestGemServer < Gem::TestCase
assert_equal 200, @res.status
assert_match 'xsshomepagegem 1', @res.body
- # This verifies that the homepage for this spec is not displayed and is set to ".", because it's not a
+ # This verifies that the homepage for this spec is not displayed and is set to ".", because it's not a
# valid HTTP/HTTPS URL and could be unsafe in an HTML context. We would prefer to throw an exception here,
- # but spec.homepage is currently free form and not currently required to be a URL, this behavior may be
+ # but spec.homepage is currently free form and not currently required to be a URL, this behavior may be
# validated in future versions of Gem::Specification.
#
# There are two variant we're checking here, one where rdoc is not present, and one where rdoc is present in the same regex:
@@ -432,9 +432,9 @@ class TestGemServer < Gem::TestCase
assert_equal 200, @res.status
assert_match 'invalidhomepagegem 1', @res.body
- # This verifies that the homepage for this spec is not displayed and is set to ".", because it's not a
+ # This verifies that the homepage for this spec is not displayed and is set to ".", because it's not a
# valid HTTP/HTTPS URL and could be unsafe in an HTML context. We would prefer to throw an exception here,
- # but spec.homepage is currently free form and not currently required to be a URL, this behavior may be
+ # but spec.homepage is currently free form and not currently required to be a URL, this behavior may be
# validated in future versions of Gem::Specification.
#
# There are two variant we're checking here, one where rdoc is not present, and one where rdoc is present in the same regex:
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb
index edf4d08..f8bb30d 100644
--- a/test/rubygems/test_gem_specification.rb
+++ b/test/rubygems/test_gem_specification.rb
@@ -1184,7 +1184,7 @@ dependencies: []
gem = 'mingw'
v = '1.1.1'
platforms = ['x86-mingw32', 'x64-mingw32']
-
+
#create specs
platforms.each do |plat|
spec = Gem::Specification.new(gem, v) { |s| s.platform = plat }