oneblackbear-obbistrano 1.0.60 → 1.0.62
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/githubapi.rb +45 -0
- data/lib/obbistrano.rb +0 -1
- data/obbistrano.gemspec +2 -2
- metadata +3 -2
data/lib/githubapi.rb
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require "httparty"
|
3
|
+
|
4
|
+
class GithubApi
|
5
|
+
include HTTParty
|
6
|
+
base_uri "https://github.com/api/v2/yaml"
|
7
|
+
|
8
|
+
attr_accessor :format, :login, :token, :repo, :base_uri
|
9
|
+
|
10
|
+
def initialize(login = nil, token = nil, format = "yaml")
|
11
|
+
@format = format
|
12
|
+
if login
|
13
|
+
@login = login
|
14
|
+
@token = token
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def create_repo(params)
|
19
|
+
uri = uri = "#{self.class.base_uri}/repos/create"
|
20
|
+
post_params = {"login"=>@login, "token"=>@token}
|
21
|
+
self.class.post(uri, :query=>post_params.merge(params))
|
22
|
+
end
|
23
|
+
|
24
|
+
def add_collaborator(user)
|
25
|
+
uri = "#{self.class.base_uri}/repos/collaborators/#{@repo}/add/#{user}"
|
26
|
+
post_params = {"login"=>@login, "token"=>@token}
|
27
|
+
self.class.post(uri, :query=>post_params)
|
28
|
+
end
|
29
|
+
|
30
|
+
def add_key(params)
|
31
|
+
uri = "#{self.class.base_uri}/repos/key/#{@repo}/add"
|
32
|
+
post_params = {"login"=>@login, "token"=>@token}
|
33
|
+
params = post_params.merge(params)
|
34
|
+
self.class.post(uri, :query=>post_params.merge(params))
|
35
|
+
end
|
36
|
+
|
37
|
+
def create_issue(params)
|
38
|
+
uri = "#{self.class.base_uri}/issues/open/#{@login}/#{@repo}"
|
39
|
+
post_params = {"login"=>@login, "token"=>@token}
|
40
|
+
params = post_params.merge(params)
|
41
|
+
self.class.post(uri, :query=>post_params.merge(params))
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
|
data/lib/obbistrano.rb
CHANGED
data/obbistrano.gemspec
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{obbistrano}
|
5
|
-
s.version = "1.0.
|
5
|
+
s.version = "1.0.62"
|
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=
|
9
9
|
s.require_paths = ["lib"]
|
10
10
|
s.description = %q{An extension to Capistrano to allow deploys to Slicehost for One Black Bear}
|
11
11
|
s.email = %q{ross@oneblackbear.com}
|
12
|
-
s.files = ["README.textile", "obbistrano.gemspec", "lib/obbistrano.rb", "lib/slicehost.rb", "lib/obbistrano_tasks.rb", "lib/templates/apache_vhost.erb"]
|
12
|
+
s.files = ["README.textile", "obbistrano.gemspec", "lib/obbistrano.rb","lib/githubapi.rb", "lib/slicehost.rb", "lib/obbistrano_tasks.rb", "lib/templates/apache_vhost.erb"]
|
13
13
|
s.homepage = %q{http://github.com/oneblackbear/obbistrano}
|
14
14
|
s.rubygems_version = %q{1.3.0}
|
15
15
|
s.summary = %q{Adds extra namespaces to Capistrano to allow simple setup, deploys and maintenance.}
|
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.
|
4
|
+
version: 1.0.62
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ross Riley
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-06-
|
13
|
+
date: 2009-06-21 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -55,6 +55,7 @@ files:
|
|
55
55
|
- README.textile
|
56
56
|
- obbistrano.gemspec
|
57
57
|
- lib/obbistrano.rb
|
58
|
+
- lib/githubapi.rb
|
58
59
|
- lib/slicehost.rb
|
59
60
|
- lib/obbistrano_tasks.rb
|
60
61
|
- lib/templates/apache_vhost.erb
|