RSS
does not allow for free-form tag names, so if an RSS
feed contains a tag that we don’t know about, an UnknownTagError
is raised.
Raised when an unexpected tag is encountered.
Attributes are in key-value form, and if there’s no value provided for an attribute, a NotAvailableValueError
will be raised.
BasicSpecification
is an abstract class which implements some common code used by both Specification and StubSpecification.
Installs a gem along with all its dependencies from local and remote gems.
Raised when removing a gem with the uninstall command fails
Used to raise parsing and loading errors
Potentially raised when a specification is validated.
Raised when a gem dependencies file specifies a ruby version that does not match the current version.
Raised by Gem::Validator
when something is not right in a gem.
Raised by Resolver when a dependency requests a gem for which there is no spec.
The installer installs the files contained in the .gem into the Gem.home.
Gem::Installer
does the work of putting files in all the right places on the filesystem including unpacking the gem into its gem dir, installing the gemspec in the specifications dir, storing the cached gem in the cache dir, and installing either wrappers or symlinks for executables.
The installer invokes pre and post install hooks. Hooks can be added either through a rubygems_plugin.rb file in an installed gem or via a rubygems/defaults/#{RUBY_ENGINE}.rb or rubygems/defaults/operating_system.rb file. See Gem.pre_install
and Gem.post_install
for details.
A test case for Gem::Installer
.
Create a package based upon a Gem::Specification
. Gem packages, as well as zip files and tar/gzipped packages can be produced by this task.
In addition to the Rake targets generated by Rake::PackageTask, a Gem::PackageTask
will also generate the following tasks:
Create a RubyGems package with the given name and version.
Example using a Gem::Specification
:
require 'rubygems' require 'rubygems/package_task' spec = Gem::Specification.new do |s| s.summary = "Ruby based make-like utility." s.name = 'rake' s.version = PKG_VERSION s.requirements << 'none' s.files = PKG_FILES s.description = <<-EOF Rake is a Make-like program implemented in Ruby. Tasks and dependencies are specified in standard Ruby syntax. EOF end Gem::PackageTask.new(spec) do |pkg| pkg.need_zip = true pkg.need_tar = true end
Gem::PathSupport
facilitates the GEM_HOME and GEM_PATH environment settings to the rest of RubyGems.
Gem::StubSpecification
reads the stub: line from the gemspec. This prevents us having to eval the entire gemspec in order to find out certain information.
An Uninstaller
.
The uninstaller fires pre and post uninstall hooks. Hooks can be added either through a rubygems_plugin.rb file in an installed gem or via a rubygems/defaults/#{RUBY_ENGINE}.rb or rubygems/defaults/operating_system.rb file. See Gem.pre_uninstall
and Gem.post_uninstall
for details.
The UriFormatter
handles URIs from user-input and escaping.
uf = Gem::UriFormatter.new 'example.com' p uf.normalize #=> 'http://example.com'
The default port for LDAPS
URIs is 636, and the scheme is ‘ldaps:’ rather than ‘ldap:’. Other than that, LDAPS
URIs are identical to LDAP
URIs; see URI::LDAP
.
A generic module for daemonizing a process
AbstractSyntaxTree
provides methods to parse Ruby code into abstract syntax trees. The nodes in the tree are instances of RubyVM::AbstractSyntaxTree::Node
.
This class is MRI specific as it exposes implementation details of the MRI abstract syntax tree.
This class is experimental and its API is not stable, therefore it might change without notice. As examples, the order of children nodes is not guaranteed, the number of children nodes might change, there is no way to access children nodes by name, etc.
If you are looking for a stable API or an API working under multiple Ruby implementations, consider using the parser gem or Ripper
. If you would like to make RubyVM::AbstractSyntaxTree
stable, please join the discussion at bugs.ruby-lang.org/issues/14844.