Sha256: fc5bee2f5f0e5dcc888c0c59ac01360404df60ae34c85a8f58117bcd6aa3a254

Contents?: true

Size: 764 Bytes

Versions: 11

Compression:

Stored size: 764 Bytes

Contents

# encoding: utf-8

require "simple-templater/hooks/hook"

module SimpleTemplater::Hooks
  class GithubUser < Hook
    def question
      ENV["USER"] # don't bother users with asking, it's very likely that github username will be same as $USER variable. If not, user can specify it from CLI as --github-user=botanicus
    end

    def run
      self.context.reverse_merge!(self.key => self.reply)
    end
  end

  class GithubRepository < Hook
    def question
      self.context[:name] # don't bother users with asking, it's very likely that github username will be same as $USER variable. If not, user can specify it from CLI as --github-repository=simple-templater
    end

    def run
      self.context.reverse_merge!(self.key => self.reply)
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
simple-templater-0.0.1.6 lib/simple-templater/hooks/preprocess/github.rb
simple-templater-0.0.1.5 lib/simple-templater/hooks/preprocess/github.rb
simple-templater-0.0.1.4 lib/simple-templater/hooks/preprocess/github.rb
simple-templater-0.0.1.3 lib/simple-templater/hooks/preprocess/github.rb
simple-templater-0.2.pre lib/simple-templater/hooks/preprocess/github.rb
simple-templater-0.0.1.2 lib/simple-templater/hooks/preprocess/github.rb
simple-templater-0.0.1.1 lib/simple-templater/hooks/preprocess/github.rb
rango-0.0.6 vendor/simple-templater/lib/simple-templater/hooks/preprocess/github.rb
rango-0.1.pre vendor/simple-templater/lib/simple-templater/hooks/preprocess/github.rb
simple-templater-0.1.pre lib/simple-templater/hooks/preprocess/github.rb
simple-templater-0.0.1 lib/simple-templater/hooks/preprocess/github.rb