From alexander at bumpern.de Wed Dec 2 08:28:18 2009 From: alexander at bumpern.de (Alexander Neumann) Date: Wed, 2 Dec 2009 14:28:18 +0100 Subject: [ditz-talk] [PATCH] ruby1.9 fix: SHA1 -> Digest::SHA1 Message-ID: <20091202132816.GA14612@hoffentlich.net> Hi, Here is another small fix for ruby1.9 Cheers, - Alex --- lib/ditz/model-objects.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/ditz/model-objects.rb b/lib/ditz/model-objects.rb index 7b3298d..65e1bda 100644 --- a/lib/ditz/model-objects.rb +++ b/lib/ditz/model-objects.rb @@ -215,7 +215,7 @@ class Issue < ModelObject ## make a unique id def make_id config, project - SHA1.hexdigest [Time.now, rand, creation_time, reporter, title, desc].join("\n") + Digest::SHA1.hexdigest [Time.now, rand, creation_time, reporter, title, desc].join("\n") end def sort_order; [STATUS_SORT_ORDER[status], creation_time] end -- 1.6.3.3 From alexander at bumpern.de Wed Dec 2 08:22:03 2009 From: alexander at bumpern.de (Alexander Neumann) Date: Wed, 2 Dec 2009 14:22:03 +0100 Subject: [ditz-talk] [PATCH] small fixes for ruby1.9 Message-ID: <20091202132203.GA13426@hoffentlich.net> Hi, I made some small (but rather ugly) modifications to make ditz work with ruby1.9, you can also pull this patch from my repository at git://github.com/fd0/ditz.git, from the branch 'ruby1.9'. Cheers, - Alex [Please CC me, as I'm not subscribed to the mailing list] --- lib/ditz.rb | 2 +- lib/ditz/model.rb | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ditz.rb b/lib/ditz.rb index 5a5b88a..49e9a5a 100644 --- a/lib/ditz.rb +++ b/lib/ditz.rb @@ -68,7 +68,7 @@ end # Call run_pager from any opperator needing pagination. # Yoinked from http://nex-3.com/posts/73-git-style-automatic-paging-in-ruby#comments def run_pager config - return if PLATFORM =~ /win32/ + return if RUBY_PLATFORM =~ /win32/ return unless STDOUT.tty? return if config.paginate == 'never' diff --git a/lib/ditz/model.rb b/lib/ditz/model.rb index 763f75c..1d272ed 100644 --- a/lib/ditz/model.rb +++ b/lib/ditz/model.rb @@ -1,5 +1,5 @@ require 'yaml' -require 'sha1' +require 'digest/sha1' require "ditz/lowline"; include Lowline require "ditz/util" @@ -248,8 +248,8 @@ class ModelObject @fields.each do |name, field_opts| val = if opts[:with] && opts[:with][name] opts[:with][name] - elsif(found, v = generate_field_value(o, field_opts, generator_args, :interactive => true)) && found - v + elsif(ret = generate_field_value(o, field_opts, generator_args, :interactive => true)) && ret.shift + ret.shift else q = field_opts[:prompt] || name.to_s.capitalize if field_opts[:multiline] @@ -278,8 +278,8 @@ class ModelObject @fields.each do |fname, fopts| val = if(x = vals[fname] || vals[fname.to_s]) x - elsif(found, x = generate_field_value(o, fopts, generator_args, :interactive => false)) && found - x + elsif(ret = generate_field_value(o, fopts, generator_args, :interactive => false)) && ret.shift + ret.shift elsif !fopts[:nil_ok] raise ModelError, "missing required field #{fname.inspect} on #{self.name} object (got #{vals.keys.inspect})" end -- 1.6.3.3 From gamberi.piccante+ditz at gmail.com Fri Dec 4 05:14:11 2009 From: gamberi.piccante+ditz at gmail.com (Alex) Date: Fri, 4 Dec 2009 21:14:11 +1100 Subject: [ditz-talk] ditz html error Message-ID: <20091204101411.GU14299@cyber.com.au> Hi folks, I'm running ditz 0.5, installed on a gentoo server via the gem installer, with ruby v1.8.7. Ditz has worked perfectly in the past, but now when I run `ditz html` I get this error: /usr/lib/ruby/gems/1.8/gems/ditz-0.5/lib/html.rb:48:in `link_to': no link for nil (ArgumentError) from (erb):14:in `render_template' from (erb):3:in `each' from (erb):3:in `render_template' from /usr/lib/ruby/gems/1.8/gems/ditz-0.5/lib/html.rb:23:in `render_template' from /usr/lib/ruby/gems/1.8/gems/ditz-0.5/lib/html.rb:25:in `render' from (erb):20:in `render_template' from /usr/lib/ruby/gems/1.8/gems/ditz-0.5/lib/html.rb:23:in `render_template' from /usr/lib/ruby/gems/1.8/gems/ditz-0.5/lib/views.rb:111:in `render_all' from /usr/lib/ruby/gems/1.8/gems/ditz-0.5/lib/views.rb:110:in `open' from /usr/lib/ruby/gems/1.8/gems/ditz-0.5/lib/views.rb:110:in `render_all' from /usr/lib/ruby/gems/1.8/gems/ditz-0.5/lib/views.rb:107:in `each' from /usr/lib/ruby/gems/1.8/gems/ditz-0.5/lib/views.rb:107:in `render_all' from /usr/lib/ruby/gems/1.8/gems/ditz-0.5/lib/operator.rb:503:in `html' from /usr/lib/ruby/gems/1.8/gems/ditz-0.5/lib/operator.rb:118:in `send' from /usr/lib/ruby/gems/1.8/gems/ditz-0.5/lib/operator.rb:118:in `do' from /usr/lib/ruby/gems/1.8/gems/ditz-0.5/bin/ditz:139 from /usr/bin/ditz:19:in `load' from /usr/bin/ditz:19 Other ditz commands still function correctly, but `ditz html` no longer works. Any assistance is much appreciated. Kind regards, Alex From wmorgan-ditz at masanjin.net Fri Dec 4 13:51:41 2009 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Fri, 04 Dec 2009 10:51:41 -0800 Subject: [ditz-talk] ditz html error In-Reply-To: <20091204101411.GU14299@cyber.com.au> References: <20091204101411.GU14299@cyber.com.au> Message-ID: <1259952594-sup-137@masanjin.net> Reformatted excerpts from Alex's message of 2009-12-04: > /usr/lib/ruby/gems/1.8/gems/ditz-0.5/lib/html.rb:48:in `link_to': no link for > nil (ArgumentError) The backtrace is not great, but I think this is because you have an issue that references a component which is no longer there. Did you manually delete a component, or anything like that? -- William From ben+ditz at benfinney.id.au Sat Dec 5 17:28:11 2009 From: ben+ditz at benfinney.id.au (Ben Finney) Date: Sun, 06 Dec 2009 09:28:11 +1100 Subject: [ditz-talk] ditz html error References: <20091204101411.GU14299@cyber.com.au> <1259952594-sup-137@masanjin.net> Message-ID: <87pr6thx8k.fsf@benfinney.id.au> William Morgan writes: > Reformatted excerpts from Alex's message of 2009-12-04: > > /usr/lib/ruby/gems/1.8/gems/ditz-0.5/lib/html.rb:48:in `link_to': no link for > > nil (ArgumentError) > > The backtrace is not great, but I think this is because you have an > issue that references a component which is no longer there. Did you > manually delete a component, or anything like that? (I'm working with Alex on the above Ditz repository.) How can we tell whether that is the case? The data storage format is YAML, is there something we can inspect to determine the answer to your question? -- \ ?If sharing a thing in no way diminishes it, it is not rightly | `\ owned if it is not shared.? ?Saint Augustine | _o__) | Ben Finney From wmorgan-ditz at masanjin.net Sat Dec 5 18:36:09 2009 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Sat, 05 Dec 2009 15:36:09 -0800 Subject: [ditz-talk] ditz html error In-Reply-To: <87pr6thx8k.fsf@benfinney.id.au> References: <20091204101411.GU14299@cyber.com.au> <1259952594-sup-137@masanjin.net> <87pr6thx8k.fsf@benfinney.id.au> Message-ID: <1260056100-sup-9793@masanjin.net> Reformatted excerpts from Ben Finney's message of 2009-12-05: > How can we tell whether that is the case? The data storage format is > YAML, is there something we can inspect to determine the answer to > your question? Yes, grep for ^component: in all the issue .yaml files, and see if any of them have a value that doesn't correspond to a component in project.yaml. Let me know if that's not the problem. -- William From ben+ditz at benfinney.id.au Sat Dec 5 21:01:41 2009 From: ben+ditz at benfinney.id.au (Ben Finney) Date: Sun, 06 Dec 2009 13:01:41 +1100 Subject: [ditz-talk] ditz html error References: <20091204101411.GU14299@cyber.com.au> <1259952594-sup-137@masanjin.net> <87pr6thx8k.fsf@benfinney.id.au> <1260056100-sup-9793@masanjin.net> Message-ID: <87aaxwj1x6.fsf@benfinney.id.au> William Morgan writes: > Reformatted excerpts from Ben Finney's message of 2009-12-05: > > How can we tell whether that is the case? The data storage format is > > YAML, is there something we can inspect to determine the answer to > > your question? > > Yes, grep for ^component: in all the issue .yaml files, and see if any > of them have a value that doesn't correspond to a component in > project.yaml. > > Let me know if that's not the problem. All the results show only one component: ===== $ grep -r '^component:' .ditz/ .ditz/issue-53dc34efe59894f3f296b0b394a5e4e9676dc701.yaml:component: elab .ditz/issue-b6dca55aea2f06dad1bb658079c90d7464938519.yaml:component: elab .ditz/issue-b6ec805623da0348121960043e79fa7b2f5d0581.yaml:component: elab [?] .ditz/issue-a9d0c324ed74445f476a4e47e034b27bfefe80a1.yaml:component: elab .ditz/issue-7df529632bf19b9b0f11af3ec7b0e97c5ff92459.yaml:component: elab .ditz/issue-99f9dd0f9acba48583b5871fbe0bb15444308026.yaml:component: elab ===== That component does appear in the project data: ===== $ grep -A2 '^components:' .ditz/project.yaml components: - !ditz.rubyforge.org,2008-03-06/component name: elab ===== -- \ ?When I was little, my grandfather used to make me stand in a | `\ closet for five minutes without moving. He said it was elevator | _o__) practice.? ?Steven Wright | Ben Finney From wmorgan-ditz at masanjin.net Sun Dec 6 06:43:24 2009 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Sun, 06 Dec 2009 03:43:24 -0800 Subject: [ditz-talk] ditz html error In-Reply-To: <87aaxwj1x6.fsf@benfinney.id.au> References: <20091204101411.GU14299@cyber.com.au> <1259952594-sup-137@masanjin.net> <87pr6thx8k.fsf@benfinney.id.au> <1260056100-sup-9793@masanjin.net> <87aaxwj1x6.fsf@benfinney.id.au> Message-ID: <1260099474-sup-4832@masanjin.net> Reformatted excerpts from Ben Finney's message of 2009-12-05: > All the results show only one component: Sorry, I misread the backtrace. I think it's an issue pointing to a missing *release*, not component. Can you perform the same diagnostic with release? (Logic: views.rb:111 is rendering the component template, but within that ("(erb):20") there's a subtemplate rendering of the issue table, and on line 14 of that ("(erb):14") is a call to #link_to, where the first argument is the release object (in this case nil) of a particular release.) Some kind of "ditz check" would be helpful for consistency checking. -- William From shakthimaan at gmail.com Sun Dec 6 08:36:48 2009 From: shakthimaan at gmail.com (Shakthi Kannan) Date: Sun, 6 Dec 2009 19:06:48 +0530 Subject: [ditz-talk] git plugin with ditz Message-ID: Hi, Can someone provide a workflow / tutorial on how they use the git plugin with ditz? Thanks! SK -- Shakthi Kannan http://www.shakthimaan.com From ben+ditz at benfinney.id.au Sun Dec 6 17:35:35 2009 From: ben+ditz at benfinney.id.au (Ben Finney) Date: Mon, 07 Dec 2009 09:35:35 +1100 Subject: [ditz-talk] ditz html error References: <20091204101411.GU14299@cyber.com.au> <1259952594-sup-137@masanjin.net> <87pr6thx8k.fsf@benfinney.id.au> <1260056100-sup-9793@masanjin.net> <87aaxwj1x6.fsf@benfinney.id.au> <1260099474-sup-4832@masanjin.net> Message-ID: <87638jivd4.fsf@benfinney.id.au> William Morgan writes: > Sorry, I misread the backtrace. I think it's an issue pointing to a > missing *release*, not component. Can you perform the same diagnostic > with release? ===== $ grep -rh '^release:' .ditz/ | sort | uniq release: release: "0.1" release: "0.2" $ ditz releases 0.2 (unreleased) 0.1 (released 2009-12-03) ===== -- \ ?Holy astringent plum-like fruit, Batman!? ?Robin | `\ | _o__) | Ben Finney From ben+ditz at benfinney.id.au Sun Dec 6 17:41:34 2009 From: ben+ditz at benfinney.id.au (Ben Finney) Date: Mon, 07 Dec 2009 09:41:34 +1100 Subject: [ditz-talk] ditz html error References: <20091204101411.GU14299@cyber.com.au> <1259952594-sup-137@masanjin.net> <87pr6thx8k.fsf@benfinney.id.au> <1260056100-sup-9793@masanjin.net> <87aaxwj1x6.fsf@benfinney.id.au> <1260099474-sup-4832@masanjin.net> Message-ID: <87y6lfhgip.fsf@benfinney.id.au> William Morgan writes: > Sorry, I misread the backtrace. I think it's an issue pointing to a > missing *release*, not component. Can you perform the same diagnostic > with release? Argh. Yes, it turns out the creation of the referenced release was not committed to our VCS; so it worked fine on the repository where it was created, but not in the central repository. Having synchronised those changes, the generation of HTML files works again now. Thank you! > Some kind of "ditz check" would be helpful for consistency checking. Yes, agreed :-) -- \ ?A hundred times every day I remind myself that [?] I must | `\ exert myself in order to give in the same measure as I have | _o__) received and am still receiving? ?Albert Einstein | Ben Finney From ben+ditz at benfinney.id.au Sun Dec 6 17:49:43 2009 From: ben+ditz at benfinney.id.au (Ben Finney) Date: Mon, 07 Dec 2009 09:49:43 +1100 Subject: [ditz-talk] Hooking all Ditz changes to VCS commits Message-ID: <87tyw3hg54.fsf@benfinney.id.au> Howdy all, I'm using a Ditz plug-in to create hooks for Ditz commands and have them automatically result in commit to the VCS. (I'm using this because the Ditz database is in a separate repository, so the only changes in that repository are Ditz database changes.) However, it seems only some of the actions are hooked this way. The hooks I'm using are ?:after_add?, ?:after_delete?, and ?:after_update?. This has led to the hilarious situation where I added a new release to the Ditz database, but it didn't get committed to the VCS so nobody else had that release. Shouldn't ?:after_add? be triggered when adding a new release? (It evidently wasn't in this case.) What hooks need to be used so that *all* changes to the Ditz database are caught? -- \ ?Special today: no ice cream.? ?mountain inn, Switzerland | `\ | _o__) | Ben Finney From kou at clear-code.com Fri Dec 18 03:33:02 2009 From: kou at clear-code.com (Kouhei Sutou) Date: Fri, 18 Dec 2009 17:33:02 +0900 (JST) Subject: [ditz-talk] [PATCH] don't require .ditz-plugins Message-ID: <20091218.173302.1096473883284803162.kou@clear-code.com> Hi, I noticed that ditz requires .ditz-plugins file. If I don't have .ditz-plugins, I can't run any commands (including 'init' command). % mkdir -p /tmp/sample % cd /tmp/sample % ditz /usr/lib/ruby/1.8/yaml.rb:143:in `initialize': No such file or directory - ./.ditz-plugins (Errno::ENOENT) from /usr/lib/ruby/1.8/yaml.rb:143:in `open' from /usr/lib/ruby/1.8/yaml.rb:143:in `load_file' from /home/kou/work/ruby/ditz/lib/ditz.rb:55:in `load_plugins' from /home/kou/work/ruby/ditz/bin/ditz:92 I'll attach a patch that makes .ditz-plugins file optional. Thanks, -- kou -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-don-t-require-.ditz-plugins.patch Type: text/x-patch Size: 853 bytes Desc: not available URL: