Sha256: 60e9514b7701d19578a07a4ffd258df4ac760f1c632189f67b70d6fe3be0e4dc
Contents?: true
Size: 811 Bytes
Versions: 17
Compression:
Stored size: 811 Bytes
Contents
# encoding: utf-8 # This hook will be executed after templater finish in context of current generator object. # Current directory is what you just generated, unless this is flat generator. require "rubyexts/platform" require "simple-templater/hooks/postprocess/git_repository" if RubyExts::Platform.unix? sh "chmod +x init.rb" sh "chmod +x config.ru" end hook do |generator, context| generator.after(Hooks::GitRepository) # TODO: this is probably not the best way how to do it args = Array.new args.push("--orm=#{context[:orm]}") if context[:orm] args.push("--models=#{context[:models].join(",")}") unless context[:models].empty? args.push("--controllers=#{context[:controllers].join(",")}") unless context[:controllers].empty? sh "rango create app #{context[:name]} #{args.join(" ")}" end
Version data entries
17 entries across 17 versions & 1 rubygems