TicGit-ng 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE_MIT ADDED
@@ -0,0 +1,29 @@
1
+ The MIT License
2
+
3
+ Portions, Copyright (c) 2008 Scott Chacon
4
+ Other portions, Copyright (c) 2011 Jeff Welling
5
+ Other portions, Copyright of their respective authors.
6
+
7
+ This MIT license and notice pertains ONLY to code NOT authored by Jeff Welling.
8
+ Contributions by Jeff Welling are licensed under GPLv3, a copy of
9
+ which is included with the source code. For information on determining
10
+ which code was authored by whom, see
11
+ http://www.kernel.org/pub/software/scm/git/docs/git-blame.html
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ of this software and associated documentation files (the "Software"), to deal
15
+ in the Software without restriction, including without limitation the rights
16
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ copies of the Software, and to permit persons to whom the Software is
18
+ furnished to do so, subject to the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be included in
21
+ all copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
29
+ THE SOFTWARE.
data/README.mkd ADDED
@@ -0,0 +1,425 @@
1
+ ## TicGit-ng ##
2
+
3
+ This project provides a ticketing system built on Git that is kept in a
4
+ separate branch in your projects Git repository. Originally called TicGit,
5
+ it is now known as TicGit-ng to continue development and avoid namespace
6
+ clashes.
7
+
8
+ ### About ###
9
+
10
+ TicGit-ng is a simple ticketing system, roughly similar to the Lighthouse model, that is based in git. It provides a command line client that uses the ‘git’ gem to keep its ticketing information in a separate branch (called ‘ticgit-ng’) within your existing git repository. All the data is file based and rarely changing, decreasing the likelihood of a merge issue. Right now, ticket branch merges need to be done manually and separately, but work is being done on a `ti sync` command to make this easier and more intuitive.
11
+
12
+ The idea is that it keeps your tickets in the same repository, but without mucking up your working tree. By using its own seperate branch to store its information it keeps the working trees in all your other branches untouched.
13
+
14
+ There are two interfaces available, the command line `ti` command and the `ticgitweb` web interface, though `ticgitweb` has many more prerequisites than `ti`.
15
+
16
+ It will automatically create the new branch the first time you use it, and it caches all the data (another working directory and index file) in your ~/.ticgit-ng directory by default. If you delete that directory, it will just create it again the next time, you will lose no data (except some of your saved preferences).
17
+
18
+ TicGit-ng is currently using itself to store its feature requests and bug reports.
19
+
20
+ ### Prerequisites ###
21
+
22
+ There are two sets of prerequisites, those for people who intend to just run `ti`, and another set for those who wish to run `ticgitweb` as well. `ticgitweb` has additional dependancies that aren't required for `ti`'s use.
23
+
24
+ **ti**
25
+
26
+ Required Packages: git, ruby, rubygems
27
+
28
+ Required Ruby Gems: git
29
+
30
+ To install these packages on a Debian system, or a Debian based system like Ubuntu, do
31
+
32
+ sudo aptitude install git ruby rubygems
33
+ sudo gem install git
34
+
35
+ **ticgitweb**
36
+
37
+ Required Packages: git, ruby, rubygems
38
+
39
+ Required Ruby Gems: git, sinatra, haml, sass
40
+
41
+ To install these packages on a Debian system, or a Debian based system like Ubuntu, do
42
+
43
+ sudo aptitude install git ruby rubygems
44
+ sudo gem install git sinatra haml sass
45
+
46
+
47
+
48
+
49
+ **A Note about rubygems**
50
+
51
+ While the version of rubygems available from the repositories on Debian 5.0.5 stable will work just fine for using the command line `ti` program, using `ticgitweb` requires some extra effort.
52
+ Older versions of rubygems, such as the one available on Debian 5.0.5, will not work out of the box with the new gem repositories because the .deb in stable relies on rubyforge rather than rubygems for its operations. See [this bug](http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=558251) for an example. If you are running an older version of rubygems, you may need to get the latest rubygems package from http://rubygems.org/ or [apt](http://jaqque.sbih.org/kplug/apt-pinning.html) [pinning](http://jeffwelling.github.com//2010/09/05/Apt-Pinning.html) before being able to properly install the git and ticgit gems.
53
+
54
+ **A Note about the git gem**
55
+
56
+ The git gem requires a git version of 1.6.0.0 or later, but on Debian stable, git-core is currently (Sept 6th 2010) at 1.5.6.5. This isn't a fatal problem and we can continue using version 1.5.6.5 with the git gem, but you will see notices like this if you do
57
+
58
+ [WARNING] The git gem requires git 1.6.0.0 or later, but only found 1.5.6.5. You should probably upgrade.
59
+ Please specify at least one action to execute.
60
+
61
+ If these annoy you as they do me and you've set up [apt](http://jaqque.sbih.org/kplug/apt-pinning.html) [pinning](http://jeffwelling.github.com//2010/09/05/Apt-Pinning.html), you can do
62
+
63
+ $ sudo aptitude -t testing install git-core
64
+
65
+ And those notices should go away.
66
+
67
+
68
+
69
+
70
+ ### Installing ###
71
+ Installation on a Debian stable system. Note that the command line interface for TicGit-ng can be run from Debian stable, but some of the gems required for the web interface may require you to use [apt](http://jaqque.sbih.org/kplug/apt-pinning.html) [pinning](http://jeffwelling.github.com//2010/09/05/Apt-Pinning.html) to run without errors. See below.
72
+
73
+ If you know what rake is and know you already have it installed, you can use the command `rake setup` to automatically install all dependencies, but the suggested method is to manually install as outlined below.
74
+
75
+ There are two parts to ticgit, the command line interface `ti` and the optional web based interface `ticgitweb`. To install the dependencies for either one, do
76
+
77
+ *ti*
78
+ sudo aptitude install rubygems
79
+ sudo gem install git
80
+
81
+ *ticgitweb*
82
+
83
+ sudo aptitude install rubygems
84
+ sudo gem install ticgit sinatra haml sass
85
+
86
+
87
+
88
+
89
+ ### Usage ###
90
+
91
+ To get a list of all commands with short description:
92
+
93
+ > ti --help
94
+ Usage: ti COMMAND [FLAGS] [ARGS]
95
+
96
+ Options for help command:
97
+
98
+ The available TicGit-ng commands are:
99
+ recent List recent activities
100
+ checkout Checkout a ticket
101
+ tag Modify tags of a ticket
102
+ comment Comment on a ticket
103
+ milestone List and modify milestones
104
+ assign Assings a ticket to someone
105
+ points Assign points to a ticket
106
+ state Change state of a ticket
107
+ show Show a ticket
108
+ new Create a new ticket
109
+ attach Attach file to ticket
110
+ list List tickets
111
+
112
+ Common options:
113
+ -v, --version Show the version number
114
+ -h, --help Display this help
115
+ "help" is not a command
116
+
117
+
118
+ To get help about a specific command:
119
+
120
+ > ti <command> --help
121
+ ## for example
122
+ > ti assign --help
123
+ Usage: ti assign [options] [ticket_id]
124
+
125
+ Options for assign command:
126
+ -c, --checkout TICKET Checkout this ticket
127
+ -u, --user USER Assign the ticket to this user
128
+
129
+ Common options:
130
+ -v, --version Show the version number
131
+ -h, --help Display this help
132
+
133
+
134
+ The available commands are:
135
+
136
+ ti list - show all tickets
137
+ ti show - show details of a specific ticket
138
+ ti new - create a new ticket
139
+ ti checkout - checkout a ticket
140
+ ti state - change a ticket state (open, resolved, invalid, hold)
141
+ ti comment - add a comment to a ticket
142
+ ti tag - add or delete a tag from a ticket
143
+ ti assign - change to whom a ticket is assigned
144
+
145
+
146
+ ### Usage Examples ###
147
+
148
+ The first time you use any command in Ticgit-ng, it will create a new branch in your repo called ‘ticgit-ng’ and setup a caching area in ~/.ticgit-ng.
149
+
150
+ If you run it without arguments, it will tell you what is available to run
151
+
152
+ $ ti
153
+ Please specify at least one action to execute.
154
+
155
+ Usage: ti COMMAND [FLAGS] [ARGS]
156
+
157
+ The available TicGit-ng commands are:
158
+ recent List recent activities
159
+ checkout Checkout a ticket
160
+ tag Modify tags of a ticket
161
+ comment Comment on a ticket
162
+ milestone List and modify milestones
163
+ assign Assings a ticket to someone
164
+ points Assign points to a ticket
165
+ state Change state of a ticket
166
+ show Show a ticket
167
+ new Create a new ticket
168
+ attach Attach file to ticket
169
+ list List tickets
170
+
171
+ Common options:
172
+ -v, --version Show the version number
173
+ -h, --help Display this help
174
+
175
+ The first time you run `ti list`, it will show an empty list.
176
+
177
+ $ ti list
178
+ I, [2010-09-06T15:47:52.075485 #4820] INFO -- : creating ticgit repo branch
179
+
180
+ TicId Title State Date Assgn Tags
181
+ -----------------------------------------------------------------------------------------
182
+
183
+ To add a new ticket you can use `ti new -t 'Title of ticket'` and give it a title in one command line.
184
+
185
+ $ ti new -t 'my new ticket'
186
+ $ ti list
187
+
188
+ TicId Title State Date Assgn Tags
189
+ -----------------------------------------------------------------------------------------
190
+ d7f2d8 my new ticket open 09/06
191
+
192
+ For the ‘comment’ and ‘new’ commands, if you don’t specify a ‘-m’ for the message, it puts you into $EDITOR to write it. The ‘new’ action is especially useful with this, because you can also tag it and give it an initial comment when you create it this way:
193
+
194
+
195
+ # ---
196
+ # tags:
197
+ # # first line will be the title of the tic, the rest will be the first comment
198
+ # # if you would like to add initial tags, put them on the 'tags:' line, comma delim
199
+ #
200
+
201
+ To edit a ticket, such as assigning a tag to the new ticket we created, we first checkout the ticket and then use `ti tag`.
202
+ Always checkout the ticket you intend to edit. Some commands allow you to include a tic_id argument but that can get confusing to keep track of and most of the time several edits will be done to the same ticket anyway, so it is suggested you use `ti checkout` for convenience if nothing else.
203
+
204
+ #ti checkout can checkout tickets based on the TicId or based on it's place in the list
205
+ $ ti checkout 1
206
+ #checks out the first ticket, or to do the same thing by using the TicId
207
+ $ ti checkout d7f2d8
208
+ #then assign the tag
209
+ $ ti tag 'bug'
210
+ #and view the result..
211
+ $ ti list
212
+
213
+ TicId Title State Date Assgn Tags
214
+ -------------------------------------------------------------------------------------------------------
215
+ * d7f2d8 my new ticket open 09/06 bug
216
+
217
+
218
+ To assign the ticket to someone, use the `ti assign` command. I assign the ticket to myself below.
219
+
220
+ $ ti assign -u 'jeff.welling@gmail.com'
221
+ $ ti list
222
+
223
+ TicId Title State Date Assgn Tags
224
+ ----------------------------------------------------------------------------------------------------------
225
+ * d7f2d8 my new ticket open 09/06 jeff.we… bug
226
+
227
+
228
+ To change the state of a ticket, such as to change it from 'open' to 'hold' or 'resolved', use `ti state`. There are 4 valid states: hold, invalid, open, and resolved.
229
+
230
+ $ ti state hold
231
+ $ ti list
232
+
233
+ TicId Title State Date Assgn Tags
234
+ ----------------------------------------------------------------------------------------------------------
235
+
236
+ *Dramatic Gasp!*
237
+ Where did all of our tickets go? Don't worry, this isn't a bug and your tickets aren't gone.
238
+
239
+ $ ti list --states open,hold
240
+
241
+ TicId Title State Date Assgn Tags
242
+ ----------------------------------------------------------------------------------------------------------
243
+ * d7f2d8 my new ticket hold 09/06 jeff.we… bug
244
+
245
+ By default `ti list` doesn't show tickets with a state of 'hold', so we have to specify that we want to see those tickets with an argument. Now you can see, out `ti state hold` command changed the state of that ticket to on hold. This can also be done without checking out the ticket by using `ti state 1 hold`.
246
+
247
+ Where ticgit expects a ticket id, it will take either the number of the ticket on the last ‘list’ you did, or it will take the partial sha each ticket is assigned when it is created – that number never changes for the life of the ticket, even across repositories, so you can email that number to someone else working on the project so they can identify it. If nothing is specified, it will use the currently checked out ticket.
248
+
249
+ $ ti comment -m "I'm a new comment"
250
+ $ ti show
251
+ Title: my new ticket
252
+ TicId: d7f2d8f6d6ec3da1a1800a33fb090d590a533bac
253
+
254
+ Assigned: jeff.welling@gmail.com
255
+ Opened: Mon Sep 06 15:52:03 -0700 2010 (0 days)
256
+ State: OPEN
257
+ Points: no estimate
258
+ Tags: bug
259
+
260
+ Comments (1):
261
+ * Added 09/06 18:34 by jeff.welling@gmail.com
262
+ I'm a new comment
263
+
264
+ `ti show` also has a '-f' argument to be able to see comments that are longer than 3 lines, which would normally be truncated.
265
+
266
+ The `ti list` command can also be sorted and filtered.
267
+
268
+ $ ti list --help
269
+ Usage: ti list [options]
270
+
271
+ Options for list command:
272
+ -l, --list Show the saved queries
273
+ -S, --saveas SAVENAME Save this list as a saved name
274
+ -a, --assigned ASSIGNED List only tickets assigned to someone
275
+ -s, --states STATE[,STATE] List only tickets in a specific state(s)
276
+ Prefix the state with '-' to negate
277
+ -t, --tags TAG[,TAG] List only tickets with specific tag(s)
278
+ Prefix the tag with '-' to negate
279
+ -o, --order ORDER Field to order by - one of : assigned,state,date,title
280
+
281
+ Common options:
282
+ -v, --version Show the version number
283
+ -h, --help Display this help
284
+
285
+ So if you wanted to see a list of all your tickets that have the ‘feature’ tag, assigned to ‘jeff.welling@gmail.com’ and are ‘open’, ordered by date opened descending, and save that view as ‘not_mine’, you can run this:
286
+
287
+ $ ti list -t feature -s open -a jeff.welling@gmail.com -o date.desc -S not_mine
288
+
289
+ Then if you want to later list tickets with the same options as you used above, use
290
+
291
+ $ ti list not_mine
292
+
293
+ ## Collaboration ##
294
+
295
+ If you have cloned a repository and would like to get the ticgit-ng branch for that repo (presuming they have one), do this.
296
+
297
+ $git branch ticgit-ng origin/ticgit-ng
298
+
299
+ This will create a ticgit-ng branch in your local repo based on the ticgit-ng branch in origin. Now you can run `ti list` and it will show you the ticgit-ng tickets for that repository.
300
+
301
+ ### Getting the TicGit-ng ticgit-ng branch ##
302
+
303
+ To download your own copy of the TicGit-ng ticgit branch after cloning the repo, so that you can add or alter a bug yourself, follow these instructions.
304
+
305
+ This will checkout a ticgit-ng branch and set it to track the ticgit-ng branch upstream in origin, and then checks out the master branch. You must checkout the master branch because TicGit-ng gets confused if you are already in the ticgit-ng branch when running TicGit-ng.
306
+
307
+ $ git checkout origin/ticgit-ng
308
+ $ git checkout -b ticgit-ng
309
+ $ git checkout master
310
+
311
+ This will show you all of the bugs in TicGit-ng's ticgit-ng branch.
312
+
313
+ $ ti list
314
+
315
+ To submit your changes back to the upstream maintainer, push the bugs in your ticgit-ng branch to your public repo on Github
316
+
317
+ $ git push origin ticgit-ng
318
+
319
+ Then contact the upstream maintainer by sending a Pull Request or Email and ask them to review and accept your bug changes.
320
+
321
+ ### Sharing your tickets with others ###
322
+
323
+ Sharing your ticgit tickets with other people is as easy as asking them either creating their ticgit-ng branch based on yours if they haven't already started their own ticgit-ng branch, or pulling your ticgit-ng branch into theirs.
324
+
325
+ If you host your repositories on [Github](http://www.github.com) as I do then this process is simplified some because you don't have to worry about hosting your repository somewhere where other people can access it to pull your ticgit-ng branch.
326
+
327
+ For example, when I want my friend wnight to have the changes I made to my tickets in my ticgit-ng repository, I do a
328
+
329
+ $ git push origin
330
+
331
+ to update all my remote branches with my current ones, and then I ask him to do a
332
+
333
+ $ git checkout ticgit-ng
334
+ $ git pull git@github.com:jeffWelling/ticgit.git ticgit-ng
335
+ $ git checkout master
336
+
337
+ to pull my changes into his ticgit-ng branch and then switch back to his master branch. Now when he does `ti list` it will show the changes I made to the tickets on my system.
338
+
339
+
340
+ ### Incorporating other peoples changes into your ticgit-ng branch ###
341
+
342
+ The process is much the same as above, except the rolls are reversed. Once you know they have published their changes and you have a URL to do a git pull from, you simply do
343
+
344
+ $ git checkout ticgit-ng
345
+ $ git pull SOURCE_URL ticgit-ng
346
+ $ git checkout master
347
+
348
+ Replacing SOURCE_URL with the URL you were told to pull from, now you can see the changes they made, in your ticgit-ng branch. You can easily publish these changes with a `git push origin` so anyone following your work can also see these changes.
349
+
350
+
351
+ ### Next generation collaboration ###
352
+
353
+ Changes made by [Bruno Santos](http://github.com/pheres) to add a [`ti sync`](http://github.com/jeffWelling/ticgit/commit/7388386fab4fb12c36e6eeb7d19eaa4e4b16b853) command were integrated on February 15th 2011. You can now use the `ti sync [options]` command to sync your tickets with anyone else you've added with `git remote add`. To use `ti sync`, all you need to do is first make sure you've already added the remote source with `git remote add`, and then do
354
+
355
+ $ ti sync --repo REMOTE_SOURCE
356
+
357
+ if you want to pull their tickets into your ticgit-ng branch *and* push your tickets to their ticgit-ng branch, or
358
+
359
+ $ ti sync --repo REMOTE_SOURCE --no-push
360
+
361
+ if you want to pull their tickets into your ticgit-ng branch without pushing your tickets to their branch.
362
+
363
+ More information on using ti sync can be gleemed from reviewing the [merge specs](https://github.com/jeffWelling/ticgit/blob/deving/spec/merging_spec.rb)
364
+
365
+ ### Ticgitweb ###
366
+
367
+ To run the Sinatra enabled web UI for your TicGit-ng repo, simply cd to your repository and run 'ticgitweb', or 'ticgitweb -p 3456' to change the port to something other than '4567', which is the Sinatra default.
368
+
369
+ Here is what the Ticket listing looks like:
370
+
371
+ <a href="http://www.flickr.com/photos/chacon/2359042481/" title="TicGitWeb Ticket List by schacon, on Flickr"><img src="http://farm4.static.flickr.com/3289/2359042481_065867a92e.jpg" width="500" height="258" alt="TicGitWeb Ticket List" /></a>
372
+
373
+ And here is an individual ticket:
374
+
375
+ <a href="http://www.flickr.com/photos/chacon/2359042513/" title="TicGitWeb Ticket by schacon, on Flickr"><img src="http://farm4.static.flickr.com/3240/2359042513_6d4bd069d0.jpg" width="500" height="275" alt="TicGitWeb Ticket" /></a>
376
+
377
+
378
+ ## Development ##
379
+
380
+ The original author had used rspec to write specs for ticgit-ng, but one of the maintainers since then switched it over to bacon[[1](http://www.ruby-forum.com/topic/137928)][[2](http://www.ruby-forum.com/topic/172139)][[3](http://testanything.org/wiki/index.php/Testing_with_Ruby)] and I haven't been too inclined to switch it back.
381
+
382
+ ### Prerequisites ###
383
+
384
+ To install the prerequisites on Debian stable for testing ticgit-ng, you will need [apt](http://jaqque.sbih.org/kplug/apt-pinning.html) [pinning](http://jeffwelling.github.com//2010/09/05/Apt-Pinning.html).
385
+
386
+ $ sudo aptitude -t testing install rubygems rake
387
+ $ sudo gem install yard bacon
388
+
389
+ I pull rubygems from testing to avoid a problem with gherkin creating a syntactically incorrect gemspec which makes a lot of noise whenever `gem` is called. I ran into a problem when gem was installing yard, it had a problem with the documentation but thankfully the error wasn't fatal and was only about not being able to compile the documentation which I don't use, so it continued without trouble.
390
+
391
+
392
+ ### How To Test ###
393
+
394
+ To test your version of ticgit-ng, go to your ticgit-ng directory and run
395
+
396
+ rake bacon
397
+
398
+ ### How to generate a gem from your development copy of ticgit-ng ###
399
+
400
+ To create a gem from your development copy of ticgit-ng, go to your ticgit-ng directory and do
401
+
402
+ rake gem
403
+
404
+ This will create a pkg/ directory, which will contain a newly created ticgit-ng gem for you to install.
405
+
406
+ More information on developing TicGit-ng and collaborating with other TicGit-ng developers at [here](https://github.com/jeffWelling/ticgit/wiki/Development)
407
+
408
+ More information on developing TicGit-ng and collaborating with other TicGit-ng developers at [here](https://github.com/jeffWelling/ticgit/wiki/Development)
409
+
410
+ ### Alternatives ###
411
+
412
+ ditz
413
+ bugs everywhere
414
+ git-issues
415
+
416
+
417
+ ## Authors ##
418
+
419
+ Original Author:
420
+ Scott Chacon (schacon@gmail.com)
421
+
422
+ Current Active Maintainer:
423
+ Jeff Welling (jeff.welling@gmail.com)
424
+
425
+ For a detailed list of contributors, use `git log`.
data/bin/ti ADDED
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env ruby
2
+ require 'rubygems'
3
+ require 'fileutils'
4
+
5
+ # Add the library from the source tree to the front of the load path.
6
+ # This allows ti to run without first installing a ticgit gem, which is
7
+ # important when testing multiple branches of development.
8
+ if File.exist? File.join('lib', 'ticgit-ng.rb')
9
+ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
10
+ end
11
+ require 'ticgit-ng'
12
+
13
+ TicGitNG::CLI.execute