From 4477b65b92f21528b78b04464447a391c20c1d10 Mon Sep 17 00:00:00 2001 From: Kyle Bolton Date: Thu, 24 Jul 2014 13:12:17 -0400 Subject: [PATCH] Handle nike url change that's not in the gem The Nike gem PR https://github.com/skryl/nike/pull/4 has not been merged yet so we need to deal with v1 of the Nike+ API is no longer accepting requests over HTTP ourselves. Using HTTPS instead restores functionality. --- app.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app.rb b/app.rb index 3632444..bf8365d 100644 --- a/app.rb +++ b/app.rb @@ -6,6 +6,11 @@ require 'nike' require 'geoutm' +# Nike gem PR https://github.com/skryl/nike/pull/4 has not been merged yet +# so we need to deal with v1 of the Nike+ API is no longer accepting +# requests over HTTP ourselves. Using HTTPS instead restores functionality. +Nike::Client.send(:base_uri, 'https://secure-nikeplus.nike.com/plus') + APP_DOMAIN = ENV['APP_DOMAIN'] || 'http://localhost:9292' APP_SECRET = ENV['APP_SECRET'] || 'nikeplus-to-runkeeper' RUNKEEPER_CLIENT_ID = ENV['RUNKEEPER_CLIENT_ID']