lanej / zendesk2

Zendesk API V2 client using Cistern
http://lanej.io/zendesk2/
MIT License
25 stars 28 forks source link

corrected URI reference so it uses the standard lib #27

Closed jasonwbarnett closed 10 years ago

jasonwbarnett commented 10 years ago

First off, thanks for writing this rubygem, it's the best one out there in my opinion... The others just simply suck, but that's partially due to the enormous size of Zendesk's API.

Some context:

2.1.1 :001 > require 'zendesk2'
 => true
2.1.1 :002 > client = Zendesk2::Client.new
NameError: uninitialized constant Zendesk2::Client::Real::URI
    from /Users/jbarnett/.rvm/gems/ruby-2.1.1/gems/zendesk2-0.5.3/lib/zendesk2/client.rb:159:in `initialize'
    from /Users/jbarnett/.rvm/gems/ruby-2.1.1/gems/cistern-0.9.1/lib/cistern/service.rb:181:in `new'
    from /Users/jbarnett/.rvm/gems/ruby-2.1.1/gems/cistern-0.9.1/lib/cistern/service.rb:181:in `new'
    from (irb):2
    from /Users/jbarnett/.rvm/rubies/ruby-2.1.1/bin/irb:11:in `<main>'

I fixed this issue with these code changes.

lanej commented 10 years ago

if you could move the require 'uri' to https://github.com/lanej/zendesk2/blob/master/lib/zendesk2.rb#L10 with the other stdlib requires that would be grand.

jasonwbarnett commented 10 years ago

done.