Open rotev opened 10 years ago
Hi!
As you can probably tell by the commit history, tenacity hasn't been under active development in quite some time, and I'm not actively supporting it. However, I do try to help address bugs that come in.
I tried installing the dependencies with Ruby 2.0.0, and ran into the same rcov problem that you did. I switched to ruby 1.9.3p484, and was able to install all of the dependencies just fine, and run the tests (via bundle exec rake
).
With regards to blank?
, tenacity does currently have a runtime dependency on ActiveSupport, which is where blank?
is defined. So, it is safe to use blank?
in tenacity code.
If you are able to submit a pull request with your changes, a new test for this error case, and all existing tests pass, I would be more than happy to merge it in and cut a new version of gem.
Sorry I can't be or more assistance. I'm simply swamped at the moment.
Hi there,
I'm having difficulties saving an object with a polymorphic association that's empty. This is my code:
But if I add a taggable object to it, it works as expected:
To solve this I used Rails'
blank?
method in several places:lib/tenacity/instance_methods.rb:21
I changedunless associate_id.nil?
tounless associate_id.blank?
lib/tenacity/association.rb:114
I changedreturn nil if clazz.nil?
toreturn nil if clazz.blank?
lib/tenacity/associations/belongs_to.rb:21
I changedclazz._t_find(associate_id)
toclazz._t_find(associate_id) unless clazz.nil?
.Rethinking it, using
blank?
isn't good, because this gem should work without Rails. I also tried to run the tests but I had difficulties installing thercov
gem.