summaryrefslogtreecommitdiff
path: root/lib/rubygems
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems')
-rw-r--r--lib/rubygems/basic_specification.rb22
-rw-r--r--lib/rubygems/commands/outdated_command.rb2
-rw-r--r--lib/rubygems/ext/builder.rb6
-rw-r--r--lib/rubygems/source/git.rb2
-rw-r--r--lib/rubygems/specification.rb2
-rw-r--r--lib/rubygems/uninstaller.rb2
6 files changed, 15 insertions, 21 deletions
diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb
index bb4fa281a0..6cc13bb539 100644
--- a/lib/rubygems/basic_specification.rb
+++ b/lib/rubygems/basic_specification.rb
@@ -12,7 +12,7 @@ class Gem::BasicSpecification
##
# Sets the directory where extensions for this gem will be installed.
- attr_writer :extension_install_dir # :nodoc:
+ attr_writer :extension_dir # :nodoc:
##
# The path this gemspec was loaded from. This attribute is not persisted.
@@ -69,16 +69,10 @@ class Gem::BasicSpecification
end
##
- # The directory the named +extension+ was installed into after being built.
- #
- # Usage:
- #
- # spec.extensions.each do |ext|
- # puts spec.extension_install_dir ext
- # end
+ # Returns full path to the directory where gem's extensions are installed.
- def extension_install_dir
- @extension_install_dir ||=
+ def extension_dir
+ @extension_dir ||=
File.join base_dir, 'extensions', Gem::Platform.local.to_s,
Gem.extension_api_version, full_name
end
@@ -123,7 +117,7 @@ class Gem::BasicSpecification
File.join full_gem_path, path
end
- full_paths.unshift extension_install_dir unless @extensions.empty?
+ full_paths.unshift extension_dir unless @extensions.empty?
full_paths
end
@@ -152,7 +146,7 @@ class Gem::BasicSpecification
def loaded_from= path
@loaded_from = path && path.to_s
- @extension_install_dir = nil
+ @extension_dir = nil
@full_gem_path = nil
@gems_dir = nil
@base_dir = nil
@@ -196,11 +190,11 @@ class Gem::BasicSpecification
def require_paths
return @require_paths if @extensions.empty?
- relative_extension_install_dir =
+ relative_extension_dir =
File.join '..', '..', 'extensions', Gem::Platform.local.to_s,
Gem.extension_api_version, full_name
- [relative_extension_install_dir].concat @require_paths
+ [relative_extension_dir].concat @require_paths
end
##
diff --git a/lib/rubygems/commands/outdated_command.rb b/lib/rubygems/commands/outdated_command.rb
index f51bc5e93f..7159dbb984 100644
--- a/lib/rubygems/commands/outdated_command.rb
+++ b/lib/rubygems/commands/outdated_command.rb
@@ -17,7 +17,7 @@ class Gem::Commands::OutdatedCommand < Gem::Command
def description # :nodoc:
<<-EOF
-The outdated command lists gems you way wish to upgrade to a newer version.
+The outdated command lists gems you may wish to upgrade to a newer version.
You can check for dependency mismatches using the dependency command and
update the gems with the update or install commands.
diff --git a/lib/rubygems/ext/builder.rb b/lib/rubygems/ext/builder.rb
index 110576e685..cbae8234a1 100644
--- a/lib/rubygems/ext/builder.rb
+++ b/lib/rubygems/ext/builder.rb
@@ -186,7 +186,7 @@ EOF
say "This could take a while..."
end
- dest_path = @spec.extension_install_dir
+ dest_path = @spec.extension_dir
FileUtils.rm_f @spec.gem_build_complete_path
@@ -205,9 +205,9 @@ EOF
# Writes +output+ to gem_make.out in the extension install directory.
def write_gem_make_out output # :nodoc:
- destination = File.join @spec.extension_install_dir, 'gem_make.out'
+ destination = File.join @spec.extension_dir, 'gem_make.out'
- FileUtils.mkdir_p @spec.extension_install_dir
+ FileUtils.mkdir_p @spec.extension_dir
open destination, 'wb' do |io| io.puts output end
diff --git a/lib/rubygems/source/git.rb b/lib/rubygems/source/git.rb
index 74cbab9562..522acea217 100644
--- a/lib/rubygems/source/git.rb
+++ b/lib/rubygems/source/git.rb
@@ -191,7 +191,7 @@ class Gem::Source::Git < Gem::Source
spec.loaded_from = loaded_from
spec.base_dir = base_dir
- spec.extension_install_dir =
+ spec.extension_dir =
File.join base_dir, 'extensions', Gem::Platform.local.to_s,
Gem.extension_api_version, "#{name}-#{dir_shortref}"
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index abfd139581..d2d10e1a0a 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -1744,7 +1744,7 @@ class Gem::Specification < Gem::BasicSpecification
# directory.
def gem_build_complete_path # :nodoc:
- File.join extension_install_dir, 'gem.build_complete'
+ File.join extension_dir, 'gem.build_complete'
end
##
diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb
index a1caacb10d..4cb2a1d333 100644
--- a/lib/rubygems/uninstaller.rb
+++ b/lib/rubygems/uninstaller.rb
@@ -247,7 +247,7 @@ class Gem::Uninstaller
File.writable?(spec.base_dir)
FileUtils.rm_rf spec.full_gem_path
- FileUtils.rm_rf spec.extension_install_dir
+ FileUtils.rm_rf spec.extension_dir
old_platform_name = spec.original_name
gemspec = spec.spec_file