summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-09 14:20:10 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-09 14:20:10 +0000
commit07b87cd239db5b556a6a9bb38ea78cd2540e4682 (patch)
tree6ee91107d81d30c7c9786dbf8f48be468827f851 /lib
parent30253e6a247425a6916132a79efed30db7eb2e2c (diff)
* lib/rubygems: Update to RubyGems HEAD(e53c54a).
* test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/rubygems/basic_specification.rb3
-rw-r--r--lib/rubygems/commands/help_command.rb4
-rw-r--r--lib/rubygems/commands/yank_command.rb2
-rw-r--r--lib/rubygems/dependency_installer.rb12
-rw-r--r--lib/rubygems/path_support.rb7
-rw-r--r--lib/rubygems/psych_additions.rb2
-rw-r--r--lib/rubygems/remote_fetcher.rb2
-rw-r--r--lib/rubygems/security/signer.rb2
-rw-r--r--lib/rubygems/specification.rb2
9 files changed, 19 insertions, 17 deletions
diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb
index f5fb0f5..d1cee4f 100644
--- a/lib/rubygems/basic_specification.rb
+++ b/lib/rubygems/basic_specification.rb
@@ -61,8 +61,7 @@ class Gem::BasicSpecification
@contains_requirable_file ||= {}
@contains_requirable_file[file] ||=
begin
- if instance_variable_defined?(:@ignored) or
- instance_variable_defined?('@ignored') then
+ if instance_variable_defined?(:@ignored) then
return false
elsif missing_extensions? then
@ignored = true
diff --git a/lib/rubygems/commands/help_command.rb b/lib/rubygems/commands/help_command.rb
index ed81ad6..955ceb9 100644
--- a/lib/rubygems/commands/help_command.rb
+++ b/lib/rubygems/commands/help_command.rb
@@ -176,7 +176,7 @@ dependencies file.:
Ruby Version and Engine Dependency
==================================
-You can specifiy the version, engine and engine version of ruby to use with
+You can specify the version, engine and engine version of ruby to use with
your gem dependencies file. If you are not running the specified version
RubyGems will raise an exception.
@@ -223,7 +223,7 @@ The #group method can also be used to place gems in groups:
The #group method allows multiple groups.
The #gemspec development dependencies are placed in the :development group by
-default. This may be overriden with the :development_group option:
+default. This may be overridden with the :development_group option:
gemspec development_group: :other
diff --git a/lib/rubygems/commands/yank_command.rb b/lib/rubygems/commands/yank_command.rb
index 3c7859e..c05ee66 100644
--- a/lib/rubygems/commands/yank_command.rb
+++ b/lib/rubygems/commands/yank_command.rb
@@ -21,7 +21,7 @@ via the webhooks. If you accidentally pushed passwords or other sensitive
data you will need to change them immediately and yank your gem.
If you are yanking a gem due to intellectual property reasons contact
-http://help.rubygems.org for permanant removal. Be sure to mention this
+http://help.rubygems.org for permanent removal. Be sure to mention this
as the reason for the removal request.
EOF
end
diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb
index 039d046..9741554 100644
--- a/lib/rubygems/dependency_installer.rb
+++ b/lib/rubygems/dependency_installer.rb
@@ -218,7 +218,17 @@ class Gem::DependencyInstaller
tuples, errors = Gem::SpecFetcher.fetcher.search_for_dependency dep
if best_only && !tuples.empty?
- tuples.sort! { |a,b| b[0].version <=> a[0].version }
+ tuples.sort! do |a,b|
+ if b[0].version == a[0].version
+ if b[0].platform != Gem::Platform::RUBY
+ 1
+ else
+ -1
+ end
+ else
+ b[0].version <=> a[0].version
+ end
+ end
tuples = [tuples.first]
end
diff --git a/lib/rubygems/path_support.rb b/lib/rubygems/path_support.rb
index 2af303e..e68654c 100644
--- a/lib/rubygems/path_support.rb
+++ b/lib/rubygems/path_support.rb
@@ -43,13 +43,6 @@ class Gem::PathSupport
private
##
- # Set the Gem home directory (as reported by Gem.dir).
-
- def home=(home)
- @home = home.to_s
- end
-
- ##
# Set the Gem search path (as reported by Gem.path).
def path=(gpaths)
diff --git a/lib/rubygems/psych_additions.rb b/lib/rubygems/psych_additions.rb
index 0e4ebbd..08fc04c 100644
--- a/lib/rubygems/psych_additions.rb
+++ b/lib/rubygems/psych_additions.rb
@@ -1,4 +1,4 @@
-# This exists just to satify bugs in marshal'd gemspecs that
+# This exists just to satisfy bugs in marshal'd gemspecs that
# contain a reference to YAML::PrivateType. We prune these out
# in Specification._load, but if we don't have the constant, Marshal
# blows up.
diff --git a/lib/rubygems/remote_fetcher.rb b/lib/rubygems/remote_fetcher.rb
index d42a7bd..da1febb 100644
--- a/lib/rubygems/remote_fetcher.rb
+++ b/lib/rubygems/remote_fetcher.rb
@@ -103,7 +103,7 @@ class Gem::RemoteFetcher
# filename. Returns nil if the gem cannot be located.
#--
# Should probably be integrated with #download below, but that will be a
- # larger, more emcompassing effort. -erikh
+ # larger, more encompassing effort. -erikh
def download_to_cache dependency
found, _ = Gem::SpecFetcher.fetcher.spec_for_dependency dependency
diff --git a/lib/rubygems/security/signer.rb b/lib/rubygems/security/signer.rb
index bb1eae7..fbee240 100644
--- a/lib/rubygems/security/signer.rb
+++ b/lib/rubygems/security/signer.rb
@@ -122,7 +122,7 @@ class Gem::Security::Signer
# ~/.gem/gem-public_cert.pem.expired.%Y%m%d%H%M%S
#
# If the signing certificate can be re-signed the expired certificate will
- # be saved as ~/.gem/gem-pubilc_cert.pem.expired.%Y%m%d%H%M%S where the
+ # be saved as ~/.gem/gem-public_cert.pem.expired.%Y%m%d%H%M%S where the
# expiry time (not after) is used for the timestamp.
def re_sign_key # :nodoc:
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index ab1cd92..631bb7a 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -1932,7 +1932,7 @@ class Gem::Specification < Gem::BasicSpecification
# Singular accessor for #licenses
def license
- val = licenses and val.first
+ licenses.first
end
##