oneblackbear-obbistrano 1.0.56 → 1.0.57

Sign up to get free protection for your applications and to get access to all the features.
data/lib/obbistrano.rb CHANGED
@@ -1,3 +1,4 @@
1
1
  require "slicehost"
2
- require "octopi"
3
- require "obbistrano_tasks"
2
+ require "httparty"
3
+ require "github"
4
+ require "obbistrano_tasks"
@@ -67,16 +67,17 @@ Capistrano::Configuration.instance(:must_exist).load do
67
67
  #### Github Namespace.... Allows Auto Creation of Repository, ssh keys and Repo permissions ####
68
68
 
69
69
  namespace :github do
70
-
71
70
  task :setup do
72
- authenticated_with "#{github_login}", "#{github_token}" do |g|
73
- repo = g.repository("phpwax")
74
- issue = repo.open_issue :title => "Sample issue",
75
- :body => "This issue was opened using GitHub API and Octopi"
76
- puts issue.number
77
- end
71
+ puts "*** You need to specify a github login and token to run this operation" if !defined? "#{github_login}" || !defined? "#{github_token}"
72
+ exit if !defined? "#{github_login}" || !defined? "#{github_token}"
73
+ api = GithubApi.new("#{github_login}", "#{github_token}")
74
+ params = {
75
+ :name =>"#{application}",
76
+ :body =>"Project for #{application}"
77
+ }
78
+ api.create_repo(params)
78
79
  end
79
-
80
+
80
81
  end
81
82
 
82
83
  namespace :app do
data/obbistrano.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{obbistrano}
5
- s.version = "1.0.56"
5
+ s.version = "1.0.57"
6
6
  s.authors = ["Ross Riley", "One Black Bear"]
7
7
  s.date = Time.now
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oneblackbear-obbistrano
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.56
4
+ version: 1.0.57
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ross Riley