Browse Source

Merge pull request #101 from gmetais/develop

v1.7.6
Gaël Métais 10 years ago
parent
commit
f07bc615b0

+ 3 - 2
lib/server/controllers/apiController.js

@@ -6,6 +6,7 @@ var ScreenshotHandler   = require('../../screenshotHandler');
 var RunsQueue           = require('../datastores/runsQueue');
 var RunsQueue           = require('../datastores/runsQueue');
 var RunsDatastore       = require('../datastores/runsDatastore');
 var RunsDatastore       = require('../datastores/runsDatastore');
 var ResultsDatastore    = require('../datastores/resultsDatastore');
 var ResultsDatastore    = require('../datastores/resultsDatastore');
+var serverSettings      = require('../../../server_config/settings.json');
 
 
 
 
 var ApiController = function(app) {
 var ApiController = function(app) {
@@ -52,7 +53,6 @@ var ApiController = function(app) {
         debug('Adding test %s to the queue', run.runId);
         debug('Adding test %s to the queue', run.runId);
         var queuePromise = queue.push(run.runId);
         var queuePromise = queue.push(run.runId);
 
 
-
         // Save the run to the datastore
         // Save the run to the datastore
         runsDatastore.add(run, queuePromise.startingPosition);
         runsDatastore.add(run, queuePromise.startingPosition);
 
 
@@ -76,7 +76,8 @@ var ApiController = function(app) {
                 waitForSelector: run.params.waitForSelector,
                 waitForSelector: run.params.waitForSelector,
                 cookie: run.params.cookie,
                 cookie: run.params.cookie,
                 authUser: run.params.authUser,
                 authUser: run.params.authUser,
-                authPass: run.params.authPass
+                authPass: run.params.authPass,
+                phantomasEngine: serverSettings.phantomasEngine
             };
             };
 
 
             return ylt(run.params.url, runOptions);
             return ylt(run.params.url, runOptions);

+ 1 - 1
lib/tools/phantomas/phantomasWrapper.js

@@ -17,10 +17,10 @@ var PhantomasWrapper = function() {
         var deferred = Q.defer();
         var deferred = Q.defer();
         var task = data.params;
         var task = data.params;
 
 
-
         var options = {
         var options = {
             
             
             // Cusomizable options
             // Cusomizable options
+            'engine': task.options.phantomasEngine || 'webkit',
             'timeout': task.options.timeout || 45,
             'timeout': task.options.timeout || 45,
             'js-deep-analysis': task.options.jsDeepAnalysis || false,
             'js-deep-analysis': task.options.jsDeepAnalysis || false,
             'user-agent': (task.options.device === 'desktop') ? 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36' : null,
             'user-agent': (task.options.device === 'desktop') ? 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36' : null,

+ 11 - 11
package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "yellowlabtools",
   "name": "yellowlabtools",
-  "version": "1.7.5",
+  "version": "1.7.6",
   "description": "Online tool to audit a webpage for performance and front-end quality issues",
   "description": "Online tool to audit a webpage for performance and front-end quality issues",
   "license": "GPL-2.0",
   "license": "GPL-2.0",
   "author": {
   "author": {
@@ -19,7 +19,7 @@
   "dependencies": {
   "dependencies": {
     "angular": "1.4.4",
     "angular": "1.4.4",
     "angular-animate": "1.4.4",
     "angular-animate": "1.4.4",
-    "angular-chart.js": "0.7.3",
+    "angular-chart.js": "0.7.6",
     "angular-local-storage": "0.2.2",
     "angular-local-storage": "0.2.2",
     "angular-resource": "1.4.4",
     "angular-resource": "1.4.4",
     "angular-route": "1.4.4",
     "angular-route": "1.4.4",
@@ -27,7 +27,7 @@
     "async": "1.4.2",
     "async": "1.4.2",
     "body-parser": "1.13.3",
     "body-parser": "1.13.3",
     "chart.js": "1.0.2",
     "chart.js": "1.0.2",
-    "clean-css": "3.3.9",
+    "clean-css": "3.4.1",
     "compression": "1.5.2",
     "compression": "1.5.2",
     "cors": "2.7.1",
     "cors": "2.7.1",
     "debug": "2.2.0",
     "debug": "2.2.0",
@@ -36,12 +36,12 @@
     "imagemin-jpegoptim": "4.0.0",
     "imagemin-jpegoptim": "4.0.0",
     "lwip": "0.0.7",
     "lwip": "0.0.7",
     "meow": "3.3.0",
     "meow": "3.3.0",
-    "minimize": "1.6.0",
+    "minimize": "1.7.0",
     "phantomas": "1.11.0",
     "phantomas": "1.11.0",
     "ps-node": "0.0.4",
     "ps-node": "0.0.4",
     "q": "1.4.1",
     "q": "1.4.1",
-    "request": "2.60.0",
-    "rimraf": "2.4.2",
+    "request": "2.61.0",
+    "rimraf": "2.4.3",
     "temporary": "0.0.8",
     "temporary": "0.0.8",
     "uglify-js": "2.4.24"
     "uglify-js": "2.4.24"
   },
   },
@@ -51,24 +51,24 @@
     "grunt-blanket": "~0.0.8",
     "grunt-blanket": "~0.0.8",
     "grunt-contrib-clean": "~0.6.0",
     "grunt-contrib-clean": "~0.6.0",
     "grunt-contrib-concat": "~0.5.1",
     "grunt-contrib-concat": "~0.5.1",
-    "grunt-contrib-copy": "~0.8.0",
+    "grunt-contrib-copy": "~0.8.1",
     "grunt-contrib-cssmin": "~0.13.0",
     "grunt-contrib-cssmin": "~0.13.0",
     "grunt-contrib-htmlmin": "~0.4.0",
     "grunt-contrib-htmlmin": "~0.4.0",
     "grunt-contrib-jshint": "~0.11.2",
     "grunt-contrib-jshint": "~0.11.2",
     "grunt-contrib-less": "~1.0.1",
     "grunt-contrib-less": "~1.0.1",
-    "grunt-contrib-uglify": "~0.9.1",
+    "grunt-contrib-uglify": "~0.9.2",
     "grunt-env": "~0.4.4",
     "grunt-env": "~0.4.4",
     "grunt-express": "~1.4.1",
     "grunt-express": "~1.4.1",
     "grunt-filerev": "~2.3.1",
     "grunt-filerev": "~2.3.1",
     "grunt-inline-angular-templates": "~0.1.5",
     "grunt-inline-angular-templates": "~0.1.5",
     "grunt-line-remover": "~0.0.2",
     "grunt-line-remover": "~0.0.2",
     "grunt-mocha-test": "~0.12.7",
     "grunt-mocha-test": "~0.12.7",
-    "grunt-replace": "~0.9.3",
-    "grunt-usemin": "~3.0.0",
+    "grunt-replace": "~0.10.2",
+    "grunt-usemin": "~3.1.1",
     "grunt-webfont": "~0.5.4",
     "grunt-webfont": "~0.5.4",
     "matchdep": "~0.3.0",
     "matchdep": "~0.3.0",
     "mocha": "~2.2.5",
     "mocha": "~2.2.5",
-    "sinon": "~1.15.4",
+    "sinon": "~1.16.1",
     "sinon-chai": "~2.8.0"
     "sinon-chai": "~2.8.0"
   },
   },
   "scripts": {
   "scripts": {

+ 1 - 0
server_config/settings-prod.json

@@ -1,5 +1,6 @@
 {
 {
     "serverPort": 80,
     "serverPort": 80,
+    "phantomasEngine": "webkit",
     "googleAnalyticsId": "",
     "googleAnalyticsId": "",
 
 
     "authorizedKeys": {
     "authorizedKeys": {

+ 1 - 0
server_config/settings.json

@@ -1,5 +1,6 @@
 {
 {
     "serverPort": 8383,
     "serverPort": 8383,
+    "phantomasEngine": "webkit",
     "googleAnalyticsId": "",
     "googleAnalyticsId": "",
 
 
     "authorizedKeys": {
     "authorizedKeys": {

+ 1 - 0
test/fixtures/settings.json

@@ -1,5 +1,6 @@
 {
 {
     "serverPort": "8387",
     "serverPort": "8387",
+    "phantomasEngine": "webkit",
     "googleAnalyticsId": "",
     "googleAnalyticsId": "",
     
     
     "authorizedKeys": {
     "authorizedKeys": {