cbgit 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +28 -0
- data/Rakefile +1 -0
- data/bin/gitbuild +242 -0
- data/bin/gitpullgraph +135 -0
- data/cbgit.gemspec +38 -0
- data/lib/cbgit.rb +5 -0
- data/lib/cbgit/version.rb +3 -0
- metadata +142 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1dd5ba4d3710ddad57600bb6c804f1ded2c652bf
|
4
|
+
data.tar.gz: 8c8238da1a49450cef23425fcf4f17e0ac28c913
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: cb3aa975e99cb5981376146b463dc003441e10e8da0798ca357cdda53a36c8ba03d59803440b38b6c604c9a979443e4025c74bc44c0716978b0cd64f40d7ba77
|
7
|
+
data.tar.gz: 1c0366016154d2864b8ba401729eab0b00b5b9622bc492d76f2f75c3c496a5fc7cfdf7d064376956847a95378dcd19745be4d47afe13f79bfae893812ca62d8a
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Jaime Cham
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# Cbgit
|
2
|
+
|
3
|
+
Collection of Git/GitHub related utility scripts packaged as a Ruby Gem.
|
4
|
+
|
5
|
+
- gitbuild
|
6
|
+
- gitpullgraph
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
In Rails, add this line to your application's Gemfile:
|
11
|
+
|
12
|
+
gem 'cbgit', git: 'https://github.com/cardinalblue/cbgit.git'
|
13
|
+
|
14
|
+
To install the Ruby gem from the source:
|
15
|
+
|
16
|
+
git clone https://github.com/cardinalblue/cbgit.git
|
17
|
+
cd cbgit
|
18
|
+
rake install
|
19
|
+
|
20
|
+
To install the Ruby gem directly from GitHub using the `specific_install` gem:
|
21
|
+
|
22
|
+
gem install specific_install
|
23
|
+
gem specific_install -l https://github.com/cardinalblue/cbgit.git
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
Run scripts with `--help`
|
28
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/gitbuild
ADDED
@@ -0,0 +1,242 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'octokit'
|
4
|
+
require 'git'
|
5
|
+
require 'logger'
|
6
|
+
|
7
|
+
require 'optparse'
|
8
|
+
require 'pp'
|
9
|
+
require 'json'
|
10
|
+
|
11
|
+
OPTS = {
|
12
|
+
BUILD_NAME: 'build',
|
13
|
+
|
14
|
+
GITHUB_LOGIN: ENV['GITHUB_LOGIN'],
|
15
|
+
GITHUB_PASSWORD: ENV['GITHUB_PASSWORD'],
|
16
|
+
|
17
|
+
BASE_BRANCH: 'dev',
|
18
|
+
REMOTE: 'origin',
|
19
|
+
|
20
|
+
OCTOPUS_MERGE: true,
|
21
|
+
DO_PUSH: true,
|
22
|
+
AFTER_MERGE: false,
|
23
|
+
BUILD_NUMBER: false,
|
24
|
+
}
|
25
|
+
|
26
|
+
INFO_FILEPATH = './config/gitbuild.txt'
|
27
|
+
|
28
|
+
# --------------------------------------------------
|
29
|
+
# Command line arguments
|
30
|
+
|
31
|
+
OptionParser.new{ |op|
|
32
|
+
op.banner = <<-TEXT
|
33
|
+
Creates a new build branch, merging pull requests in GitHub marked with #build.
|
34
|
+
Usage: gitbuild [name (defaults to 'build')] [options]
|
35
|
+
|
36
|
+
TEXT
|
37
|
+
op.on('-l', '--login USERNAME', 'GitHub login name' ) { |v|
|
38
|
+
OPTS[:GITHUB_LOGIN] = v }
|
39
|
+
op.on('-p', '--password PASSWORD', 'GitHub login password' ) { |v|
|
40
|
+
OPTS[:GITHUB_PASSWORD] = v }
|
41
|
+
op.on('-b', '--base-branch BRANCHNAME', "Branch to use as base (def #{OPTS[:BASE_BRANCH]})" ) { |v|
|
42
|
+
OPTS[:BASE_BRANCH] = v }
|
43
|
+
op.on('-r', '--remote REMOTENAME', "Git remote used to find GitHub (def #{OPTS[:REMOTE]})" ) { |v|
|
44
|
+
OPTS[:REMOTE] = v }
|
45
|
+
op.on('-o', '--[no-]octopus', "Use Git octopus merge (def #{OPTS[:OCTOPUS_MERGE]})" ) { |v|
|
46
|
+
OPTS[:OCTOPUS_MERGE] = v }
|
47
|
+
op.on('-n', '--build-number', "Just display build number info" ) { |v|
|
48
|
+
OPTS[:BUILD_NUMBER] = v }
|
49
|
+
op.on('--[no-]push', "Push results to remote (def #{OPTS[:DO_PUSH]}" ) { |v|
|
50
|
+
OPTS[:DO_PUSH] = v }
|
51
|
+
op.on('--after-merge', "Merge completed manually, do post (def #{OPTS[:AFTER_MERGE]}" ) { |v|
|
52
|
+
OPTS[:AFTER_MERGE] = v }
|
53
|
+
|
54
|
+
# Help
|
55
|
+
op.on_tail("-h", "--help", "Show this message") do
|
56
|
+
puts op
|
57
|
+
exit
|
58
|
+
end
|
59
|
+
}.parse!
|
60
|
+
|
61
|
+
# Whatever is left in ARGV is the required normal arguments
|
62
|
+
OPTS[:BUILD_NAME] = ARGV.pop unless ARGV.empty?
|
63
|
+
|
64
|
+
# --------------------------------------------------
|
65
|
+
# Setup Git client
|
66
|
+
|
67
|
+
@logger = Logger.new STDOUT
|
68
|
+
@g = Git.open '.', log: nil # or @logger
|
69
|
+
|
70
|
+
# --------------------------------------------------
|
71
|
+
# Setup Octokit
|
72
|
+
|
73
|
+
Octokit.configure do |config|
|
74
|
+
config.login = OPTS[:GITHUB_LOGIN] or raise 'No GitHub login given'
|
75
|
+
config.password = OPTS[:GITHUB_PASSWORD] or raise 'No GitHub password given'
|
76
|
+
end
|
77
|
+
stack = Faraday::Builder.new do |builder|
|
78
|
+
#builder.response :post
|
79
|
+
builder.use Octokit::Response::RaiseError
|
80
|
+
builder.adapter Faraday.default_adapter
|
81
|
+
end
|
82
|
+
Octokit.middleware = stack
|
83
|
+
|
84
|
+
# --------------------------------------------------
|
85
|
+
# Functions
|
86
|
+
|
87
|
+
def git command, *args
|
88
|
+
@g.lib.send :command, command, args
|
89
|
+
end
|
90
|
+
|
91
|
+
PULLS_LIMIT = 1000
|
92
|
+
def fetch_github_pulls repo=calculate_github_repo
|
93
|
+
# Access pull requests
|
94
|
+
@logger.debug "Fetching pull requests from #{repo}"
|
95
|
+
pulls = Octokit.pulls(repo, state: :open, per_page: PULLS_LIMIT)
|
96
|
+
end
|
97
|
+
|
98
|
+
def calculate_github_repo
|
99
|
+
# Figure out the repo user/name
|
100
|
+
remote = @g.remote OPTS[:REMOTE]
|
101
|
+
repo_user, repo_name = remote.url.split(':')[1].split(/[\/\.]/)
|
102
|
+
@logger.info "Extracted repo user '#{repo_user}' name '#{repo_name}' from remote '#{OPTS[:REMOTE]}' (#{remote.url})"
|
103
|
+
return "#{repo_user}/#{repo_name}"
|
104
|
+
end
|
105
|
+
|
106
|
+
def build_prefix
|
107
|
+
"#{OPTS[:BUILD_NAME]}_"
|
108
|
+
end
|
109
|
+
|
110
|
+
def calculate_build_number
|
111
|
+
@g.branches.inject 0 do |build_number, branch|
|
112
|
+
if branch.name.start_with? build_prefix
|
113
|
+
n = /\d+/.match(branch.name[build_prefix.length..-1])[0].to_i
|
114
|
+
puts "Existing branch #{branch.name} (#{build_number})" if OPTS[:BUILD_NUMBER]
|
115
|
+
if n > build_number
|
116
|
+
build_number = n
|
117
|
+
end
|
118
|
+
end
|
119
|
+
build_number
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
def pull_tag_regex
|
124
|
+
/\B\##{OPTS[:BUILD_NAME]}\b/
|
125
|
+
end
|
126
|
+
|
127
|
+
# --------------------------------------------------
|
128
|
+
# MAIN SCRIPT
|
129
|
+
|
130
|
+
begin
|
131
|
+
|
132
|
+
# --------------------------------------------------------------------
|
133
|
+
# Figure out build number
|
134
|
+
build_number = calculate_build_number
|
135
|
+
puts "---- Current build number is #{build_number}"
|
136
|
+
|
137
|
+
# Rename current branch to it
|
138
|
+
buildbranch = "#{build_prefix}#{build_number + 1}"
|
139
|
+
if OPTS[:BUILD_NUMBER]
|
140
|
+
puts "---- Next build is `#{buildbranch}`"
|
141
|
+
exit
|
142
|
+
end
|
143
|
+
|
144
|
+
# --------------------------------------------------------------------
|
145
|
+
# Figure out branches we will merge, by looking for the magic tag
|
146
|
+
pulls = fetch_github_pulls
|
147
|
+
pulls = pulls.select{ |pull| pull.body.match pull_tag_regex }
|
148
|
+
raise 'No pull requests to merge!' if pulls.empty?
|
149
|
+
brnames = pulls.map{ |b| b.head.ref }
|
150
|
+
puts "---- Found Github branches to build:\n#{brnames.join "\n" }"
|
151
|
+
|
152
|
+
unless OPTS[:AFTER_MERGE]
|
153
|
+
|
154
|
+
# First, got to base branch and pull it
|
155
|
+
@g.checkout OPTS[:BASE_BRANCH]
|
156
|
+
@g.pull OPTS[:REMOTE], OPTS[:BASE_BRANCH]
|
157
|
+
|
158
|
+
# Then create a new branch and switch to it
|
159
|
+
branch = @g.branch("tmp_#{rand 1_000_000_000_000}")
|
160
|
+
branch.checkout
|
161
|
+
|
162
|
+
# --------------------------------------------------------------------
|
163
|
+
# Do the merge
|
164
|
+
if OPTS[:OCTOPUS_MERGE]
|
165
|
+
puts "---- Merging branches via octopus:\n#{brnames.join "\n" }"
|
166
|
+
git :pull, OPTS[:REMOTE], *brnames
|
167
|
+
else
|
168
|
+
brnames.each do |brname|
|
169
|
+
puts "---- Merging branch: #{brname}"
|
170
|
+
@g.merge("#{OPTS[:REMOTE]}/#{brname}")
|
171
|
+
|
172
|
+
# Check for conflicts
|
173
|
+
conflicts = []
|
174
|
+
@g.each_conflict do |file,_,_|
|
175
|
+
conflicts += file
|
176
|
+
end
|
177
|
+
unless conflicts.empty?
|
178
|
+
puts "Conflicts merging #{branch.name}, exiting:\n#{conflicts.join(', ')}"
|
179
|
+
exit
|
180
|
+
end
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
# Done with merge
|
185
|
+
puts '!!!! Merged !!!!'
|
186
|
+
|
187
|
+
end
|
188
|
+
|
189
|
+
# --------------------------------------------------------------------
|
190
|
+
# Create branch
|
191
|
+
puts "---- Creating branch #{buildbranch}"
|
192
|
+
git :branch, '-m', buildbranch
|
193
|
+
|
194
|
+
# --------------------------------------------------------------------
|
195
|
+
# Save gitbuild info, writing a config file
|
196
|
+
info = {
|
197
|
+
branch: buildbranch,
|
198
|
+
time: Time.now,
|
199
|
+
github_login: OPTS[:GITHUB_LOGIN],
|
200
|
+
commit: {
|
201
|
+
sha: @g.log.first.sha,
|
202
|
+
},
|
203
|
+
pulls: pulls.map{ |pull|
|
204
|
+
[
|
205
|
+
"\##{pull.number}",
|
206
|
+
pull.title,
|
207
|
+
pull.head.sha,
|
208
|
+
pull.head.date
|
209
|
+
]
|
210
|
+
},
|
211
|
+
merges: @g.log('-merges')[0..20].map{ |commit|
|
212
|
+
[
|
213
|
+
commit.date,
|
214
|
+
commit.sha,
|
215
|
+
commit.message
|
216
|
+
]
|
217
|
+
}
|
218
|
+
}
|
219
|
+
File.open(INFO_FILEPATH, 'w') do |f|
|
220
|
+
f.write JSON.pretty_generate(info)
|
221
|
+
end
|
222
|
+
@g.add INFO_FILEPATH
|
223
|
+
@g.commit "added #{INFO_FILEPATH}"
|
224
|
+
|
225
|
+
# --------------------------------------------------------------------
|
226
|
+
# Push
|
227
|
+
if OPTS[:DO_PUSH]
|
228
|
+
puts "---- Pushing branch to #{OPTS[:REMOTE]}"
|
229
|
+
@g.lib.send :command, 'push', [ OPTS[:REMOTE], buildbranch, '--set-upstream']
|
230
|
+
# Hard to set arbitrary commands using Git client gem
|
231
|
+
end
|
232
|
+
|
233
|
+
rescue
|
234
|
+
|
235
|
+
# Oops, failed somehow, delete temporary branch
|
236
|
+
@g.checkout OPTS[:BASE_BRANCH]
|
237
|
+
branch.delete rescue nil
|
238
|
+
raise
|
239
|
+
end
|
240
|
+
|
241
|
+
|
242
|
+
|
data/bin/gitpullgraph
ADDED
@@ -0,0 +1,135 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'octokit'
|
4
|
+
require 'git'
|
5
|
+
require 'graph'
|
6
|
+
require 'logger'
|
7
|
+
|
8
|
+
require 'optparse'
|
9
|
+
require 'pp'
|
10
|
+
require 'json'
|
11
|
+
|
12
|
+
OPTS = {
|
13
|
+
GITHUB_LOGIN: ENV['GITHUB_LOGIN'],
|
14
|
+
GITHUB_PASSWORD: ENV['GITHUB_PASSWORD'],
|
15
|
+
|
16
|
+
REMOTE: 'origin',
|
17
|
+
}
|
18
|
+
|
19
|
+
# --------------------------------------------------
|
20
|
+
# Command line arguments
|
21
|
+
|
22
|
+
OptionParser.new{ |op|
|
23
|
+
op.banner = "Generates graph of pull requests to `/tmp/<reponame>.svg`."
|
24
|
+
op.on('-l', '--login USERNAME', 'GitHub login name' ) { |v|
|
25
|
+
OPTS[:GITHUB_LOGIN] = v }
|
26
|
+
op.on('-p', '--password PASSWORD', 'GitHub login password' ) { |v|
|
27
|
+
OPTS[:GITHUB_PASSWORD] = v }
|
28
|
+
op.on('-r', '--remote REMOTENAME', "Git remote used to find GitHub (def #{OPTS[:REMOTE]})" ) { |v|
|
29
|
+
OPTS[:REMOTE] = v }
|
30
|
+
|
31
|
+
# Help
|
32
|
+
op.on_tail("-h", "--help", "Show this message") do
|
33
|
+
puts op
|
34
|
+
exit
|
35
|
+
end
|
36
|
+
}.parse!
|
37
|
+
|
38
|
+
|
39
|
+
# --------------------------------------------------
|
40
|
+
# Setup Git client
|
41
|
+
|
42
|
+
@logger = Logger.new STDOUT
|
43
|
+
@g = Git.open '.', log: nil # or @logger
|
44
|
+
|
45
|
+
# --------------------------------------------------
|
46
|
+
# Setup Octokit
|
47
|
+
|
48
|
+
Octokit.configure do |config|
|
49
|
+
config.login = OPTS[:GITHUB_LOGIN] or raise 'No GitHub login given'
|
50
|
+
config.password = OPTS[:GITHUB_PASSWORD] or raise 'No GitHub password given'
|
51
|
+
end
|
52
|
+
stack = Faraday::Builder.new do |builder|
|
53
|
+
#builder.response :post
|
54
|
+
builder.use Octokit::Response::RaiseError
|
55
|
+
builder.adapter Faraday.default_adapter
|
56
|
+
end
|
57
|
+
Octokit.middleware = stack
|
58
|
+
|
59
|
+
# --------------------------------------------------
|
60
|
+
# Functions
|
61
|
+
|
62
|
+
def git command, *args
|
63
|
+
@g.lib.send :command, command, args
|
64
|
+
end
|
65
|
+
|
66
|
+
def fetch_github_pulls repo=calculate_github_repo
|
67
|
+
# Access pull requests
|
68
|
+
# @logger.debug "Fetching pull requests from #{repo}"
|
69
|
+
pulls = Octokit.pulls(repo, 'open')
|
70
|
+
end
|
71
|
+
|
72
|
+
def calculate_github_repo
|
73
|
+
# Figure out the repo user/name
|
74
|
+
remote = @g.remote OPTS[:REMOTE]
|
75
|
+
repo_user, repo_name = remote.url.split(/[\/\.\:]/)[-3..-2]
|
76
|
+
# @logger.info "Extracted repo user '#{repo_user}' name '#{repo_name}' from remote '#{OPTS[:REMOTE]}' (#{remote.url})"
|
77
|
+
return "#{repo_user}/#{repo_name}"
|
78
|
+
end
|
79
|
+
|
80
|
+
# --------------------------------------------------
|
81
|
+
# Monkeypatches
|
82
|
+
|
83
|
+
# Patch graph to support adding URL and target to things
|
84
|
+
class Graph::Thingy
|
85
|
+
def url v
|
86
|
+
attributes.reject! { |s| s =~ /^URL =/ }
|
87
|
+
attributes << "URL = #{Graph.escape_label v}"
|
88
|
+
end
|
89
|
+
def target v
|
90
|
+
attributes.reject! { |s| s =~ /^target =/ }
|
91
|
+
attributes << "target = #{Graph.escape_label v}"
|
92
|
+
end
|
93
|
+
def tooltip v
|
94
|
+
attributes.reject! { |s| s =~ /^tooltip =/ }
|
95
|
+
attributes << "tooltip = #{Graph.escape_label v}"
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
# -------------------------------------------------
|
100
|
+
# MAIN SCRIPT
|
101
|
+
|
102
|
+
# Figure out branches we will merge, by looking for the magic tag
|
103
|
+
pulls = fetch_github_pulls
|
104
|
+
raise 'No pull requests to merge!' if pulls.empty?
|
105
|
+
brnames = pulls.map{ |b| b.head.ref }
|
106
|
+
puts "---- Found Github branches to build:\n#{brnames.join "\n" }"
|
107
|
+
|
108
|
+
# Generate graph
|
109
|
+
repo = calculate_github_repo
|
110
|
+
filename = "/tmp/#{ repo.gsub /\W/, '_' }"
|
111
|
+
digraph repo do
|
112
|
+
orient 'LR' # "Left Right", see http://www.graphviz.org/doc/info/attrs.html
|
113
|
+
|
114
|
+
pulls.each do |pull|
|
115
|
+
|
116
|
+
# Edge attributes
|
117
|
+
e = edge(pull.head.ref, pull.base.ref)
|
118
|
+
e.label "##{pull.number.to_s}"
|
119
|
+
e.url pull.attrs[:_links][:html][:href]
|
120
|
+
e.target '_blank'
|
121
|
+
e.tooltip pull.body
|
122
|
+
|
123
|
+
# Node attributes
|
124
|
+
n = node(pull.head.ref)
|
125
|
+
n.attributes << filled << rectangle << rounded
|
126
|
+
|
127
|
+
end
|
128
|
+
|
129
|
+
save filename, 'svg'
|
130
|
+
end
|
131
|
+
|
132
|
+
# Open in browser
|
133
|
+
`open -a Safari #{filename}.svg`
|
134
|
+
|
135
|
+
|
data/cbgit.gemspec
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'cbgit/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "cbgit"
|
8
|
+
spec.version = Cbgit::VERSION
|
9
|
+
spec.authors = ["Jaime Cham"]
|
10
|
+
spec.email = ["jaime.cham@cardinalblue.com"]
|
11
|
+
spec.summary = %q{Git and GitHub related utilities.}
|
12
|
+
spec.description = <<-DESCRIPTION
|
13
|
+
- gitbuild Build Pull Requests marked with #build
|
14
|
+
- gitpullgraph Generate /tmp/gitpullgraph.svg diagram of Pull Requests
|
15
|
+
DESCRIPTION
|
16
|
+
|
17
|
+
spec.homepage = ""
|
18
|
+
spec.license = "PROPRIETARY"
|
19
|
+
|
20
|
+
spec.files = `git ls-files -z`.split("\x0")
|
21
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
22
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
23
|
+
spec.require_paths = ["lib"]
|
24
|
+
|
25
|
+
spec.add_development_dependency "bundler", "~> 1.5"
|
26
|
+
|
27
|
+
# General
|
28
|
+
spec.add_runtime_dependency "json"
|
29
|
+
spec.add_runtime_dependency "logger"
|
30
|
+
|
31
|
+
# Git
|
32
|
+
spec.add_runtime_dependency "octokit"
|
33
|
+
spec.add_runtime_dependency "git"
|
34
|
+
|
35
|
+
# Utility
|
36
|
+
spec.add_runtime_dependency "graph"
|
37
|
+
|
38
|
+
end
|
data/lib/cbgit.rb
ADDED
metadata
ADDED
@@ -0,0 +1,142 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cbgit
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.3
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jaime Cham
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-07-29 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.5'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.5'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: json
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: logger
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: octokit
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: git
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: graph
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
description: |2
|
98
|
+
- gitbuild Build Pull Requests marked with #build
|
99
|
+
- gitpullgraph Generate /tmp/gitpullgraph.svg diagram of Pull Requests
|
100
|
+
email:
|
101
|
+
- jaime.cham@cardinalblue.com
|
102
|
+
executables:
|
103
|
+
- gitbuild
|
104
|
+
- gitpullgraph
|
105
|
+
extensions: []
|
106
|
+
extra_rdoc_files: []
|
107
|
+
files:
|
108
|
+
- ".gitignore"
|
109
|
+
- Gemfile
|
110
|
+
- LICENSE.txt
|
111
|
+
- README.md
|
112
|
+
- Rakefile
|
113
|
+
- bin/gitbuild
|
114
|
+
- bin/gitpullgraph
|
115
|
+
- cbgit.gemspec
|
116
|
+
- lib/cbgit.rb
|
117
|
+
- lib/cbgit/version.rb
|
118
|
+
homepage: ''
|
119
|
+
licenses:
|
120
|
+
- PROPRIETARY
|
121
|
+
metadata: {}
|
122
|
+
post_install_message:
|
123
|
+
rdoc_options: []
|
124
|
+
require_paths:
|
125
|
+
- lib
|
126
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - ">="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
131
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
|
+
requirements:
|
133
|
+
- - ">="
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: '0'
|
136
|
+
requirements: []
|
137
|
+
rubyforge_project:
|
138
|
+
rubygems_version: 2.2.2
|
139
|
+
signing_key:
|
140
|
+
specification_version: 4
|
141
|
+
summary: Git and GitHub related utilities.
|
142
|
+
test_files: []
|