2010-10-20 15:42:17 +02:00
|
|
|
# encoding: utf-8
|
|
|
|
|
|
|
|
# This hook will be executed in context of current generator object before templater start to generate new files.
|
|
|
|
# You can update context hash and register hooks. Don't forget to use merge! instead of merge, because you are
|
|
|
|
# manipulating with one object, rather than returning new one.
|
|
|
|
|
2011-06-12 20:46:39 +02:00
|
|
|
# ace-gen project --user="Jakub Stastny" --name=101Ideas.cz --url=http://101ideas.cz
|
|
|
|
|
2010-10-20 15:42:17 +02:00
|
|
|
hook do |generator, context|
|
2011-06-12 20:46:39 +02:00
|
|
|
context[:user] ||= ENV["USER"]
|
|
|
|
context[:name] || raise("You have to specify at least --title=WebTitle")
|
|
|
|
context[:url] ||= "http://#{context[:name]}"
|
2010-10-20 15:42:17 +02:00
|
|
|
end
|