Sha256: 1f82aa3b8ce333271fcffaca3fdfe6bdf9ec0a46797af63d088c15fd936a78a2

Contents?: true

Size: 939 Bytes

Versions: 5

Compression:

Stored size: 939 Bytes

Contents

gem 'github', '>= 0.7.0', :require => nil, :group => [:development]

after_everything do
  tried_create_already = false
  while (@git_uri = `git config remote.origin.url`.strip) && @git_uri.size == 0
    if tried_create_already
      @repo_name = ask_wizard "Repository already exists. What project name?"
    else
      @repo_name = ""
    end
    if config["github_private"]
      run "bundle exec gh create-from-local #{@repo_name} --private"
    else
      run "bundle exec gh create-from-local #{@repo_name}"
    end
    tried_create_already = true
  end
  
  say_custom "github", "Created repo #{@git_uri}"
end

__END__

name: GitHub
description: Push project to new GitHub repository
author: drnic

category: deployment
exclusive: scm-hosting

requires: [git]
run_after: [git]

config:
  - github_private:
      prompt: "Create a GitHub repository?"
      type: multiple_choice
      choices: [["Public", false], ["Private", true]]

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
appscrolls-0.8.0 scrolls/github.rb
appscrolls-0.7.1 scrolls/github.rb
appscrolls-0.7.0 scrolls/github.rb
eldarscrolls-0.7.0 scrolls/github.rb
ey_rails_wizard-0.6.0 scrolls/github.rb