Sha256: 92ac85c6085fb057d981f733b4cf14ee59c61e7d5745f6bfaf9aa10ed548bc30
Contents?: true
Size: 1 KB
Versions: 18
Compression:
Stored size: 1 KB
Contents
require 'libgems/config_file' module LibGems class ConfigFile # Duplicate, with slight work-arounds, but needed for SYSTEM_WIDE_CONFIG_FILE system_config_path = if defined?(Win32API) # Already required in original version CSIDL_COMMON_APPDATA = 0x0023 path = 0.chr * 260 if RUBY_VERSION > '1.9' then SHGetFolderPath = Win32API.new 'shell32', 'SHGetFolderPath', 'PLPLP', 'L', :stdcall SHGetFolderPath.call nil, CSIDL_COMMON_APPDATA, nil, 1, path else SHGetFolderPath = Win32API.new 'shell32', 'SHGetFolderPath', 'LLLLP', 'L' SHGetFolderPath.call 0, CSIDL_COMMON_APPDATA, 0, 1, path end path.strip else '/etc' end remove_const(:SYSTEM_WIDE_CONFIG_FILE) SYSTEM_WIDE_CONFIG_FILE = File.join system_config_path, 'bpmrc' def credentials_path File.join(LibGems.user_dir, "credentials") end end end
Version data entries
18 entries across 18 versions & 1 rubygems