Module: Ditz
- Defined in:
- lib/plugins/git-sync.rb,
lib/ditz.rb,
lib/hook.rb,
lib/html.rb,
lib/view.rb,
lib/model.rb,
lib/views.rb,
lib/operator.rb,
lib/plugins/git.rb,
lib/file-storage.rb,
lib/model-objects.rb,
lib/plugins/issue-claiming.rb
Overview
issue-claiming ditz plugin
This plugin allows people to claim issues. This is useful for avoiding duplication of work---you can check to see if someone's claimed an issue before starting to work on it, and you can let people know what you're working on.
Commands added:
ditz claim: claim an issue for yourself
ditz unclaim: unclaim a claimed issue
ditz mine: show all issues claimed by you
ditz claimed: show all claimed issues, by developer
ditz unclaimed: show all unclaimed issues
Usage:
1. add a line "- issue-claiming" to the .ditz-plugins file in the project
root
2. use the above commands to abandon
Defined Under Namespace
Classes: Component, Config, ErbHtml, FileStorage, HookManager, HtmlView, Issue, ModelObject, Operator, Project, Release, ScreenView, View
Constant Summary collapse
- VERSION =
"0.5"
Class Method Summary collapse
- .debug(s) ⇒ Object
-
.find_dir_containing(target, start = Pathname.new(".")) ⇒ Object
helper for recursive search.
-
.find_ditz_file(fn) ⇒ Object
my brilliant solution to the 'gem datadir' problem.
- .has_readline=(val) ⇒ Object
- .has_readline? ⇒ Boolean
- .home_dir ⇒ Object
- .load_plugins(fn) ⇒ Object
Class Method Details
.debug(s) ⇒ Object
5 6 7 |
# File 'lib/ditz.rb', line 5 def debug s puts "# #{s}" if $verbose end |
.find_dir_containing(target, start = Pathname.new(".")) ⇒ Object
helper for recursive search
35 36 37 38 39 40 |
# File 'lib/ditz.rb', line 35 def find_dir_containing target, start=Pathname.new(".") return start if (start + target).exist? unless start.parent.realpath == start.realpath find_dir_containing target, start.parent end end |
.find_ditz_file(fn) ⇒ Object
my brilliant solution to the 'gem datadir' problem
43 44 45 46 47 |
# File 'lib/ditz.rb', line 43 def find_ditz_file fn dir = $:.find { |p| File.exist? File.(File.join(p, fn)) } raise "can't find #{fn} in any load path" unless dir File. File.join(dir, fn) end |
.has_readline=(val) ⇒ Object
14 15 16 |
# File 'lib/ditz.rb', line 14 def self.has_readline= val @has_readline = val end |
.has_readline? ⇒ Boolean
10 11 12 |
# File 'lib/ditz.rb', line 10 def self.has_readline? @has_readline end |
.home_dir ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/ditz.rb', line 26 def home_dir @home ||= ENV["HOME"] || (ENV["HOMEDRIVE"] && ENV["HOMEPATH"] ? ENV["HOMEDRIVE"] + ENV["HOMEPATH"] : nil) || begin $stderr.puts "warning: can't determine home directory, using '.'" "." end end |
.load_plugins(fn) ⇒ Object
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/ditz.rb', line 49 def load_plugins fn Ditz::debug "loading plugins from #{fn}" plugins = YAML::load_file $opts[:plugins_file] plugins.each do |p| fn = Ditz::find_ditz_file "plugins/#{p}.rb" Ditz::debug "loading plugin #{p.inspect} from #{fn}" require File.(fn) end plugins end |