Starting new thread, Suggestions for translating 4 lines from ruote-amqp 0.9 to ruote-amqp 2.0

1 view
Skip to first unread message

Charles.Magid

unread,
Sep 23, 2009, 12:26:02 PM9/23/09
to ruote
Good Day,

I need help translating 4 lines from ruote-amqp 0.9 to ruote-amqp
2.0. My goal is to get a working amqp listener example working today,
please.

See lines below:

./lib/spec/ruote_helpers.rb:24:# return if
@terminated_processes.include?( fei.wfid )

./spec/spec_helper.rb:58: @terminated_processes << fe.fei.wfid

./spec/listener_spec.rb:49: wi = OpenWFE::InFlowWorkItem.from_h
( OpenWFE::Json.decode( @msg ) )

./spec/listener_spec.rb:52: MQ.queue( wi.attributes
['reply_queue'] ).publish( OpenWFE::Json.encode( wi.to_h ) )

Getting a working amqp listener example working today is needed. Help
would be appreciated. I have forked asm ruote-amqp repo as
requested. I posted back, the non working code, that I have so far
into:

git clone git://github.com/ChasManRors/ruote-amqp.git

Regards,

Charles

John Mettraux

unread,
Sep 23, 2009, 7:38:13 PM9/23/09
to openwfe...@googlegroups.com

Hello Charles,

as said, I've already started the work on moving those specs to ruote 2.0

http://github.com/jmettraux/ruote-amqp/


Best regards,

--
John Mettraux - http://jmettraux.wordpress.com

Charles.Magid

unread,
Sep 23, 2009, 11:38:48 PM9/23/09
to ruote
OK, How do I set up the path correctly?

I first inserted a lot of unshifts and thought that could not be the
way then I tried to extract the test run from the rake spec I got from
rake -T and add directories as I ran into unstatisfied requirements.

Example:

ruby -I"spec:lib:../ruote2.0/lib:/usr/lib/ruby/gems/1.8/gems/
json-1.1.9/lib:/usr/lib/ruby/gems/1.8/gems/rufus-dollar-1.0.2/lib:/usr/
lib/ruby/gems/1.8/gems/rufus-mnemo-1.1.0/lib:/usr/lib/ruby/gems/1.8/
gems/rufus-lru-1.0.2/lib" "/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/
bin/spec" "spec/participant_spec.rb" "spec/ruote_amqp_spec.rb" "spec/
listener_spec.rb"

Regards,

Charles

On Sep 23, 7:38 pm, John Mettraux <jmettr...@openwfe.org> wrote:

John Mettraux

unread,
Sep 24, 2009, 12:05:46 AM9/24/09
to openwfe...@googlegroups.com
On Thu, Sep 24, 2009 at 12:38 PM, Charles.Magid <cmm...@gmail.com> wrote:
>
> OK,  How do I set up the path correctly?
>
> I first inserted a lot of unshifts and thought that could not be the
> way then I tried to extract the test run from the rake spec I got from
> rake -T and add directories as I ran into unstatisfied requirements.
>
> Example:
>
> ruby -I"spec:lib:../ruote2.0/lib:/usr/lib/ruby/gems/1.8/gems/
> json-1.1.9/lib:/usr/lib/ruby/gems/1.8/gems/rufus-dollar-1.0.2/lib:/usr/
> lib/ruby/gems/1.8/gems/rufus-mnemo-1.1.0/lib:/usr/lib/ruby/gems/1.8/
> gems/rufus-lru-1.0.2/lib"  "/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/
> bin/spec" "spec/participant_spec.rb" "spec/ruote_amqp_spec.rb" "spec/
> listener_spec.rb"

Hello,

the rufus-* gems are usually available via rubygems (and they seem to
be placed in your rubygems dir).

Adding

require 'rubygems'

at the top of the spec/spec_helper.rb should take care of everything
gems for you.

Charles.Magid

unread,
Sep 24, 2009, 7:52:33 AM9/24/09
to ruote
Hi.

Thanks and I was surprised that it was not being required already re:

(U)nless ENV['NO_RUBYGEMS'] was set, and I don't know why it would be,
rubygems was already being required.

Now when I rake spec tests just hang.

$ rake spec
(in /home/charles/workspace/ruote-amqp.jmettraux.new)
** Add 'VERSION = "x.y.z"' to your code,
add a version to your hoe spec,
or fix your Manifest.txt
/usr/lib/ruby/gems/1.8/gems/ruote-2.0.0/lib/ruote/exp/fe_set.rb:147:
warning: already initialized constant PREFIX_REGEX

Regards,

Charles


On Sep 24, 12:05 am, John Mettraux <jmettr...@openwfe.org> wrote:

Kenneth Kalmer

unread,
Sep 24, 2009, 9:38:17 AM9/24/09
to openwfe...@googlegroups.com
[truncated]

Hi everyone

I'm busy bringing my repo up to date with everyone's work and making sure we have a working branch of ruote-amqp that works with ruote 2.0

Thanks for all the work everyone has done so far, I'll send out pull requests and announce here when I'm done.

Sorry for coming late to the party on this one.

Best

--
Kenneth Kalmer
kenneth...@gmail.com
http://opensourcery.co.za
@kennethkalmer

John Mettraux

unread,
Sep 24, 2009, 10:06:00 AM9/24/09
to openwfe...@googlegroups.com, Kenneth Kalmer
On Thu, Sep 24, 2009 at 8:52 PM, Charles.Magid <cmm...@gmail.com> wrote:
>
> Thanks and I was surprised that it was not being required already re:
>
> (U)nless ENV['NO_RUBYGEMS'] was set, and I don't know why it would be,
> rubygems was already being required.

Hello Charles,

Since you were passing him the rspec path, it didn't experience a
LoadError when requiring "spec" and thus the 'require "rubygems"' was
not triggered.


> Now when I rake spec tests just hang.
>
> $ rake spec
> (in /home/charles/workspace/ruote-amqp.jmettraux.new)
> ** Add 'VERSION = "x.y.z"' to your code,
>   add a version to your hoe spec,
>   or fix your Manifest.txt

Kenneth, do you have a fix for that ? It seems to be hoe related. Do I
have to add a VERSION somewhere to ruote 2.0, what is the way to let
hoe know about it ?


> /usr/lib/ruby/gems/1.8/gems/ruote-2.0.0/lib/ruote/exp/fe_set.rb:147:
> warning: already initialized constant PREFIX_REGEX

This warning can be ignored.

Charles.Magid

unread,
Sep 24, 2009, 10:33:27 AM9/24/09
to ruote
>
>
> On Sep 24, 10:06 am, John Mettraux <jmettr...@openwfe.org> wrote:
> > On Thu, Sep 24, 2009 at 8:52 PM, Charles.Magid <cmma...@gmail.com> wrote:
> >
> >
> > Hello Charles,
> >
> > Since you were passing him the rspec path, it didn't experience a
> > LoadError when requiring "spec" and thus the 'require "rubygems"' was
> > not triggered.
> >
> > > Now when I rake spec tests just hang.

I believe the operative word here is (hangs) not the version warning.

> >
> > > $ rake spec
> > > (in /home/charles/workspace/ruote-amqp.jmettraux.new)
> > > ** Add 'VERSION = "x.y.z"' to your code,
> > > add a version to your hoe spec,
> > > or fix your Manifest.txt
> >
> > Kenneth, do you have a fix for that ? It seems to be hoe related. Do I
> > have to add a VERSION somewhere to ruote 2.0, what is the way to let
> > hoe know about it ?
> >
> > > /usr/lib/ruby/gems/1.8/gems/ruote-2.0.0/lib/ruote/exp/fe_set.rb:147:
> > > warning: already initialized constant PREFIX_REGEX
> >
> > This warning can be ignored.

Great, I will continue to do so

> >
> > Best regards,
> >
> > --
> > John Mettraux - http://jmettraux.wordpress.com

Regards,

Charles

Charles.Magid

unread,
Sep 24, 2009, 10:35:09 AM9/24/09
to ruote
Great.

On Sep 24, 9:38 am, Kenneth Kalmer <kenneth.kal...@gmail.com> wrote:
> [truncated]
>
> Hi everyone
>
> I'm busy bringing my repo up to date with everyone's work and making sure we
> have a working branch of ruote-amqp that works with ruote 2.0
>
> Thanks for all the work everyone has done so far, I'll send out pull
> requests and announce here when I'm done.
>
> Sorry for coming late to the party on this one.
>
> Best
>
> --
> Kenneth Kalmer
> kenneth.kal...@gmail.comhttp://opensourcery.co.za
> @kennethkalmer

Kenneth Kalmer

unread,
Sep 24, 2009, 5:15:34 PM9/24/09
to openwfe...@googlegroups.com
On Thu, Sep 24, 2009 at 3:38 PM, Kenneth Kalmer <kenneth...@gmail.com> wrote:
[truncated]

Hi everyone

I'm busy bringing my repo up to date with everyone's work and making sure we have a working branch of ruote-amqp that works with ruote 2.0

Thanks for all the work everyone has done so far, I'll send out pull requests and announce here when I'm done.

Really, thanks a lot for all the work everyone did on all the parts to get the gem working on ruote 2.0 !

I've taken work from Jason's fork, John's fork and Charles' fork and worked them into a new ruote2.0 branch [1]. To run the specs you'll need to use my version of the amqp gem (more details in the readme) or the tests will 'hang'. For normal operation the amqp (or tmm1-amqp) gems will work.

For the forkers, like I said in my pull requests, every single commit I cherry picked got altered, so there will most definitely be conflicts to resolve.

Looking forward to your feedback, and thanks again for all the contributions.

Best

[1] - http://github.com/kennethkalmer/ruote-amqp/tree/ruote2.0

John Mettraux

unread,
Sep 24, 2009, 7:51:14 PM9/24/09
to openwfe...@googlegroups.com
On Fri, Sep 25, 2009 at 6:15 AM, Kenneth Kalmer
<kenneth...@gmail.com> wrote:
>
>
> On Thu, Sep 24, 2009 at 3:38 PM, Kenneth Kalmer <kenneth...@gmail.com>
> wrote:
>>
>> [truncated]
>>
>> Hi everyone
>>
>> I'm busy bringing my repo up to date with everyone's work and making sure
>> we have a working branch of ruote-amqp that works with ruote 2.0
>>
>> Thanks for all the work everyone has done so far, I'll send out pull
>> requests and announce here when I'm done.
>
> Really, thanks a lot for all the work everyone did on all the parts to get
> the gem working on ruote 2.0 !
>
> I've taken work from Jason's fork, John's fork and Charles' fork and worked
> them into a new ruote2.0 branch [1]. To run the specs you'll need to use my
> version of the amqp gem (more details in the readme) or the tests will
> 'hang'. For normal operation the amqp (or tmm1-amqp) gems will work.
>
> For the forkers, like I said in my pull requests, every single commit I
> cherry picked got altered, so there will most definitely be conflicts to
> resolve.

Hello Kenneth,

OK, I just nuked my ruote-amqp repository. I will work with a fresh
fork from now on.

Many thanks !

Reply all
Reply to author
Forward
0 new messages