Module Bundler::Plugin
In: lib/bundler/plugin.rb
lib/bundler/plugin/dsl.rb
lib/bundler/plugin/source_list.rb
lib/bundler/plugin/api.rb
lib/bundler/plugin/events.rb
lib/bundler/plugin/api/source.rb
lib/bundler/plugin/installer/rubygems.rb
lib/bundler/plugin/installer/git.rb
lib/bundler/plugin/index.rb
lib/bundler/plugin/installer.rb

Handles the installation of plugin in appropriate directories.

This class is supposed to be wrapper over the existing gem installation infra but currently it itself handles everything as the Source‘s subclasses (e.g. Source::RubyGems) are heavily dependent on the Gemfile.

Methods

Classes and Modules

Module Bundler::Plugin::Events
Class Bundler::Plugin::API
Class Bundler::Plugin::DSL
Class Bundler::Plugin::Index
Class Bundler::Plugin::Installer
Class Bundler::Plugin::MalformattedPlugin
Class Bundler::Plugin::SourceList
Class Bundler::Plugin::UndefinedCommandError
Class Bundler::Plugin::UnknownSourceError

Constants

PLUGIN_FILE_NAME = "plugins.rb".freeze

Public Instance methods

To be called via the API to register to handle a command

To be called via the API to register a hooks and corresponding block that will be called to handle the hook

To be called via the API to register to handle a source plugin

The cache directory for plugin stuffs

Checks if any plugin handles the command

To be called from Cli class to pass the command and argument to approriate plugin class

Evaluates the Gemfile with a limited DSL and installs the plugins specified by plugin method

@param [Pathname] gemfile path @param [Proc] block that can be evaluated for (inline) Gemfile

The global directory root for all plugin related data

Runs all the hooks that are registered for the passed event

It passes the passed arguments and block to the block registered with the api.

@param [String] event

The index object used to store the details about the plugin

Installs a new plugin by the given name

@param [Array<String>] names the name of plugin to be installed @param [Hash] options various parameters as described in description.

              Refer to cli/plugin for available options

currently only intended for specs

@return [String, nil] installed path

Executes the plugins.rb file

@param [String] name of the plugin

Runs the plugins.rb file in an isolated namespace, records the plugin actions it registers for and then passes the data to index to be stored.

@param [String] name the name of the plugin @param [Specification] spec of installed plugin @param [Boolean] optional_plugin, removed if there is conflict with any

                    other plugin (used for default source plugins)

@raise [MalformattedPlugin] if plugins.rb raises any error

The directory root for all plugin related data

If run in an app, points to local root, in app_config_path Otherwise, points to global root, in Bundler.user_bundle_path("plugin")

Post installation processing and registering with index

@param [Array<String>] plugins list to be installed @param [Hash] specs of plugins mapped to installation path (currently they

              contain all the installed specs, including plugins)

@param [Array<String>] names of inferred source plugins that can be ignored

@return [Class] that handles the source. The calss includes API::Source

Checks if any plugin declares the source

@param [Hash] The options that are present in the lock file @return [API::Source] the instance of the class that handles the source

                      type passed in locked_opts

Checks if the gem is good to be a plugin

At present it only checks whether it contains plugins.rb file

@param [Pathname] plugin_path the path plugin is installed at @raise [MalformattedPlugin] if plugins.rb file is not found

[Validate]