ohac-ditz 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest.txt ADDED
@@ -0,0 +1,48 @@
1
+ Changelog
2
+ INSTALL
3
+ LICENSE
4
+ Manifest.txt
5
+ PLUGINS.txt
6
+ README.txt
7
+ Rakefile
8
+ ReleaseNotes
9
+ bin/ditz
10
+ contrib/completion/_ditz.zsh
11
+ contrib/completion/ditz.bash
12
+ lib/ditz.rb
13
+ lib/ditz/file-storage.rb
14
+ lib/ditz/hook.rb
15
+ lib/ditz/html.rb
16
+ lib/ditz/lowline.rb
17
+ lib/ditz/model-objects.rb
18
+ lib/ditz/model.rb
19
+ lib/ditz/operator.rb
20
+ lib/ditz/plugins/git-sync.rb
21
+ lib/ditz/plugins/git.rb
22
+ lib/ditz/plugins/issue-claiming.rb
23
+ lib/ditz/plugins/issue-labeling.rb
24
+ lib/ditz/plugins/issue-timetracker.rb
25
+ lib/ditz/util.rb
26
+ lib/ditz/view.rb
27
+ lib/ditz/views.rb
28
+ share/ditz/index.rhtml
29
+ share/ditz/issue.rhtml
30
+ share/ditz/issue_table.rhtml
31
+ share/ditz/release.rhtml
32
+ share/ditz/unassigned.rhtml
33
+ share/ditz/component.rhtml
34
+ share/ditz/style.css
35
+ share/ditz/blue-check.png
36
+ share/ditz/green-bar.png
37
+ share/ditz/green-check.png
38
+ share/ditz/red-check.png
39
+ share/ditz/yellow-bar.png
40
+ man/man1/ditz.1
41
+ setup.rb
42
+ bin/coditz.rb
43
+ bin/coditz_for_0.5.rb
44
+ contrib/bookmarklet.js
45
+ lib/ditz/plugins/icalendar.rb
46
+ lib/ditz/plugins/mercurial.rb
47
+ lib/ditz/plugins/sha-names.rb
48
+ sheila/sheila.rb
data/PLUGINS.txt ADDED
@@ -0,0 +1,197 @@
1
+ Ditz plugin documentation
2
+ -------------------------
3
+
4
+ Ditz features a code plugin system for adding and extending commands, fields,
5
+ and output. Ditz's plugin system is used to add optional functionality to Ditz.
6
+
7
+ If you're interested in writing a plugin, look at the simple plugins in
8
+ lib/ditz/plugin/, and see
9
+ http://all-thing.net/2008/07/ditz-04-and-magic-of-ruby-dsls.html
10
+ If you're interested using plugins, read on.
11
+
12
+ Ditz loads specific plugins by looking for a .ditz-plugins file in the project
13
+ root. The format of this file is a YAML array of strings, where each string is
14
+ a plugin name. You can write this by hand like this:
15
+
16
+ - my-plugin
17
+ - another-plugin
18
+
19
+ I.e. one plugin name per line, prefixed by "- " as the first two characters of each line.
20
+
21
+ For each listed plugin name, Ditz looks for a file named
22
+ "lib/ditz/plugin/<name>.rb" within Ruby's default search path. Assuming Ditz is
23
+ installed in a standard manner, you should have available to you the following
24
+ shipped plugins:
25
+
26
+ 1. git
27
+ 2. git-sync
28
+ 3. icalendar
29
+ 4. issue-claiming
30
+ 5. issue-labeling
31
+ 6. issue-timetracker
32
+ 7. mercurial
33
+ 8. sha-names
34
+
35
+ git
36
+ ---
37
+
38
+ This plugin allows issues to be associated with git commits and git
39
+ branches. Git commits can be easily tagged with a ditz issue with the 'ditz
40
+ commit' command, and both 'ditz show' and the ditz HTML output will then
41
+ contain a list of associated commits for each issue.
42
+
43
+ Issues can also be assigned a single git feature branch. In this case, all
44
+ commits on that branch will listed as commits for that issue. This
45
+ particular feature is fairly rudimentary, however---it assumes the reference
46
+ point is the 'master' branch, and once the feature branch is merged back
47
+ into master, the list of commits disappears.
48
+
49
+ Two configuration variables are added, which, when specified, are used to
50
+ construct HTML links for the git commit id and branch names in the generated
51
+ HTML output.
52
+
53
+ Commands added:
54
+ ditz set-branch: set the git branch of an issue
55
+ ditz commit: run git-commit, and insert the issue id into the commit
56
+ message.
57
+
58
+ Usage:
59
+ 1. add a line "- git" to the .ditz-plugins file in the project root
60
+ 2. run ditz reconfigure, and enter the URL prefixes, if any, from
61
+ which to create commit and branch links.
62
+ 3. use 'ditz commit' with abandon.
63
+
64
+ git-sync
65
+ --------
66
+
67
+ This plugin is useful for when you want synchronized, non-distributed issue
68
+ coordination with other developers, and you're using git. It allows you to
69
+ synchronize issue updates with other developers by using the 'ditz sync'
70
+ command, which does all the git work of sending and receiving issue change
71
+ for you. However, you have to set things up in a very specific way for this
72
+ to work:
73
+
74
+ 1. Your ditz state must be on a separate branch. I recommend calling it
75
+ 'bugs'. Create this branch, do a ditz init, and push it to the remote
76
+ repo. (This means you won't be able to mingle issue change and code
77
+ change in the same commits. If you care.)
78
+ 2. Make a checkout of the bugs branch in a separate directory, but NOT in
79
+ your code checkout. If you're developing in a directory called "project",
80
+ I recommend making a ../project-bugs/ directory, cloning the repo there
81
+ as well, and keeping that directory checked out to the 'bugs' branch.
82
+ (There are various complicated things you can do to make that directory
83
+ share git objects with your code directory, but I wouldn't bother unless
84
+ you really care about disk space. Just make it an independent clone.)
85
+ 3. Set that directory as your issue-dir in your .ditz-config file in your
86
+ code checkout directory. (This file should be in .gitignore, btw.)
87
+ 4. Run 'ditz reconfigure' and fill in the local branch name, remote
88
+ branch name, and remote repo for the issue tracking branch.
89
+
90
+ Once that's set up, 'ditz sync' will change to the bugs checkout dir, bundle
91
+ up any changes you've made to issue status, push them to the remote repo,
92
+ and pull any new changes in too. All ditz commands will read from your bugs
93
+ directory, so you should be able to use ditz without caring about where
94
+ things are anymore.
95
+
96
+ This complicated setup is necessary to avoid accidentally mingling code
97
+ change and issue change. With this setup, issue change is synchronized,
98
+ but how you synchronize code is still up to you.
99
+
100
+ Usage:
101
+ 0. read all the above text very carefully
102
+ 1. add a line "- git-sync" to the .ditz-plugins file in the project
103
+ root
104
+ 2. run 'ditz reconfigure' and answer its questions
105
+ 3. run 'ditz sync' with abandon
106
+
107
+ icalendar
108
+ ---------
109
+
110
+ This plugin adds ability to export full todo list in iCalendar (RFC 2445) format.
111
+ It is useful for integration with different pim software like KOrganizer.
112
+
113
+ Issues are converted to VTODO entries with completion status set to 50 if
114
+ its state is :in_progress, 100 if it's closed and 0 otherwise.
115
+ Progress for release is 100 if it's released otherwise it's 99 * closed/all
116
+ issues. So maximum for active release is 99 and it's not shown as done until
117
+ released.
118
+
119
+ Commands added:
120
+ ditz todo-ics: generate full todo list in iCalendar format
121
+
122
+ Usage:
123
+ 1. add a line "- icalendar" to the .ditz-plugins file in the project root
124
+
125
+ issue-claiming
126
+ --------------
127
+
128
+ This plugin allows people to claim issues. This is useful for avoiding
129
+ duplication of work---you can check to see if someone's claimed an
130
+ issue before starting to work on it, and you can let people know what
131
+ you're working on.
132
+
133
+ Commands added:
134
+ ditz claim: claim an issue for yourself or a dev specified in project.yaml
135
+ ditz unclaim: unclaim a claimed issue
136
+ ditz mine: show all issues claimed by you
137
+ ditz claimed: show all claimed issues, by developer
138
+ ditz unclaimed: show all unclaimed issues
139
+
140
+ Usage:
141
+ 1. add a line "- issue-claiming" to the .ditz-plugins file in the project
142
+ root
143
+ 2. (optional:) add a 'devs' key to project.yaml, e.g:
144
+ devs:
145
+ :roy: Roy Baty <roy@marsproject.com>
146
+ :pris: Pris Stratton <pris@marsproject.com>
147
+
148
+ issue-labeling
149
+ --------------
150
+
151
+ This plugin allows label issues. This can replace the issue component
152
+ and/or issue types (bug,feature,task), by providing a more flexible
153
+ to organize your issues.
154
+
155
+ Commands added:
156
+ ditz new_label [label]: create a new label for the project
157
+ ditz label <issue> <labels>: label an issue with some labels
158
+ ditz unlabel <issue> [labels]: remove some label(s) of an issue
159
+ ditz labeled <labels> [release]: show all issues with these labels
160
+
161
+ Usage:
162
+ 1. add a line "- issue-labeling" to the .ditz-plugins file in the project
163
+ root
164
+ 2. use the above commands to abandon
165
+
166
+ issue-timetracker
167
+ -----------------
168
+
169
+ module Ditz
170
+
171
+ mercurial
172
+ ---------
173
+
174
+ require 'time'
175
+
176
+ sha-names
177
+ ---------
178
+
179
+ This world's-smallest-ditz-plugin uses the initial 5 characters of
180
+ the SHA id instead of an identifier like "ditz-999". Installing
181
+ this plugin will cause all references of the form 'ditz-123' and
182
+ 'engine-57' to change to '1a2bc', 'f33d0' and similarly memorable
183
+ IDs. If you are comfortable working with them (your clients may
184
+ not be...) these make all issue IDs unique across the project, so
185
+ long as you do not get a collision between two 5-hex-char IDs.
186
+
187
+ Without this plugin, the standard ID for an issue will be of the
188
+ form 'design-123'. Whilst this is easier to remember, it is also
189
+ liable to change - for example, if two ditz trees are merged
190
+ together, or if an issue is re-assigned from one component to
191
+ another. This plugin provides a canonical, immutable ID from the
192
+ time of issue creation.
193
+
194
+ Usage:
195
+ 1. add a line "- sha-names" to the .ditz-plugins file in the
196
+ project root
197
+
data/README.txt ADDED
@@ -0,0 +1,146 @@
1
+ == ditz
2
+
3
+ by William Morgan <wmorgan-ditz at the masanjin dot nets>
4
+
5
+ http://ditz.rubyforge.org
6
+
7
+ == DESCRIPTION
8
+
9
+ Ditz is a simple, light-weight distributed issue tracker designed to work with
10
+ distributed version control systems like git, darcs, Mercurial, and Bazaar. It
11
+ can also be used with centralized systems like SVN.
12
+
13
+ Ditz maintains an issue database directory on disk, with files written in a
14
+ line-based and human-editable format. This directory can be kept under version
15
+ control, alongside project code.
16
+
17
+ Ditz provides a simple, console-based interface for creating and updating the
18
+ issue database files, and some basic static HTML generation capabilities for
19
+ producing world-readable status pages (for a demo, see the ditz ditz page).
20
+
21
+ Ditz includes a robust plugin system for adding commands, model fields, and
22
+ modifying output. See PLUGINS.txt for documentation on the pre-shipped plugins.
23
+
24
+ Ditz currently offers no central public method of bug submission.
25
+
26
+ == USING DITZ
27
+
28
+ There are several different ways to use Ditz:
29
+
30
+ 1. Treat issue change the same as code change: include it as part of commits,
31
+ and merge it with changes from other developers, resolving conflicts in the
32
+ usual manner.
33
+ 2. Keep the issue database in the repository but in a separate branch. Issue
34
+ changes can be managed by your VCS, but is not tied directly to code
35
+ commits.
36
+ 3. Keep the issue database separate and not under VCS at all.
37
+
38
+ All of these options are supported; the choice of which to use depends on your
39
+ workflow.
40
+
41
+ Option #1 is probably most appropriate for the unsynchronized, distributed
42
+ development, since it allows individual developers to modify issue state with a
43
+ minimum of hassle. Option #2 is most suitable for synchronized development, as
44
+ issue state change can be transmitted independently of code change (see also
45
+ the git-sync plugin) and can act as a sychronization mechanism. Option #3 is
46
+ only useful with some other distribution mechanism, like a central web
47
+ interface.
48
+
49
+ == COMMANDLINE SYNOPSIS
50
+
51
+ # set up project. creates the bugs.yaml file.
52
+ 1. ditz init
53
+ 2. ditz add-release
54
+
55
+ # add an issue
56
+ 3. ditz add
57
+
58
+ # where am i?
59
+ 4. ditz status
60
+ 5. ditz todo (or simply "ditz")
61
+
62
+ # do work
63
+ 6. write code
64
+ 7. ditz close <issue-id>
65
+ 8. commit
66
+ 9. goto 3
67
+
68
+ # finished!
69
+ 10. ditz release <release-name>
70
+
71
+ == THE DITZ DATA MODEL
72
+
73
+ By default, Ditz includes the bare minimum set of features necessary for
74
+ open-source development. Features like time spent, priority, assignment of
75
+ tasks to developers, due dates, etc. are purposely relegated to the plugin
76
+ system.
77
+
78
+ A Ditz project consists of issues, releases and components.
79
+
80
+ Issues:
81
+ Issues are the fundamental currency of issue tracking. A Ditz issue is either
82
+ a feature or a bug, but this distinction currently doesn't affect anything
83
+ other than how they're displayed.
84
+
85
+ Each issue belongs to exactly one component, and is part of zero or one
86
+ releases.
87
+
88
+ Each issues has an exportable id, in the form of 40 random hex characters.
89
+ This id is "guaranteed" to be unique across all possible issues and
90
+ developers, present and future. Issue ids are typically not exposed to the
91
+ user.
92
+
93
+ Issues also have a non-global, non-exportable name, which is short and
94
+ human-readable. All Ditz commands use issue names in addition to issue ids.
95
+ Issue names (but not issue ids) may change in certain circumstances, e.g.
96
+ after a "ditz drop" command.
97
+
98
+ Issue names can be specified in comments, titles and descriptions, and Ditz
99
+ will automatically rewrite them as necessary when they change.
100
+
101
+ Components:
102
+ There is always one "general" component, named after the project itself. In
103
+ the simplest case, this is the only component, and the user is never bothered
104
+ with the question of which component to assign an issue to.
105
+
106
+ Components simply provide a way of organizing issues, and have no real
107
+ functionality. Issues names are derived from the component they're assigned
108
+ to.
109
+
110
+ Releases:
111
+ A release is the primary grouping mechanism for issues. Status commands like
112
+ "ditz status" and "ditz todo" always group issues by release. When a release
113
+ is 100% complete, it can be marked as released, and its issues will cease
114
+ appearing in Ditz status and todo messages.
115
+
116
+ == LEARNING MORE
117
+
118
+ * ditz help
119
+ * find $DITZ_INSTALL_DIR -type f | xargs cat
120
+
121
+ == REQUIREMENTS
122
+
123
+ * trollop >= 1.8.2, if running via RubyGems.
124
+
125
+ == INSTALLATION
126
+
127
+ Download tarballs from http://rubyforge.org/projects/ditz/, or command your
128
+ computer to "gem install ditz".
129
+
130
+ == LICENSE
131
+
132
+ Copyright (c) 2008 William Morgan.
133
+
134
+ This program is free software: you can redistribute it and/or modify
135
+ it under the terms of the GNU General Public License as published by
136
+ the Free Software Foundation, either version 3 of the License, or
137
+ (at your option) any later version.
138
+
139
+ Additionally, this program may be linked to, distributed with, used with,
140
+ and/or loaded with the Ruby "Trollop" library.
141
+
142
+ This program is distributed in the hope that it will be useful,
143
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
144
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
145
+ GNU General Public License for more details.
146
+
data/Rakefile ADDED
@@ -0,0 +1,66 @@
1
+ require 'rubygems'
2
+ require 'hoe'
3
+
4
+ $:.unshift "lib"
5
+ require 'ditz'
6
+
7
+ class Hoe
8
+ def extra_dev_deps; @extra_dev_deps.reject { |x| x[0] == "hoe" } end
9
+ end
10
+
11
+ Hoe.new('ditz', Ditz::VERSION) do |p|
12
+ p.rubyforge_name = 'ditz'
13
+ p.author = "William Morgan"
14
+ p.summary = "A simple issue tracker designed to integrate well with distributed version control systems like git and darcs. State is saved to a YAML file kept under version control, allowing issues to be closed/added/modified as part of a commit."
15
+
16
+ p.description = p.paragraphs_of('README.txt', 4..11).join("\n\n").gsub(/== SYNOPSIS/, "Synopsis:")
17
+ p.url = "http://ditz.rubyforge.org"
18
+ p.changes = p.paragraphs_of('Changelog', 0..0).join("\n\n")
19
+ p.email = "wmorgan-ditz@masanjin.net"
20
+ p.extra_deps = [['trollop', '>= 1.9'], ['yaml_waml', '>= 0.3']]
21
+ end
22
+
23
+ WWW_FILES = FileList["www/*"] + %w(README.txt PLUGINS.txt)
24
+
25
+ task :upload_webpage => WWW_FILES do |t|
26
+ sh "rsync -essh -cavz #{t.prerequisites * ' '} wmorgan@rubyforge.org:/var/www/gforge-projects/ditz/"
27
+ end
28
+
29
+ task :upload_report do |t|
30
+ sh "ruby -Ilib bin/ditz html ditz"
31
+ sh "rsync -essh -cavz ditz wmorgan@rubyforge.org:/var/www/gforge-projects/ditz/"
32
+ end
33
+
34
+ task :plugins do |t|
35
+ sh "ruby -w ./make-plugins.txt.rb > PLUGINS.txt"
36
+ end
37
+
38
+ task :really_check_manifest do |t|
39
+ f1 = Tempfile.new "manifest"; f1.close
40
+ f2 = Tempfile.new "manifest"; f2.close
41
+ sh "git ls-files | egrep -v \"^bugs/\" | sort > #{f1.path}"
42
+ sh "sort Manifest.txt > #{f2.path}"
43
+
44
+ f3 = Tempfile.new "manifest"; f3.close
45
+ sh "diff -u #{f1.path} #{f2.path} > #{f3.path}; /bin/true"
46
+
47
+ left, right = [], []
48
+ IO.foreach(f3.path) do |l|
49
+ case l
50
+ when /^\-\-\-/
51
+ when /^\+\+\+/
52
+ when /^\-(.*)\n$/; left << $1
53
+ when /^\+(.*)\n$/; right << $2
54
+ end
55
+ end
56
+
57
+ puts
58
+ puts "Tracked by git but not in Manifest.txt:"
59
+ puts left.empty? ? " <nothing>" : left.map { |l| " " + l }
60
+
61
+ puts
62
+ puts "In Manifest.txt, but not tracked by git:"
63
+ puts right.empty? ? " <nothing>" : right.map { |l| " " + l }
64
+ end
65
+
66
+ # vim: syntax=ruby
data/ReleaseNotes ADDED
@@ -0,0 +1,56 @@
1
+ 0.5
2
+ ---
3
+
4
+ Two new plugins: git-sync, for synchronized git usage, and issue-claiming,
5
+ which allows you to claim issues for yourself. See PLUGINS.txt for details.
6
+
7
+ 0.4
8
+ ---
9
+ - Command-line completion scripts are now included for bash and zsh. To
10
+ activate, source the relevant file in $GEMDIR/ditz-0.4/contrib/completion/.
11
+
12
+ - Hooks can now be set on a per-project basis. Make a .ditz/hooks directory in
13
+ your project root and place them there. These will be loaded after any
14
+ hooks in ~/.ditz/hooks, so they can override or simply supplement.
15
+
16
+ - The plugin system is done. There's currently one plugin, for git integration.
17
+ To enable it, add the line "- git" in a .ditz-plugins file in your project
18
+ root. The git plugin currently has the following features:
19
+
20
+ - Issues can have a git branch assigned to them with "ditz set-branch".
21
+ - Git commit messages can have a Ditz-issue: header auto-filled if you
22
+ commit with "ditz commit <issue>" (i.e. instead of git commit).
23
+ - In both HTML and screen output, commits from the assigned branch, and
24
+ commits with the corresponding Ditz-issue: header in the log message,
25
+ will be listed for each issue.
26
+
27
+ Note that the plugin system is independent of the hook system. In order
28
+ to auto-add ditz files to the git index upon modification, you must set
29
+ up hooks. Example hooks for git are at:
30
+ http://hackety.org/2008/06/26/gitHooksForDitz.html
31
+
32
+ Also note that as soon as a feature branch is merged back into master, ditz
33
+ loses the ability to distinguish its commits. So the Ditz-issue: approach
34
+ is probably better if you want a long-term record.
35
+
36
+ 0.3
37
+ ---
38
+ Ditz now works from project subdirectories, and you can have a .ditz-config in
39
+ the project root for project-specific configuration. (This is not merged with
40
+ the global config, so this file overrides everything in ~/.ditz-config.)
41
+
42
+ You can specify an :issue_dir key in this file, which can be a relative path to
43
+ the directory containing project.yaml. So if you want to rename that directory,
44
+ or keep it somewhere else, now you can.
45
+
46
+ There's also a new hook system for plugging in your own code. Run ditz -l to
47
+ see a list of available hooks.
48
+
49
+ 0.2
50
+ ---
51
+
52
+ In ditz 0.2, we store issues per file. This avoids many unnecessary conflicts
53
+ that occur in the single-file case.
54
+
55
+ To upgrade your bugs.yaml to a bugs/ directory, you must run
56
+ ditz-convert-from-monolith.