Sha256: 4d109aa15e872172606057af9e36f393a71d75f48569a5364d74007aa72aeb14
Contents?: true
Size: 819 Bytes
Versions: 3
Compression:
Stored size: 819 Bytes
Contents
class Recipes::Github < Rails::AppBuilder def ask repo_name = "platanus/#{get(:dasherized_app_name)}" github_repo_create = answer(:github) do Ask.confirm("Do you want to use create the github repository? (#{repo_name})") end if github_repo_create github_repo_private = answer(:"github-private") do Ask.confirm("Should the repository be private?") end end set(:github_repo_name, repo_name) set(:github_repo, github_repo_create) set(:github_repo_private, github_repo_private) end def create github_repo_create(get(:github_repo_name), get(:github_repo_private)) if selected?(:github_repo) end private def github_repo_create(repo_name, private_repo = false) flag = private_repo ? "-p" : "" run "hub create #{flag} #{repo_name}" end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
potassium-2.3.0 | lib/potassium/recipes/github.rb |
potassium-2.2.0 | lib/potassium/recipes/github.rb |
potassium-2.1.0 | lib/potassium/recipes/github.rb |