Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

move version out of deadlock_retry (was getting double require warnings) #11

merged 1 commit into from Feb 9, 2012


None yet
2 participants

kbrock commented Feb 9, 2012

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,

mperham added a commit that referenced this pull request Feb 9, 2012

Merge pull request #11 from kbrock/version_file
move version out of deadlock_retry (was getting double require warnings)

@mperham mperham merged commit 2cf2530 into mperham:master Feb 9, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment