method

user_bundle_path

v2_6_3 - Show latest stable - Class: Bundler
user_bundle_path(dir = "home")
public

No documentation available.

# File lib/bundler.rb, line 198
    def user_bundle_path(dir = "home")
      env_var, fallback = case dir
                          when "home"
                            ["BUNDLE_USER_HOME", Pathname.new(user_home).join(".bundle")]
                          when "cache"
                            ["BUNDLE_USER_CACHE", user_bundle_path.join("cache")]
                          when "config"
                            ["BUNDLE_USER_CONFIG", user_bundle_path.join("config")]
                          when "plugin"
                            ["BUNDLE_USER_PLUGIN", user_bundle_path.join("plugin")]
                          else
                            raise BundlerError, "Unknown user path requested: #{dir}"
      end
      # `fallback` will already be a Pathname, but Pathname.new() is
      # idempotent so it's OK
      Pathname.new(ENV.fetch(env_var, fallback))
    end