class Buildr::Settings

Provide settings that come from three sources.

User settings are placed in the .buildr/settings.yaml file located in the user's home directory. They should only be used for settings that are specific to the user and applied the same way across all builds. Example for user settings are preferred repositories, path to local repository, user/name password for uploading to remote repository.

Build settings are placed in the build.yaml file located in the build directory. They help keep the buildfile and build.yaml file simple and readable, working to the advantages of each one. Example for build settings are gems, repositories and artifacts used by that build.

Profile settings are placed in the profiles.yaml file located in the build directory. They provide settings that differ in each environment the build runs in. For example, URLs and database connections will be different when used in development, test and production environments. The settings for the current environment are obtained by calling profile.

Public Instance Methods

build() click to toggle source

Build settings loaded from build.yaml file in build directory.

# File lib/buildr/core/application.rb, line 72
def build
  @build ||= load_from('build')
end
profile → hash click to toggle source

Returns the profile for the current environment.

# File lib/buildr/core/application.rb, line 85
def profile
  profiles[@application.environment] ||= {}
end
profiles() click to toggle source

Profiles loaded from profiles.yaml file in build directory.

# File lib/buildr/core/application.rb, line 77
def profiles
  @profiles ||= load_from('profiles')
end
user() click to toggle source

User settings loaded from setting.yaml file in user's home directory.

# File lib/buildr/core/application.rb, line 67
def user
  @user ||= load_from('settings', @application.home_dir)
end