-
Notifications
You must be signed in to change notification settings - Fork 44
Namespace under GitHub #21
Conversation
To avoid collision with other top level Statsd classes. Also gets the specs passing again and adds a gemfile to make it easier to work on.
When checking 3 explicitly we sometimes get failures because 1.1.to_s is "1.1" instead of "1.10". According to vmg, one or more should be fine and we want more than 2 points of precision, so it is better to change the test than the implementation.
|
This looks good to me. Sorry you had to tackle the tests too! |
.gitignore
Outdated
| #*.swp | ||
|
|
||
| # deps should be good enough in Gemfile and gemspec that this isn't needed | ||
| Gemfile.lock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree.
Pushing Gemfile.lock to git is a better option IMO, because it makes easier to git bisect issues, as you would use the same dependencies at that point in time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally fine with that. I've been avoiding gemfile.lock because for some reason at some point the community did it that way. I'll add it in here.
|
🚢 |
lib/statsd.rb
Outdated
| end | ||
| end | ||
| end | ||
| require "github/statsd" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keeping this file maintains backwards compatibility but makes it harder to load this alongside other gems that use the statsd namespace entry in the Ruby LOAD_PATH for their code.
Keiths-MacBook:Desktop keith$ ls lib/*/*.rb
lib/github/stats.rb lib/others/stats.rb
Keiths-MacBook:Desktop keith$ cat lib/*/*.rb
puts "github stats"
puts "other stats"
Keiths-MacBook:Desktop keith$ ruby -Ilib/github -Ilib/others -e "puts $:; require 'stats'"
/Users/keith/Desktop/lib/github
/Users/keith/Desktop/lib/others
/usr/local/Cellar/rbenv/1.0.0/rbenv.d/exec/gem-rehash
/Library/Ruby/Site/2.0.0
/Library/Ruby/Site/2.0.0/x86_64-darwin15
/Library/Ruby/Site/2.0.0/universal-darwin15
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/x86_64-darwin15
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/universal-darwin15
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/x86_64-darwin15
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin15
github stats
The one you get will depend on the LOAD_PATH ordering, what do you think about removing this file and just having github/statsd?
|
Keeping the file is only to get through atomic deploys. Once we are out and both old and new are pointed at the namespaced file I'll remove the lib/statsd.rb file and merge this. That is what I didn't explain so well I guess when I said temporarily in the commit. |
No longer needed.
Allows people to use this alongside another Statsd class perhaps from another gem.