Module: Toys::StandardMixins::Bundler
- Includes:
- Mixin
- Defined in:
- lib/toys/standard_mixins/bundler.rb
Overview
Ensures that a bundle is installed and set up when this tool is run.
The following parameters can be passed when including this mixin:
:static(Boolean) Iftrue, installs the bundle immediately, when defining the tool. Iffalse(the default), installs the bundle just before the tool runs.:groups(Array) The groups to include in setup :search_dirs(Array) Directories to search for a Gemfile. You can pass full directory paths, and/or any of the following:
-
:context- the current context directory -
:current- the current working directory -
:toys- the Toys directory containing the tool definition
The default is to search
[:toys, :context, :current]in that order.-
:on_missing(Symbol) What to do if a needed gem is not installed.Supported values:
-
:confirm- prompt the user on whether to install (default) -
:error- raise an exception -
:install- just install the gem
-
:on_conflict(Symbol) What to do if bundler has already been run with a different Gemfile.Supported values:
-
:error- raise an exception (default) -
:ignore- just silently proceed without bundling again -
:warn- print a warning and proceed without bundling again
-
:terminal(Toys::Utils::Terminal) Terminal to use (optional):input(IO) Input IO (optional, defaults to STDIN):output(IO) Output IO (optional, defaults to STDOUT)