-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can bunny-mock be allowed to work with Bunny 1.7.x (and Ruby 1.9.3) #17
Comments
I think supporting Bunny 2.0 is a priority - but if you have a PR that allows support for older versions that doesn't tread on 2.0 support I would love to review it! |
I am trying to get this change ready for a PR but I want to run your tests before submitting to make sure nothing has broken. Unfortunately I'm not terribly advanced when it comes to Rails so I'm having trouble getting the specs to run at all (let alone to test my change). Can you please provide me some guidance on what I should need to do to run the bunny-mock tests? |
Sure! All you have to do is run the command Let me know if you have any other questions - I should probably add all this information to a contributing file evenutally |
I've tried running the specs via rake, both explicitly and just using
|
Hmmm....seems to me like trouble with JRuby and Bunny see: ruby-amqp/bunny#363 |
Well, that is really unfortunate. I am stuck with JRuby and Bunny for the time being. I did verify that I could make things work by going back to Bunny 1.7.0 rather than allowing 1.7.1 to be used. But that may not be much help for my situation. Just out of curiosity, is there a reasonable way to add a run-time dependency to a gemspec that says "Use (version = 1.7.0) OR (version >= 2.0)" that would exclude version 1.7.1 and later 1.7.x releases? |
Maybe doing some fancy gemspec magic like in the gemspec for onelogin/ruby-saml is the solution? |
Thanks for the tip: I've used the same approach to set a dependency on bunny version 1.7.0 when running on the JRuby platform, and a dependency on 1.7 or later when not running on the JRuby platform. I will submit a pull request for this change in the not-too-distant future (my workplace's policy dictates that work done on company time can't be contributed back to open source projects without prior approval, so I just need to wait for that approval). |
I'm trying to use bunny-mock to test some code that is stuck on Ruby 1.9.3 and Bunny 1.7.0 for a variety of reasons. Unfortunately for me, the current gemspec for bunny-mock specifies a minimum bunny version of 2.0 as well as Ruby language version 2.0.
Given that Bunny 2.0 is API compatible with Bunny 1.7 (see this link), it seemed reasonable that bunny-mock would work just fine with Bunny 1.7, unless of course bunny-mock makes use of Ruby 2.x-specific code.
I decided to try this out on a local clone of bunny-mock and so far (with a limited number of tests written) it has been working with no code changes. I've only had to change dependency versions in
Gemfile
and inbunny-mock.gemspec
. My tests are far from thorough though.Is there any interest in adding Bunny 1.7 support to the official releases of bunny-mock? If so I could try to do more thorough testing and issue a pull request. Or is retroactively adding support for really old versions not something that anyone else might need?
The text was updated successfully, but these errors were encountered: