Parent

Files

Class/Module Index [+]

Quicksearch

Gem2Rpm::Specification

Public Instance Methods

dependencies() click to toggle source

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

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

A long description of gem wrapped to 78 characters.

# File lib/gem2rpm/specification.rb, line 8
def description
  text=super
  if text.nil? or text.empty?
    text=self.__getobj__().summary
  end
  Helpers::word_wrap(text.to_s.chomp, 78) + "\n"
end
development_dependencies() click to toggle source

List of dependencies that are used for development.

# File lib/gem2rpm/specification.rb, line 34
def development_dependencies
  super.map {|d| Gem2Rpm::Dependency.new d}
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.

# File lib/gem2rpm/specification.rb, line 41
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.

# File lib/gem2rpm/specification.rb, line 54
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.

# File lib/gem2rpm/specification.rb, line 64
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.

# File lib/gem2rpm/specification.rb, line 48
def runtime_dependencies
  super.map {|d| Gem2Rpm::Dependency.new d}
end
summary() click to toggle source

a short summary trimmed to 70 characters

# File lib/gem2rpm/specification.rb, line 23
def summary
  text = super
  if text.length >= 70
     text = text[0,70].split(/\s/)
     text = text[0, text.length-1].join(" ")
  end
  text = text[0, text.length-1] if text[-1] == '.'
  text
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.