Skip to content

Commit

Permalink
Using the final url for image compression and fixing bug loading the …
Browse files Browse the repository at this point in the history
…content of the website
  • Loading branch information
molant committed Sep 19, 2013
1 parent c5e819f commit 5414db9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/node_modules/
/.idea/
/lib/cvlists.json
/lib/checks/config.js
cvlists.json
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function analyze(data, content, res) {
auth: data.auth,
content: content.body,
compression: content.compression,
$: cheerio.load(website, { lowerCaseTags: true, lowerCaseAttributeNames: true })
$: cheerio.load(content.body, { lowerCaseTags: true, lowerCaseAttributeNames: true })
};

cssLoader.loadCssFiles(website).then(function (css) {
Expand Down
3 changes: 0 additions & 3 deletions lib/checks/check-ie11tiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,7 @@ function checkConfigFile(website) {
url = website.url.resolve('browserConfig.xml');
}

console.log(url);

request(url, function (error, response, body) {
console.log(error);
if (error) {
deferred.resolve(test);
return;
Expand Down
6 changes: 3 additions & 3 deletions lib/checks/check-image-compression.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ var Deferred = require('promised-io').Deferred,
var check = function (website) {
var deferred = new Deferred();

var url = website.url.host,
var url = website.url.href,
result = {
testName: 'imageCompression',
passed: false

};


request.post(endPoint,
{form: {
key: config.kraken_key,
secret: config.kraken_secret,
url: url}}, function (error, response, body) {
url: url}
}, function (error, response, body) {
if (error) {
deferred.resolve(result);
return;
Expand Down

0 comments on commit 5414db9

Please sign in to comment.