Sha256: 36088e88d5dad3337cd2f10ead07f26839e215768ab80a1ada6bfd2fda2406d3
Contents?: true
Size: 551 Bytes
Versions: 11
Compression:
Stored size: 551 Bytes
Contents
# encoding: utf-8 require "simple-templater/hooks/hook" # run your generator with --git-repository resp. --no-git-repository module SimpleTemplater::Hooks class GitRepository < Hook def question CLI.yes?("Do you want to initialize Git repozitory and do initial commit?") end def run sh "git init" sh "git add ." sh "git commit -a -m 'Initial import'" end end end __END__ OR hook(:git_repository, "Do you want to initialize Git repozitory and do initial commit?") do |hook| # content of run method end
Version data entries
11 entries across 11 versions & 2 rubygems