Class: Gem2Rpm::Specification
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Gem2Rpm::Specification
- Defined in:
- lib/gem2rpm/specification.rb
Instance Method Summary collapse
-
#dependencies ⇒ Object
A list of Gem::Dependency objects this gem depends on (includes every runtime or development dependency).
-
#description ⇒ Object
A long description of gem wrapped to 78 characters.
-
#development_dependencies ⇒ Object
List of dependencies that are used for development.
-
#licenses ⇒ Object
The license(s) for the library.
-
#required_ruby_version ⇒ Object
The version of Ruby required by the gem.
-
#required_rubygems_version ⇒ Object
The RubyGems version required by gem.
-
#runtime_dependencies ⇒ Object
List of dependencies that will automatically be activated at runtime.
Instance Method Details
#dependencies ⇒ Object
A list of Gem::Dependency objects this gem depends on (includes every runtime or development dependency).
19 20 21 |
# File 'lib/gem2rpm/specification.rb', line 19 def dependencies super.map {|d| Gem2Rpm::Dependency.new d} end |
#description ⇒ Object
A long description of gem wrapped to 78 characters.
10 11 12 13 14 15 |
# File 'lib/gem2rpm/specification.rb', line 10 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 ⇒ Object
List of dependencies that are used for development.
24 25 26 |
# File 'lib/gem2rpm/specification.rb', line 24 def development_dependencies super.map {|d| Gem2Rpm::Dependency.new d} end |
#licenses ⇒ Object
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.
31 32 33 34 35 |
# File 'lib/gem2rpm/specification.rb', line 31 def licenses super rescue [] end |
#required_ruby_version ⇒ Object
The version of Ruby required by the gem. Returns array with empty string if the method is not provided by RubyGems yet.
44 45 46 47 48 49 50 |
# File 'lib/gem2rpm/specification.rb', line 44 def required_ruby_version @required_ruby_version ||= begin Helpers.requirement_versions_to_rpm(super) rescue [''] end end |
#required_rubygems_version ⇒ Object
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.
54 55 56 57 58 59 60 |
# File 'lib/gem2rpm/specification.rb', line 54 def required_rubygems_version @required_rubygems_version ||= begin Helpers::requirement_versions_to_rpm(super) rescue [''] end end |
#runtime_dependencies ⇒ Object
List of dependencies that will automatically be activated at runtime.
38 39 40 |
# File 'lib/gem2rpm/specification.rb', line 38 def runtime_dependencies super.map {|d| Gem2Rpm::Dependency.new d} end |