From f3f771aea2d25bcfdbbeb7bd58f1adde5e041279 Mon Sep 17 00:00:00 2001 From: Christopher McCulloh <cmcculloh@exacttarget.com> Date: Thu, 22 Sep 2016 17:23:09 -0400 Subject: [PATCH] (GH1870) makes saucelabs key a function to conform with grunt-saucelabs v3.0.0 --- grunt/config/saucelabs-qunit.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/grunt/config/saucelabs-qunit.js b/grunt/config/saucelabs-qunit.js index 2e18c388f..29be06ed6 100644 --- a/grunt/config/saucelabs-qunit.js +++ b/grunt/config/saucelabs-qunit.js @@ -3,11 +3,16 @@ module.exports = function (grunt) { return grunt.file.readJSON('./package.json'); } + // https://github.com/axemclion/grunt-saucelabs/issues/215 + var getSaucekey = function getSaucekey () { + return grunt.file.readYAML('SAUCE_API_KEY.yml').key; + }; + return { defaultBrowsers: { options: { username: '<%= sauceUser %>', - key: '<%= sauceKey %>', + key: getSaucekey, tunnelTimeout: 45, testInterval: 3000, tags: [getPackage().version, '<%= sauceUser %>' + '@' + process.env.TRAVIS_BRANCH || '<%= sauceUser %>@local'], @@ -23,13 +28,12 @@ module.exports = function (grunt) { all: { options: { username: '<%= sauceUser %>', - key: '<%= sauceKey %>', + key: getSaucekey, browsers: grunt.file.readYAML('sauce_browsers.yml'), build: process.env.TRAVIS_BUILD_NUMBER || '<%= pkg.version %>', testname: 'grunt-<%= grunt.template.today("dddd, mmmm dS, yyyy, h:MM:ss TT") %>', urls: '<%= allTestUrls %>' } } - } - -}; \ No newline at end of file + }; +};