Skip to content

Instantly share code, notes, and snippets.

@benhoskings
Created August 18, 2013 16:20
Show Gist options
  • Save benhoskings/6262473 to your computer and use it in GitHub Desktop.
Save benhoskings/6262473 to your computer and use it in GitHub Desktop.
dep 'erb config', :src, :dest do
met? {
Babushka::Renderable.new(dest).from?(dependency.load_path.parent / src)
}
meet {
render_erb src, :to => dest
}
end
dep 'app' do
requires [
'app.bin',
'erb config'.with('app/app.conf.erb', '/etc/app.conf')
]
end
@schnittchen
Copy link

I suspect this will not work if the template erb is not relative to the source file of the source containing this dep, because it uses dependency.load_path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment