method
user_bundle_path
v2_6_3 -
Show latest stable
-
0 notes -
Class: Bundler
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3 (0)
- What's this?
user_bundle_path(dir = "home")
public
Hide source
# 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