Rools 0.1.6 has been released

0 views
Skip to first unread message

cappelaere

unread,
May 20, 2007, 3:12:48 PM5/20/07
to Rools Users
This adds some new capabilities that may break some old rules...sorry!
We needed to support multiple fact assertions.
Any other feedback is always appreciated.
Pat.

Pierre

unread,
May 21, 2007, 3:59:43 AM5/21/07
to Rools Users
Hi Pat,

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

John Mettraux

unread,
May 21, 2007, 8:06:21 AM5/21/07
to rools...@googlegroups.com
2007/5/21, Pierre <pierre.v...@gmail.com>:

>
> Hi Pat,
>
> 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?

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

Pierre

unread,
May 21, 2007, 11:42:59 AM5/21/07
to Rools Users
That would be the next step - just wanted to check whether this was a
known issue first :-) Some digging in the 0.1.5 code seems to
indicate some errors are related to the adding of the priority field.
I'll post more detail in a bug report when I get a chance to look at
the 0.1.6 source.

Cheers,
Pierre


cappelaere

unread,
May 21, 2007, 12:09:15 PM5/21/07
to Rools Users
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.

cappelaere

unread,
May 21, 2007, 12:44:29 PM5/21/07
to Rools Users
Pierre,

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.

Pierre

unread,
May 21, 2007, 1:55:57 PM5/21/07
to Rools Users
Hi 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

cappelaere

unread,
May 21, 2007, 4:44:18 PM5/21/07
to Rools Users
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.

Pierre

unread,
May 22, 2007, 12:50:09 AM5/22/07
to Rools Users
Wil do, thanks. Good to see such a quick turnaround on this!

Cheers,
Pierre

Reply all
Reply to author
Forward
0 new messages