Module: Indexer::Importer::GemspecImportation
- Included in:
- Indexer::Importer
- Defined in:
- lib/indexer/importer/gemspec.rb
Overview
It is not the recommended that a .gemspec be the usual source of metadata. Rather it is recommended that a the gemspec be produced from the metadata instead. (Rumber's metadata covers almost every aspect of a emspec, and a gemspec can be augmented where needed.) Nonetheless, a gemspec can serve as a good soruce for creating an initial metadata file.
Instance Method Summary collapse
-
#import(source) ⇒ Object
If the source file is a gemspec, import it.
Instance Method Details
#import(source) ⇒ Object
If the source file is a gemspec, import it.
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/indexer/importer/gemspec.rb', line 16 def import(source) case File.extname(source) when '.gemspec' # TODO: handle YAML-based gemspecs gemspec = ::Gem::Specification.load(source) .import_gemspec(gemspec) true else super(source) if defined?(super) end end |