mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rubygems/commands/contents_command.rb: Sort output from command.
Replaces r38004, r38005 * test/rubygems/test_gem_commands_contents_command.rb: ditto. * lib/rubygems/defaults.rb: Use Gem.path_separator for jruby support. * lib/rubygems/path_support.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
09af9d7f7f
commit
82e6c75d14
5 changed files with 20 additions and 4 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
Fri Nov 30 09:22:52 2012 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
|
* lib/rubygems/commands/contents_command.rb: Sort output from command.
|
||||||
|
Replaces r38004, r38005
|
||||||
|
* test/rubygems/test_gem_commands_contents_command.rb: ditto.
|
||||||
|
|
||||||
|
* lib/rubygems/defaults.rb: Use Gem.path_separator for jruby support.
|
||||||
|
* lib/rubygems/path_support.rb: ditto
|
||||||
|
|
||||||
Fri Nov 30 08:34:03 2012 Eric Hodel <drbrain@segment7.net>
|
Fri Nov 30 08:34:03 2012 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
* lib/rdoc/generator/darkfish.rb: Silenced warning
|
* lib/rdoc/generator/darkfish.rb: Silenced warning
|
||||||
|
|
|
@ -75,14 +75,14 @@ class Gem::Commands::ContentsCommand < Gem::Command
|
||||||
|
|
||||||
if Gem.configuration.verbose then
|
if Gem.configuration.verbose then
|
||||||
say "\nDirectories searched:"
|
say "\nDirectories searched:"
|
||||||
spec_dirs.each { |dir| say dir }
|
spec_dirs.sort.each { |dir| say dir }
|
||||||
end
|
end
|
||||||
|
|
||||||
terminate_interaction 1 if gem_names.length == 1
|
terminate_interaction 1 if gem_names.length == 1
|
||||||
end
|
end
|
||||||
|
|
||||||
if spec.default_gem?
|
if spec.default_gem?
|
||||||
files = spec.files.map do |file|
|
files = spec.files.sort.map do |file|
|
||||||
case file
|
case file
|
||||||
when /\A#{spec.bindir}\//
|
when /\A#{spec.bindir}\//
|
||||||
[Gem::ConfigMap[:bindir], $POSTMATCH]
|
[Gem::ConfigMap[:bindir], $POSTMATCH]
|
||||||
|
|
|
@ -57,6 +57,13 @@ module Gem
|
||||||
File.join Gem.user_home, '.gem', ruby_engine, ConfigMap[:ruby_version]
|
File.join Gem.user_home, '.gem', ruby_engine, ConfigMap[:ruby_version]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# How String Gem paths should be split. Overridable for esoteric platforms.
|
||||||
|
|
||||||
|
def self.path_separator
|
||||||
|
File::PATH_SEPARATOR
|
||||||
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# Default gem load path
|
# Default gem load path
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ class Gem::PathSupport
|
||||||
if gpaths.kind_of?(Array)
|
if gpaths.kind_of?(Array)
|
||||||
gem_path = gpaths.dup
|
gem_path = gpaths.dup
|
||||||
else
|
else
|
||||||
gem_path = gpaths.split(File::PATH_SEPARATOR)
|
gem_path = gpaths.split(Gem.path_separator)
|
||||||
end
|
end
|
||||||
|
|
||||||
if File::ALT_SEPARATOR then
|
if File::ALT_SEPARATOR then
|
||||||
|
|
|
@ -146,7 +146,7 @@ lib/foo.rb
|
||||||
#{Gem::ConfigMap[:archdir]}/default_gem.so
|
#{Gem::ConfigMap[:archdir]}/default_gem.so
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
assert_equal expected.lines.sort, @ui.output.lines.sort
|
assert_equal expected, @ui.output
|
||||||
assert_equal "", @ui.error
|
assert_equal "", @ui.error
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue