merbthor

Created: 2008-10-13 06:26
Updated: 2016-05-08 14:48

README.markdown

Instructions

To see an overview of the basic tasks run thor -T. Add --all to see all tasks, including the more low-level ones.

Basic tasks

merb:dependencies:*

The Dependencies tasks will install dependencies based on actual application dependencies. For this, the application is queried for any dependencies. All operations will be performed within this context.

List application dependencies.

By default all dependencies are listed, partitioned into system, local and currently missing dependencies. The first argument allows you to filter on any of the partitionings. A second argument can be used to filter on a set of known components, like all merb-more gems for example.

Examples:

  • merb:dependencies:list # list all dependencies - the default
  • merb:dependencies:list local # list only local gems
  • merb:dependencies:list all merb-more # list only merb-more related dependencies
  • merb:dependencies:list --stack # list framework dependencies
  • merb:dependencies:list --no-stack # list 3rd party dependencies
  • merb:dependencies:list --config # list dependencies from the default config
  • merb:dependencies:list --config-file file.yml # list from the specified config file

Install application dependencies.

By default all required dependencies are installed. The first argument specifies which strategy to use: stable or edge. A second argument can be used to filter on a set of known components.

Existing dependencies will be clobbered; when :force => true then all gems will be cleared first, otherwise only existing local dependencies of the gems to be installed will be removed.

Examples:

  • merb:dependencies:install # install all dependencies using stable strategy
  • merb:dependencies:install stable --version 0.9.8 # install a specific version of the framework
  • merb:dependencies:install stable missing # install currently missing gems locally
  • merb:dependencies:install stable merb-more # install only merb-more related dependencies
  • merb:dependencies:install stable --stack # install framework dependencies
  • merb:dependencies:install stable --no-stack # install 3rd party dependencies
  • merb:dependencies:install stable --config # read dependencies from the default config
  • merb:dependencies:install stable --config-file file.yml # read from the specified config file

In addition to the options above, edge install uses the following:

  • merb:dependencies:install edge # install all dependencies using edge strategy
  • merb:dependencies:install edge --sources file.yml # install edge from the specified git sources config

Uninstall application dependencies.

By default all required dependencies are installed. An optional argument can be used to filter on a set of known components.

Existing dependencies will be clobbered; when :force => true then all gems will be cleared, otherwise only existing local dependencies of the matching component set will be removed.

Examples:

  • merb:dependencies:uninstall # uninstall all dependencies - the default
  • merb:dependencies:uninstall merb-more # uninstall merb-more related gems locally
  • merb:dependencies:uninstall --config # read dependencies from the default config

Recreate binary gems on the current platform.

This task should be executed as part of a deployment setup, where the deployment system runs this after the app has been installed. Usually triggered by Capistrano, God...

It will regenerate gems from the bundled gems cache for any gem that has C extensions - which need to be recompiled for the target deployment platform.

Note: gems/cache should be in your SCM for this to work correctly.

Examples:

merb:dependencies:redeploy

Create a dependencies configuration file.

A configuration yaml file will be created from the extracted application dependencies. The format of the configuration is as follows:

--- - merb-core (= 0.9.8, runtime) - merb-slices (= 0.9.8, runtime)

This format is exactly the same as Gem::Dependency#to_s returns.

Examples:

  • merb:dependencies:configure --force # overwrite the default config file
  • merb:dependencies:configure --version 0.9.8 # configure specific framework version
  • merb:dependencies:configure --config-file file.yml # write to the specified config file

merb:stack:*

The Stack tasks will install dependencies based on known sets of gems, regardless of actual application dependency settings.

List components and their dependencies.

Will list dependencies from known sets of gems.

Examples:

  • merb:stack:list # list all components
  • merb:stack:list merb-more # list all dependencies of merb-more

Install stack components or individual gems - from stable rubygems by default.

See also: Merb::Dependencies#install and Merb::Dependencies#install_dependencies

Examples:

  • merb:stack:install # install the default merb stack
  • merb:stack:install basics # install a basic set of dependencies
  • merb:stack:install merb-core # install merb-core from stable
  • merb:stack:install merb-more --edge # install merb-core from edge
  • merb:stack:install merb-core thor merb-slices # install the specified gems

Uninstall stack components or individual gems.

See also: Merb::Dependencies#uninstall

Examples:

  • merb:stack:uninstall # uninstall the default merb stack
  • merb:stack:uninstall merb-more # uninstall merb-more
  • merb:stack:uninstall merb-core thor merb-slices # uninstall the specified gems

merb:tasks:*

Find the latest merb-core and gather its dependencies.

We check for 0.9.8 as a minimum release version.

Examples:

  • merb:tasks:version

Show merb.thor version information

  • merb:tasks:version # show the current version info
  • merb:tasks:version --info # show extended version info

Update merb.thor tasks from remotely available version

  • merb:tasks:update # update merb.thor
  • merb:tasks:update --force # force-update merb.thor
  • merb:tasks:update --dry-run # show version info only

Low-level tasks

merb💎*

List gems that match the specified criteria.

By default all local gems are listed. When the first argument is 'all' the list is partitioned into system an local gems; specify 'system' to show only system gems. A second argument can be used to filter on a set of known components, like all merb-more gems for example.

Examples:

  • merb💎list # list all local gems - the default
  • merb💎list all # list system and local gems
  • merb💎list system # list only system gems
  • merb💎list all merb-more # list only merb-more related gems
  • merb💎list --version 0.9.8 # list gems that match the version

Install the specified gems.

All arguments should be names of gems to install.

When :force => true then any existing versions of the gems to be installed will be uninstalled first. It's important to note that so-called meta-gems or gems that exactly match a set of Merb::Stack.components will have their sub-gems uninstalled too. For example, uninstalling merb-more will install all contained gems: merb-action-args, merb-assets, merb-gen, ...