method
execute
v1_9_3_392 -
Show latest stable
-
0 notes -
Class: SetupCommand
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125 (0)
- 1_9_3_392 (0)
- 2_1_10 (0)
- 2_2_9 (0)
- 2_4_6 (0)
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
execute()
public
Hide source
# File lib/rubygems/commands/setup_command.rb, line 82 def execute @verbose = Gem.configuration.really_verbose install_destdir = options[:destdir] unless install_destdir.empty? then ENV['GEM_HOME'] ||= File.join(install_destdir, Gem.default_dir.gsub(/^[a-zA-Z]:/, '')) end check_ruby_version require 'fileutils' if Gem.configuration.really_verbose then extend FileUtils::Verbose else extend FileUtils end lib_dir, bin_dir = make_destination_dirs install_destdir install_lib lib_dir install_executables bin_dir remove_old_bin_files bin_dir say "RubyGems #{Gem::VERSION} installed" uninstall_old_gemcutter install_rdoc say if @verbose then say "-" * 78 say end release_notes = File.join Dir.pwd, 'History.txt' release_notes = if File.exist? release_notes then open release_notes do |io| text = io.gets '===' text << io.gets('===') text[0...-3].sub(/^# coding:.*?^=/, '') end else "Oh-no! Unable to find release notes!" end say release_notes say say "-" * 78 say say "RubyGems installed the following executables:" say @bin_file_names.map { |name| "\t#{name}\n" } say unless @bin_file_names.grep(/#{File::SEPARATOR}gem$/) then say "If `gem` was installed by a previous RubyGems installation, you may need" say "to remove it by hand." say end end