mperham/deadlock_retry — pull request #11 by kbrock (2012-02-09 02:25:13+00:00)
Title: move version out of deadlock_retry (was getting double require warnings)

the gemfile has:
require "lib/deadlock_retry"

bundler essentially has:
require "deadlock_retry"

So the file was being included twice for me and causing warnings:

.bundle/ruby/1.8/bundler/gems/deadlock_retry-d09e498d44d5/lib/deadlock_retry.rb:5: warning: already initialized constant VERSION
.bundle/ruby/1.8/bundler/gems/deadlock_retry-d09e498d44d5/lib/deadlock_retry.rb:22: warning: already initialized constant DEADLOCK_ERROR_MESSAGES
.bundle/ruby/1.8/bundler/gems/deadlock_retry-d09e498d44d5/lib/deadlock_retry.rb:25: warning: already initialized constant MAXIMUM_RETRIES_ON_DEADLOCK
.bundle/ruby/1.8/bundler/gems/deadlock_retry-d09e498d44d5/lib/deadlock_retry.rb:52: warning: already initialized constant WAIT_TIMES

I did 2 things to correct:

1. I moved the version into it's own file (which is typical of the gems created via bundler)
2. I added the lib directory to the path in the gemfile, so the require was typical.

Either of these would have probably fixed the warnings.
But I followed bundler's new gem default format as a template.

If you have another path you would like me to take, please let me know and I'll resubmit.

Thanks for the plugin,
Keenan