class Gem2Rpm::Specification

Constants

BLANK_RE

Public Instance Methods

dependencies() click to toggle source

A list of Gem::Dependency objects this gem depends on (includes every runtime or development dependency).

Calls superclass method
# File lib/gem2rpm/gem/specification.rb, line 27
def dependencies
  super.map { |d| Gem2Rpm::Dependency.new d }
end
description() click to toggle source

A long description of gem wrapped to 78 characters.

Calls superclass method
# File lib/gem2rpm/gem/specification.rb, line 11
def description
  d = super.to_s.chomp
  d = summary.to_s.chomp if d.empty?
  d.gsub!(/([^.!?])\Z/, "\\1.")
  Helpers.word_wrap(d, 78) + "\n"
end
development_dependencies() click to toggle source

List of dependencies that are used for development.

Calls superclass method
# File lib/gem2rpm/gem/specification.rb, line 32
def development_dependencies
  super.map { |d| Gem2Rpm::Dependency.new d }
end
homepage() click to toggle source

The URL of this gem's home page

Calls superclass method
# File lib/gem2rpm/gem/specification.rb, line 19
def homepage
  h = super
  h = nil if h && BLANK_RE =~ h
  h
end
licenses() click to toggle source

The license(s) for the library. Each license must be a short name, no more than 64 characters. Returns empty array if RubyGems does not provide the field.

Calls superclass method
# File lib/gem2rpm/gem/specification.rb, line 39
def licenses
  super
rescue
  []
end
required_ruby_version() click to toggle source

The version of Ruby required by the gem. Returns array with empty string if the method is not provided by RubyGems yet.

Calls superclass method
# File lib/gem2rpm/gem/specification.rb, line 52
def required_ruby_version
  @required_ruby_version ||= begin
    Helpers.requirement_versions_to_rpm(super)
  rescue
    ['']
  end
end
required_rubygems_version() click to toggle source

The RubyGems version required by gem. For RubyGems < 0.9.5 returns only array with empty string. However, this should happen only in rare cases.

Calls superclass method
# File lib/gem2rpm/gem/specification.rb, line 62
def required_rubygems_version
  @required_rubygems_version ||= begin
    Helpers.requirement_versions_to_rpm(super)
  rescue
    ['']
  end
end
runtime_dependencies() click to toggle source

List of dependencies that will automatically be activated at runtime.

Calls superclass method
# File lib/gem2rpm/gem/specification.rb, line 46
def runtime_dependencies
  super.map { |d| Gem2Rpm::Dependency.new d }
end