summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-28 00:33:08 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-28 00:33:08 +0000
commit4e53f3ad72d16ec251ba92233ce4757a3bc13618 ()
tree5795b83f4ca64ebee9a9f1586cfd6489eafce0e4 /lib
parent7a3f794da0fbfacb99c0721271990d39c9885928 (diff)
* lib/rubygems.rb, lib/rubygems/*, test/rubygems/*: Update rubygems-2.6.4.
Please see entries of 2.6.4 on https://.com/rubygems/rubygems/blob/master/History.txt git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--lib/rubygems.rb2
-rw-r--r--lib/rubygems/commands/query_command.rb2
-rw-r--r--lib/rubygems/errors.rb1
-rw-r--r--lib/rubygems/installer.rb9
-rw-r--r--lib/rubygems/remote_fetcher.rb8
-rw-r--r--lib/rubygems/server.rb46
-rw-r--r--lib/rubygems/user_interaction.rb12
7 files changed, 39 insertions, 41 deletions
@@ -10,7 +10,7 @@ require 'rbconfig'
require 'thread'
module Gem
- VERSION = '2.6.3'
end
# Must be first since it unloads the prelude from 1.9.2
@@ -259,7 +259,7 @@ is too hard to use.
if options[:domain] == :remote || specs.all? { |spec| spec.is_a? Gem::Source }
version
else
- spec = specs.select { |spec| spec.version == version }
if spec.first.default_gem?
"default: #{version}"
else
@@ -170,6 +170,7 @@ module Gem
# An English description of the error.
def wordy
"Unable to download data from #{@source.uri} - #{@error.message}"
end
@@ -509,12 +509,6 @@ class Gem::Installer
# the symlink if the gem being installed has a newer version.
def generate_bin_symlink(filename, bindir)
- if Gem.win_platform? then
- alert_warning "Unable to use symlinks on Windows, installing wrapper"
- generate_bin_script filename, bindir
- return
- end
-
src = File.join gem_dir, spec.bindir, filename
dst = File.join bindir, formatted_program_filename(filename)
@@ -528,6 +522,9 @@ class Gem::Installer
end
FileUtils.symlink src, dst, :verbose => Gem.configuration.really_verbose
end
##
@@ -27,7 +27,13 @@ class Gem::RemoteFetcher
def initialize(message, uri)
super message
- @uri = uri
end
def to_s # :nodoc:
@@ -34,7 +34,7 @@ class Gem::Server
include ERB::Util
include Gem::UserInteraction
- SEARCH = <<-SEARCH
<form class="headerSearch" name="headerSearchForm" method="get" action="/rdoc">
<div id="search" style="float:right">
<label for="q">Filter/Search</label>
@@ -42,9 +42,9 @@ class Gem::Server
<button type="submit" style="display:none"></button>
</div>
</form>
- SEARCH
- DOC_TEMPLATE = <<-'DOC_TEMPLATE'
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
@@ -68,35 +68,33 @@ class Gem::Server
<h1>Summary</h1>
<p>There are <%=values["gem_count"]%> gems installed:</p>
<p>
- <%= values["specs"].map { |v| "<a href=\"##{v["name"]}\">#{v["name"]}</a>" }.join ', ' %>.
<h1>Gems</h1>
<dl>
<% values["specs"].each do |spec| %>
<dt>
<% if spec["first_name_entry"] then %>
- <a name="<%=spec["name"]%>"></a>
<% end %>
- <b><%=spec["name"]%> <%=spec["version"]%></b>
- <% if spec["ri_installed"] then %>
- <a href="<%=spec["doc_path"]%>">[rdoc]</a>
- <% elsif spec["rdoc_installed"] then %>
- <a href="<%=spec["doc_path"]%>">[rdoc]</a>
<% else %>
<span title="rdoc not installed">[rdoc]</span>
<% end %>
<% if spec["homepage"] then %>
- <a href="<%=spec["homepage"]%>" title="<%=spec["homepage"]%>">[www]</a>
<% else %>
<span title="no homepage available">[www]</span>
<% end %>
<% if spec["has_deps"] then %>
- depends on
- <%= spec["dependencies"].map { |v| "<a href=\"##{v["name"]}\">#{v["name"]}</a>" }.join ', ' %>.
<% end %>
</dt>
<dd>
@@ -110,7 +108,7 @@ class Gem::Server
Executables are
<%end%>
- <%= spec["executables"].map { |v| "<span class=\"context-item-name\">#{v["executable"]}</span>"}.join ', ' %>.
<%end%>
<br/>
@@ -127,10 +125,10 @@ class Gem::Server
</div>
</body>
</html>
- DOC_TEMPLATE
# CSS is copy & paste from rdoc-style.css, RDoc V1.0.1 - 20041108
- RDOC_CSS = <<-RDOC_CSS
body {
font-family: Verdana,Arial,Helvetica,sans-serif;
font-size: 90%;
@@ -338,9 +336,9 @@ div.method-source-code pre { color: #ffdead; overflow: hidden; }
.ruby-comment { color: #b22222; font-weight: bold; background: transparent; }
.ruby-regexp { color: #ffa07a; background: transparent; }
.ruby-value { color: #7fffd4; background: transparent; }
- RDOC_CSS
- RDOC_NO_DOCUMENTATION = <<-'NO_DOC'
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -372,9 +370,9 @@ div.method-source-code pre { color: #ffdead; overflow: hidden; }
</div>
</body>
</html>
- NO_DOC
- RDOC_SEARCH_TEMPLATE = <<-'RDOC_SEARCH'
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -401,10 +399,10 @@ div.method-source-code pre { color: #ffdead; overflow: hidden; }
<% doc_items.each do |doc_item| %>
<dt>
<b><%=doc_item[:name]%></b>
- <a href="<%=doc_item[:url]%>">[rdoc]</a>
</dt>
<dd>
- <%=doc_item[:summary]%>
<br/>
<br/>
</dd>
@@ -423,7 +421,7 @@ div.method-source-code pre { color: #ffdead; overflow: hidden; }
</div>
</body>
</html>
- RDOC_SEARCH
def self.run(options)
new(options[:gemdir], options[:port], options[:daemon],
@@ -459,9 +457,9 @@ div.method-source-code pre { color: #ffdead; overflow: hidden; }
def doc_root gem_name
if have_rdoc_4_plus? then
- "/doc_root/#{gem_name}/"
else
- "/doc_root/#{gem_name}/rdoc/index.html"
end
end
@@ -5,6 +5,8 @@
# See LICENSE.txt for permissions.
#++
begin
require 'io/console'
rescue LoadError
@@ -676,13 +678,8 @@ class Gem::SilentUI < Gem::StreamUI
def initialize
reader, writer = nil, nil
- begin
- reader = File.open('/dev/null', 'r')
- writer = File.open('/dev/null', 'w')
- rescue Errno::ENOENT
- reader = File.open('nul', 'r')
- writer = File.open('nul', 'w')
- end
super reader, writer, writer, false
end
@@ -701,4 +698,3 @@ class Gem::SilentUI < Gem::StreamUI
SilentProgressReporter.new(@outs, *args)
end
end
-