PATH:
opt
/
alt
/
ruby30
/
share
/
gems
/
gems
/
bundler-2.2.33
/
lib
/
bundler
# frozen_string_literal: true require_relative "shared_helpers" Bundler::SharedHelpers.major_deprecation 2, "Bundler no longer integrates with " \ "Capistrano, but Capistrano provides its own integration with " \ "Bundler via the capistrano-bundler gem. Use it instead." module Bundler class Deployment def self.define_task(context, task_method = :task, opts = {}) if defined?(Capistrano) && context.is_a?(Capistrano::Configuration) context_name = "capistrano" role_default = "{:except => {:no_release => true}}" error_type = ::Capistrano::CommandError else context_name = "vlad" role_default = "[:app]" error_type = ::Rake::CommandFailedError end roles = context.fetch(:bundle_roles, false) opts[:roles] = roles if roles context.send :namespace, :bundle do send :desc, <<-DESC Install the current Bundler environment. By default, gems will be \ installed to the shared/bundle path. Gems in the development and \ test group will not be installed. The install command is executed \ with the --deployment and --quiet flags. If the bundle cmd cannot \ be found then you can override the bundle_cmd variable to specify \ which one it should use. The base path to the app is fetched from \ the :latest_release variable. Set it for custom deploy layouts. You can override any of these defaults by setting the variables shown below. N.B. bundle_roles must be defined before you require 'bundler/#{context_name}' \ in your deploy.rb file. set :bundle_gemfile, "Gemfile" set :bundle_dir, File.join(fetch(:shared_path), 'bundle') set :bundle_flags, "--deployment --quiet" set :bundle_without, [:development, :test] set :bundle_with, [:mysql] set :bundle_cmd, "bundle" # e.g. "/opt/ruby/bin/bundle" set :bundle_roles, #{role_default} # e.g. [:app, :batch] DESC send task_method, :install, opts do bundle_cmd = context.fetch(:bundle_cmd, "bundle") bundle_flags = context.fetch(:bundle_flags, "--deployment --quiet") bundle_dir = context.fetch(:bundle_dir, File.join(context.fetch(:shared_path), "bundle")) bundle_gemfile = context.fetch(:bundle_gemfile, "Gemfile") bundle_without = [*context.fetch(:bundle_without, [:development, :test])].compact bundle_with = [*context.fetch(:bundle_with, [])].compact app_path = context.fetch(:latest_release) if app_path.to_s.empty? raise error_type.new("Cannot detect current release path - make sure you have deployed at least once.") end args = ["--gemfile #{File.join(app_path, bundle_gemfile)}"] args << "--path #{bundle_dir}" unless bundle_dir.to_s.empty? args << bundle_flags.to_s args << "--without #{bundle_without.join(" ")}" unless bundle_without.empty? args << "--with #{bundle_with.join(" ")}" unless bundle_with.empty? run "cd #{app_path} && #{bundle_cmd} install #{args.join(" ")}" end end end end end
[+]
..
[-] vendored_fileutils.rb
[edit]
[+]
settings
[-] similarity_detector.rb
[edit]
[-] mirror.rb
[edit]
[+]
resolver
[+]
plugin
[+]
fetcher
[-] lockfile_parser.rb
[edit]
[-] definition.rb
[edit]
[-] rubygems_integration.rb
[edit]
[-] source.rb
[edit]
[-] feature_flag.rb
[edit]
[-] index.rb
[edit]
[-] vlad.rb
[edit]
[-] compact_index_client.rb
[edit]
[+]
source
[-] spec_set.rb
[edit]
[-] env.rb
[edit]
[-] process_lock.rb
[edit]
[-] version.rb
[edit]
[-] fetcher.rb
[edit]
[-] digest.rb
[edit]
[+]
ui
[-] ruby_version.rb
[edit]
[-] ruby_dsl.rb
[edit]
[-] rubygems_ext.rb
[edit]
[-] version_ranges.rb
[edit]
[+]
man
[-] psyched_yaml.rb
[edit]
[+]
installer
[-] vendored_tmpdir.rb
[edit]
[-] lockfile_generator.rb
[edit]
[-] remote_specification.rb
[edit]
[-] gem_tasks.rb
[edit]
[+]
templates
[+]
cli
[-] runtime.rb
[edit]
[-] installer.rb
[edit]
[+]
vendor
[-] shared_helpers.rb
[edit]
[+]
compact_index_client
[-] vendored_uri.rb
[edit]
[-] worker.rb
[edit]
[-] graph.rb
[edit]
[-] gem_helper.rb
[edit]
[-] vendored_persistent.rb
[edit]
[-] source_list.rb
[edit]
[-] settings.rb
[edit]
[-] setup.rb
[edit]
[-] environment_preserver.rb
[edit]
[-] match_platform.rb
[edit]
[-] yaml_serializer.rb
[edit]
[-] constants.rb
[edit]
[-] plugin.rb
[edit]
[-] retry.rb
[edit]
[-] gemdeps.rb
[edit]
[-] injector.rb
[edit]
[-] endpoint_specification.rb
[edit]
[-] vendored_thor.rb
[edit]
[-] errors.rb
[edit]
[-] stub_specification.rb
[edit]
[-] ui.rb
[edit]
[-] dependency.rb
[edit]
[-] capistrano.rb
[edit]
[-] uri_credentials_filter.rb
[edit]
[-] deprecate.rb
[edit]
[-] gem_helpers.rb
[edit]
[-] vendored_molinillo.rb
[edit]
[-] dsl.rb
[edit]
[-] deployment.rb
[edit]
[-] vendored_tsort.rb
[edit]
[-] current_ruby.rb
[edit]
[-] gem_version_promoter.rb
[edit]
[-] cli.rb
[edit]
[-] resolver.rb
[edit]
[-] lazy_specification.rb
[edit]
[-] build_metadata.rb
[edit]
[-] dep_proxy.rb
[edit]
[-] inline.rb
[edit]
[-] rubygems_gem_installer.rb
[edit]
[-] friendly_errors.rb
[edit]
[-] source_map.rb
[edit]