splunk / splunk-sdk-ruby

Splunk Software Development Kit for Ruby
http://dev.splunk.com
Apache License 2.0
36 stars 21 forks source link

Fix context.rb to avoid URI#hostname for Ruby 1.9.2 #29

Closed ghost closed 11 years ago

ghost commented 11 years ago

Hi,

Ruby 1.9.2 doesn't support URI#hostname (http://ruby-doc.org/stdlib-1.9.2/libdoc/uri/rdoc/URI/Generic.html). This fix allows us to avoid URI#hostname if it's not defined and to use URI#host instead.

Alternatively, it's good idea to remove 1.9.2 support from README.md? :)

Regards, makisyu

madhadron commented 11 years ago

Good catch, thanks. I'm going to switch it to merge into develop instead for now for the sake of our internal workflow.

ghost commented 11 years ago

Thank you!