tmarkiewicz/statsmix — pull request #2 by ernesto-jimenez (2012-03-01 22:02:55+00:00)
Title: Fix urlencoding to use URI.encode so that it doesn't break when adding URLs to the meta"

Fix for this:

```
ruby-1.9.2-head :003 > StatsMix.track('ok', 1, {:meta => {:boom=>"/"}})
ArgumentError: invalid value for Integer(): "/"
from ~/.rvm/gems/ruby-1.9.2-head/gems/statsmix-0.2.3/lib/statsmix.rb:419:in `sprintf'
from ~/.rvm/gems/ruby-1.9.2-head/gems/statsmix-0.2.3/lib/statsmix.rb:419:in `block in urlencode'
from ~/.rvm/gems/ruby-1.9.2-head/gems/statsmix-0.2.3/lib/statsmix.rb:418:in `gsub'
from ~/.rvm/gems/ruby-1.9.2-head/gems/statsmix-0.2.3/lib/statsmix.rb:418:in `urlencode'
from ~/.rvm/gems/ruby-1.9.2-head/gems/statsmix-0.2.3/lib/statsmix.rb:411:in `block in set_form_data'
from ~/.rvm/gems/ruby-1.9.2-head/gems/statsmix-0.2.3/lib/statsmix.rb:407:in `each'
from ~/.rvm/gems/ruby-1.9.2-head/gems/statsmix-0.2.3/lib/statsmix.rb:407:in `map'
from ~/.rvm/gems/ruby-1.9.2-head/gems/statsmix-0.2.3/lib/statsmix.rb:407:in `set_form_data'
from ~/.rvm/gems/ruby-1.9.2-head/gems/statsmix-0.2.3/lib/statsmix.rb:390:in `do_request'
from ~/.rvm/gems/ruby-1.9.2-head/gems/statsmix-0.2.3/lib/statsmix.rb:30:in `track'
from ~(irb):3
from ~/.rvm/gems/ruby-1.9.2-head/gems/bundler-1.0.22/lib/bundler/cli.rb:434:in `console'
from ~/.rvm/gems/ruby-1.9.2-head/gems/bundler-1.0.22/lib/bundler/vendor/thor/task.rb:22:in `run'
from ~/.rvm/gems/ruby-1.9.2-head/gems/bundler-1.0.22/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from ~/.rvm/gems/ruby-1.9.2-head/gems/bundler-1.0.22/lib/bundler/vendor/thor.rb:263:in `dispatch'
from ~/.rvm/gems/ruby-1.9.2-head/gems/bundler-1.0.22/lib/bundler/vendor/thor/base.rb:386:in `start'
from ~/.rvm/gems/ruby-1.9.2-head/gems/bundler-1.0.22/bin/bundle:13:in `'
from ~/.rvm/gems/ruby-1.9.2-head/bin/bundle:19:in `load'
from ~/.rvm/gems/ruby-1.9.2-head/bin/bundle:19:in `

'ruby-1.9.2-head :004 > exit
```