git-fogbugz 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +55 -1
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/git-fogbugz.gemspec +57 -0
- data/lib/git_fogbugz.rb +15 -4
- metadata +4 -3
data/README.rdoc
CHANGED
@@ -1,6 +1,60 @@
|
|
1
1
|
= git-fogbugz
|
2
2
|
|
3
|
-
|
3
|
+
This is a program to process the input received by the git
|
4
|
+
post-receive hook from git-receive-pack. If finds references to
|
5
|
+
FogBugz tickets and transmits change information to your FogBugz
|
6
|
+
server.
|
7
|
+
|
8
|
+
== Installation
|
9
|
+
If you are not set up for gemcutter.org yet
|
10
|
+
|
11
|
+
gem install gemcutter
|
12
|
+
gem tumble
|
13
|
+
gem install git-fogbuz
|
14
|
+
|
15
|
+
If you are
|
16
|
+
|
17
|
+
gem install git-fogbuz
|
18
|
+
|
19
|
+
== Usage
|
20
|
+
|
21
|
+
Usage: git-fogbugz [options] fogbugz_server fogbugz_repo_id
|
22
|
+
|
23
|
+
Currently looks for case|bugzid|issue[:] followed by a number
|
24
|
+
|
25
|
+
Expects standard input such as sent to the git post-receive hook.
|
26
|
+
See http://www.kernel.org/pub/software/scm/git/docs/githooks.html#post-receive
|
27
|
+
|
28
|
+
Example: git-fogbugz https://example.fogbugz.com 9 < file_with_old_new_ref_lines
|
29
|
+
|
30
|
+
== Options
|
31
|
+
|
32
|
+
-p, --passthrough Output stdin
|
33
|
+
-r, --repo=REPO Location of repository default is current dir
|
34
|
+
-v, --version
|
35
|
+
-V, --verbose
|
36
|
+
-q, --quiet
|
37
|
+
-h, --help
|
38
|
+
|
39
|
+
== FogBugz setup
|
40
|
+
|
41
|
+
=== Cgit
|
42
|
+
|
43
|
+
Diff URL:
|
44
|
+
http://[cgitserver.example.com]/cgit/[repository_name]/diff/^FILE?id=^R2
|
45
|
+
|
46
|
+
Log URL:
|
47
|
+
http://[cgitserver.example.com]/cgit/[repository_name]/commit/?id=^R2
|
48
|
+
|
49
|
+
=== gitweb
|
50
|
+
TODO
|
51
|
+
|
52
|
+
|
53
|
+
== Todo
|
54
|
+
|
55
|
+
* write tests
|
56
|
+
* add option for php vs asp
|
57
|
+
* support 6,1
|
4
58
|
|
5
59
|
== Note on Patches/Pull Requests
|
6
60
|
|
data/Rakefile
CHANGED
@@ -6,7 +6,7 @@ begin
|
|
6
6
|
Jeweler::Tasks.new do |gem|
|
7
7
|
gem.name = "git-fogbugz"
|
8
8
|
gem.summary = %Q{Log git pushes to fogbugz}
|
9
|
-
gem.description = %Q{
|
9
|
+
gem.description = %Q{Git integretion with a FogBugz server}
|
10
10
|
gem.email = "roy@roywblack.com"
|
11
11
|
gem.homepage = "http://github.com/roywblack/git-fogbugz"
|
12
12
|
gem.authors = ["Roy W. Black"]
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
data/git-fogbugz.gemspec
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{git-fogbugz}
|
8
|
+
s.version = "0.1.3"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Roy W. Black"]
|
12
|
+
s.date = %q{2009-11-21}
|
13
|
+
s.default_executable = %q{git-fogbugz}
|
14
|
+
s.description = %q{Git integretion with a FogBugz server}
|
15
|
+
s.email = %q{roy@roywblack.com}
|
16
|
+
s.executables = ["git-fogbugz"]
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE",
|
19
|
+
"README.rdoc"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
".document",
|
23
|
+
".gitignore",
|
24
|
+
"LICENSE",
|
25
|
+
"README.rdoc",
|
26
|
+
"Rakefile",
|
27
|
+
"VERSION",
|
28
|
+
"bin/git-fogbugz",
|
29
|
+
"git-fogbugz.gemspec",
|
30
|
+
"lib/git_fogbugz.rb",
|
31
|
+
"test/helper.rb",
|
32
|
+
"test/test_git-fogbugz.rb"
|
33
|
+
]
|
34
|
+
s.homepage = %q{http://github.com/roywblack/git-fogbugz}
|
35
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
36
|
+
s.require_paths = ["lib"]
|
37
|
+
s.rubygems_version = %q{1.3.5}
|
38
|
+
s.summary = %q{Log git pushes to fogbugz}
|
39
|
+
s.test_files = [
|
40
|
+
"test/helper.rb",
|
41
|
+
"test/test_git-fogbugz.rb"
|
42
|
+
]
|
43
|
+
|
44
|
+
if s.respond_to? :specification_version then
|
45
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
46
|
+
s.specification_version = 3
|
47
|
+
|
48
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
49
|
+
s.add_runtime_dependency(%q<grit>, [">= 2.0.0"])
|
50
|
+
else
|
51
|
+
s.add_dependency(%q<grit>, [">= 2.0.0"])
|
52
|
+
end
|
53
|
+
else
|
54
|
+
s.add_dependency(%q<grit>, [">= 2.0.0"])
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
data/lib/git_fogbugz.rb
CHANGED
@@ -93,7 +93,7 @@ Example: git-fogbugz https://example.fogbugz.com 9 < file_with_old_new_ref_lines
|
|
93
93
|
Options are:
|
94
94
|
BANNER
|
95
95
|
opts.separator ""
|
96
|
-
opts.on_tail('-r', '--repo=REPO', "
|
96
|
+
opts.on_tail('-r', '--repo=REPO', "Location of repository default is current dir") {|repo| @options.repo = repo }
|
97
97
|
opts.on_tail('-v', '--version') { output_version ; exit 0 }
|
98
98
|
opts.on_tail('-V', '--verbose') { @options.verbose = true }
|
99
99
|
opts.on_tail('-q', '--quiet') { @options.quiet = true }
|
@@ -159,6 +159,7 @@ BANNER
|
|
159
159
|
@stdin.each do |line|
|
160
160
|
old, new, ref = line.split
|
161
161
|
repo.commits_between(old, new).each do |commit|
|
162
|
+
$stderr.puts commit.id if @options.verbose
|
162
163
|
process_commit(commit)
|
163
164
|
end
|
164
165
|
$stdout.puts line if @options.passthrough
|
@@ -176,9 +177,19 @@ BANNER
|
|
176
177
|
end
|
177
178
|
if commit.message =~ /(bugzid|case|issue)[:\s]+(\d+)/i
|
178
179
|
id = commit.id[0,7]
|
179
|
-
|
180
|
-
|
181
|
-
|
180
|
+
bugzid = $2
|
181
|
+
files = commit.diffs.each do |d|
|
182
|
+
url = make_url(bugzid, '00000', id, d.a_path)
|
183
|
+
resp = fogbugz.get(url)
|
184
|
+
unless resp.body =~ /OK/
|
185
|
+
$stderr.puts 'FAILED: ' + url
|
186
|
+
$stderr.puts resp.body
|
187
|
+
else
|
188
|
+
if @options.verbose
|
189
|
+
$stderr.puts 'OK: ' + url
|
190
|
+
$stderr.puts resp.body
|
191
|
+
end
|
192
|
+
end
|
182
193
|
end
|
183
194
|
end
|
184
195
|
return
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-fogbugz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roy W. Black
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-11-
|
12
|
+
date: 2009-11-21 00:00:00 -05:00
|
13
13
|
default_executable: git-fogbugz
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -22,7 +22,7 @@ dependencies:
|
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: 2.0.0
|
24
24
|
version:
|
25
|
-
description:
|
25
|
+
description: Git integretion with a FogBugz server
|
26
26
|
email: roy@roywblack.com
|
27
27
|
executables:
|
28
28
|
- git-fogbugz
|
@@ -39,6 +39,7 @@ files:
|
|
39
39
|
- Rakefile
|
40
40
|
- VERSION
|
41
41
|
- bin/git-fogbugz
|
42
|
+
- git-fogbugz.gemspec
|
42
43
|
- lib/git_fogbugz.rb
|
43
44
|
- test/helper.rb
|
44
45
|
- test/test_git-fogbugz.rb
|