1

the buildr docs suggest using profiles.yaml for managing settings. however, i would like a way to define settings which an individual dev would use to run locally and thus shouldn't be in scm. is there a preferred way of doing this?

pondermatic
  • 6,453
  • 10
  • 48
  • 63

3 Answers3

3

Your solution looks good. Using buildr's _ function you can cut it down slightly:

Buildr.settings.profiles.merge!(
  YAML.load(File.read(_("profiles.local.yml")))
Rhett Sutphin
  • 1,045
  • 8
  • 15
2

FWIW, I ended up with:

path = File.dirname(@application.rakefile)
loc = YAML.load(File.read(File.join(path, "profiles.local.yml")))
Buildr.settings.profiles.merge!(loc)
pondermatic
  • 6,453
  • 10
  • 48
  • 63
1

Put your local properties to local.rb, add to buildfile

require 'local'

Radio Rogal
  • 462
  • 4
  • 9