diff --git a/hue.gemspec b/hue.gemspec index 2a8f920..56b5116 100644 --- a/hue.gemspec +++ b/hue.gemspec @@ -22,7 +22,6 @@ Gem::Specification.new do |spec| spec.add_dependency 'thor' spec.add_dependency 'json' spec.add_dependency 'log_switch', '0.4.0' - spec.add_dependency 'curb' spec.add_development_dependency 'minitest', '~> 5.0' spec.add_development_dependency 'webmock' end diff --git a/lib/hue/client.rb b/lib/hue/client.rb index 17dc893..32c72f0 100644 --- a/lib/hue/client.rb +++ b/lib/hue/client.rb @@ -1,7 +1,6 @@ require 'net/http' require 'json' require 'resolv' -require 'curb' module Hue class Client @@ -145,12 +144,10 @@ def discovery_mdns(bs) end def discovery_meethue(bs) - easy = Curl::Easy.new - easy.follow_location = true - easy.max_redirects = 10 - easy.url = 'https://discovery.meethue.com/' - easy.perform - JSON(easy.body).each do |hash| + uri = URI('https://discovery.meethue.com/') + response = Net::HTTP.get(uri) + + JSON(response).each do |hash| bs << Bridge.new(self, hash) end end