v1_9_3_125 - Show latest stable - 0 notes - Superclass: Object

The Specification class contains the metadata for a Gem. Typically defined in a .gemspec file or a Rakefile, and looks like this:

spec = Gem::Specification.new do |s|
  s.name = 'example'
  s.version = '1.0'
  s.summary = 'Example gem specification'
  ...
end

For a great way to package gems, use Hoe.

Constants

NONEXISTENT_SPECIFICATION_VERSION = -1

CURRENT_SPECIFICATION_VERSION = 3

Attributes

[RW] name

This gem’s name

[R] version

This gem’s version

[RW] require_paths

Paths in the gem to add to $LOAD_PATH when this gem is activated.

The default [‘lib’] is typically sufficient.

[RW] rubygems_version

The version of RubyGems used to create this gem.

Do not set this, it is set automatically when the gem is packaged.

[RW] specification_version

The Gem::Specification version of this gemspec.

Do not set this, it is set automatically when the gem is packaged.

[R] summary

A short summary of this gem’s description. Displayed in `gem list -d`.

The description should be more detailed than the summary. For example, you might wish to copy the entire README into the description.

[RW] autorequire

Autorequire was used by old RubyGems to automatically require a file.

Deprecated: It is neither supported nor functional.

[RW] bindir

The path in the gem for executable scripts. Usually ‘bin’

[RW] cert_chain

The certificate chain used to sign this gem. See Gem::Security for details.

[R] description

A long description of this gem

[W] default_executable

Sets the default executable for this gem.

Deprecated: You must now specify the executable name to Gem.bin_path.

[RW] email

A contact email for this gem

If you are providing multiple authors and multiple emails they should be in the same order such that:

Hash[*spec.authors.zip(spec.emails).flatten]

Gives a hash of author name to email address.

[RW] homepage

The URL of this gem’s home page

[RW] loaded

True when this gemspec has been activated. This attribute is not persisted.

[RW] loaded?

True when this gemspec has been activated. This attribute is not persisted.

[RW] activated

True when this gemspec has been activated. This attribute is not persisted.

[RW] activated?

True when this gemspec has been activated. This attribute is not persisted.

[R] loaded_from

Path this gemspec was loaded from. This attribute is not persisted.

[W] original_platform

Allows deinstallation of gems with legacy platforms.

[RW] post_install_message

A message that gets displayed after the gem is installed

[R] required_ruby_version

The version of ruby required by this gem

[R] required_rubygems_version

The RubyGems version required by this gem

[RW] rubyforge_project

The rubyforge project this gem lives under. i.e. RubyGems’ rubyforge_project is “rubygems”.

[RW] signing_key

The key used to sign this gem. See Gem::Security for details.

Show files where this class is defined (1 file)
Register or log in to add new notes.