Class: Recipes::Github

Inherits:
Rails::AppBuilder
  • Object
show all
Defined in:
lib/potassium/recipes/github.rb

Instance Method Summary collapse

Instance Method Details

#askObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/potassium/recipes/github.rb', line 2

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_create, github_repo_create)
  set(:github_repo_private, github_repo_private)
end

#createObject



17
18
19
# File 'lib/potassium/recipes/github.rb', line 17

def create
  github_repo_create(get(:github_repo_name), get(:github_repo_private))
end