ace/project_generator/setup.rb
Jakub Stastny aka botanicus a1596e5642 Added generator, ace-gen works!
2011-06-12 20:46:39 +02:00

13 lines
582 B
Ruby

# 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.
# ace-gen project --user="Jakub Stastny" --name=101Ideas.cz --url=http://101ideas.cz
hook do |generator, context|
context[:user] ||= ENV["USER"]
context[:name] || raise("You have to specify at least --title=WebTitle")
context[:url] ||= "http://#{context[:name]}"
end