Class: Appraisal::GemManager::BundlerAdapter
- Defined in:
- lib/appraisal/gem_manager/bundler_adapter.rb
Overview
Bundler adapter for gem management operations. This is the default gem manager and is always available.
Constant Summary collapse
- DEFAULT_INSTALL_OPTIONS =
{"jobs" => 1}.freeze
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#initialize, #validate_availability!
Constructor Details
This class inherits a constructor from Appraisal::GemManager::Base
Instance Method Details
#available? ⇒ Boolean
16 17 18 |
# File 'lib/appraisal/gem_manager/bundler_adapter.rb', line 16 def available? true # Bundler is always available (it's a dependency of appraisal2) end |
#install(options = {}) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/appraisal/gem_manager/bundler_adapter.rb', line 20 def install( = {}) commands = [install_command().join(" ")] # Only run check command if not using --without option if ["without"].nil? || ["without"].empty? commands.unshift(check_command.join(" ")) end command = commands.join(" || ") if Bundler.settings[:path] env = {"BUNDLE_DISABLE_SHARED_GEMS" => "1"} Command.new(command, :gemfile => gemfile_path, :env => env).run else Command.new(command, :gemfile => gemfile_path).run end end |
#name ⇒ Object
12 13 14 |
# File 'lib/appraisal/gem_manager/bundler_adapter.rb', line 12 def name "bundler" end |