Skip to content

Commit

Permalink
switch to new (still active) discovery URL
Browse files Browse the repository at this point in the history
  • Loading branch information
AggroBoy committed May 31, 2020
1 parent ca498c0 commit c2d9180
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/hue/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def bridges
easy = Curl::Easy.new
easy.follow_location = true
easy.max_redirects = 10
easy.url = 'https://www.meethue.com/api/nupnp'
easy.url = 'https://discovery.meethue.com/'
easy.perform
JSON(easy.body).each do |hash|
bs << Bridge.new(self, hash)
Expand Down
2 changes: 1 addition & 1 deletion test/hue/client_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class ClientTest < Minitest::Test
def before_setup
super

stub_request(:get, "https://www.meethue.com/api/nupnp").
stub_request(:get, "https://discovery.meethue.com/").
to_return(:body => '[{"id":"ffa57b3b257200065704","internalipaddress":"192.168.0.1"},{"id":"63c2fc01391276a319f9","internalipaddress":"192.168.0.2"}]')

stub_request(:get, %r{http://192.168.0.1/api/*}).to_return(:body => '[{"success":true}]')
Expand Down
2 changes: 1 addition & 1 deletion test/hue/light_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class LightTest < Minitest::Test
def before_setup
super

stub_request(:get, "https://www.meethue.com/api/nupnp").
stub_request(:get, "https://discovery.meethue.com/").
to_return(:body => '[{"internalipaddress":"localhost"}]')

stub_request(:get, %r{http://localhost/api/*}).to_return(:body => '[{"success":true}]')
Expand Down

0 comments on commit c2d9180

Please sign in to comment.