method
app_script_text
v2_4_6 -
Show latest stable
- Class:
Gem::Installer
app_script_text(bin_file_name)public
Return the text for an application file.
# File lib/rubygems/installer.rb, line 725
def app_script_text(bin_file_name)
# note that the `load` lines cannot be indented, as old RG versions match
# against the beginning of the line
return #{shebang bin_file_name}## This file was generated by RubyGems.## The application '#{spec.name}' is installed as part of a gem, and# this file is here to facilitate running it.#require 'rubygems'version = "#{Gem::Requirement.default}.a"if ARGV.first str = ARGV.first str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding if str =~ /\\A_(.*)_\\z/ and Gem::Version.correct?($1) then version = $1 ARGV.shift endendif Gem.respond_to?(:activate_bin_path)load Gem.activate_bin_path('#{spec.name}', '#{bin_file_name}', version)elsegem #{spec.name.dump}, versionload Gem.bin_path(#{spec.name.dump}, #{bin_file_name.dump}, version)end
end Related methods
- Instance methods
- app_script_text
- build_extensions
- check_executable_overwrite
- check_that_user_bin_dir_is_in_path
- default_spec_file
- dir
- ensure_dependencies_met
- ensure_dependency
- ensure_loadable_spec
- ensure_required_ruby_version_met
- ensure_required_rubygems_version_met
- extension_build_error
- extract_bin
- extract_files
- formatted_program_filename
- gem_dir
- generate_bin
- generate_bin_script
- generate_bin_symlink
- generate_windows_script
- install
- installation_satisfies_dependency?
- installed_specs
- pre_install_checks
- process_options
- run_post_build_hooks
- run_post_install_hooks
- run_pre_install_hooks
- shebang
- spec
- spec_file
- unpack
- verify_gem_home
- verify_spec
- windows_stub_script
- write_build_info_file
- write_cache_file
- write_default_spec
- write_spec
- Class methods
- at
- exec_format
- for_spec
- new