disu.se

GemClass

Namespace

Inventory::Rake::Tasks

Ancestors
  1. Rake::DSL

  2. Object

Defines RubyGems-related tasks. This includes tasks for generating a gem specification, creating a gem file, checking the gem file before distribution, installing gem dependencies, installing and uninstalling the gem locally, and pushing the gem to a distribution point.

Constructor

initialize(optionsHash = {}){ |taskself, specificationGem::Specification| … }?#

Sets up tasks based on inventory and specification, optionally yields the task object and the gem specification for further customization, then #defines the tasks.

The default for specification is to use the name, version, authors, email, homepage, licenses, and files of the inventory, use all of README as the description, set the summary to the first sentence of the description, set the require paths to “lib”, add each extension of the inventory’s extconf to the extensions, and finally add inventory’s dependencies.

Options
:inventoryInventory = Inventory::Rake::Tasks.inventory

The inventory to use

:specificationGem::Specification

The specification to use

Instance Methods

defineself#

Defines the following tasks:

spec

Create specifications; depends on gem:spec.

gem:spec

Create gem specification; depends on gemspec.

gemspec (file)

Gem specification file; depends on Rakefile, README, and inventory path.

dist

Create files for distribution; depends on gem:dist.

gem:dist

Create gem for distribution; depends on inventory:check and gem file.

gem (file)

Gem file; depends on files included in gem.

dist:check

Check files before distribution; depends on dist and gem:dist:check.

gem:dist:check

Check gem before distribution; depends on gem:dist.

deps:install

Install dependencies on the local system; depends on gem:deps:install.

gem:deps:install

Install dependencies in ruby gem directory.

deps:install:user

Install dependencies for the current user; depends on gem:deps:install:user.

gem:deps:install:user

Install dependencies in the user gem directory.

install

Install distribution files on the local system; depends on gem:install.

gem:install

Install gem in ruby gem directory; depends on gem:dist.

install:user

Install distribution files for the current user; depends on gem:install:user.

gem:install:user

Install gem in the user gem directory.

uninstall

Delete all files installed on the local system.

gem:uninstall

Uninstall gem from ruby gem directory.

uninstall:user

Delete all files installed for current user.

gem:uninstall:user

Uninstall gem from ruby gem directory.

push

Push distribution files to distribution hubs.

gem:push

Push gem to rubygems.org.

The gemspec will be added to Inventory::Rake::Tasks.cleanfiles.

inventory=(valueInventory)Inventory#

Sets and returns the inventory to use: value.

specification=(valueGem::Specification)Gem::Specification#

Sets and returns the specification to use: value.