We recently started using Rools and it's great to see some activity
since the project was taken over. One thing we picked up on though is
that the basics seem to work fine, but the 'extend' functionality
seems to be broken in 0.1.5 and 0.1.6. The basic examples in the Rdoc
docs don't work either, so I had a look at the unit tests and it
doesn't look like there are any specific tests for 'extend'. Have you
guys done any work around this feature of late?
Cheers,
Pierre
Hi Pierre,
maybe you could make Pat's life easier by providing a a few testcases
for the extend functionality and attach them to a bug report or a
feature request (http://rubyforge.org/tracker/?group_id=1166)
Best regards,
--
John Mettraux -///- http://jmettraux.openwfe.org
Cheers,
Pierre
I have not used extend. So this is news to me.
I am in the process of adding RSpec for Rools since 1.0 just came out.
Adding test cases and specifications has been my highest priority.
I would love to get some examples that failed though :)
Thanks again.
Pat.
I may have duplicated the problem.
Here is a temporary fix in rule_set.rb:209:
def with(name, prio=0, &b)
name.to_s.downcase!
(@dependencies[@extend_rule_name] ||= []) << Rule.new(self,
name, prio, b)
end
Please let me know.
I am still working on more test cases in that area.
Thanks again.
Pat.
That's the fix I applied to the code to get round the problem as
well. I logged a more detailed bug on rubyforge as John suggested
with a simple test case.
Cheers,
Pierre
I believe that the bug has been fixed in svn based on an adapted
version of your testcase.
When you assert an integer, the parameter should be: Fixnum and the
variable should be fixnum.
You cannot modify that variable but you can use a global to do
something similar.
Look at the test case I created: extend_test.rb
Feel free to open another bug report but I think that dependencies
work now.
V/R,
Pat.
Cheers,
Pierre