replacing all single quotes with double quotes

Until now it was a big mess with some strings using single quotes and some others double quotes
We were using way more double quotes, so I chose to use them globally
This commit is contained in:
jomo
2014-11-30 00:07:05 +01:00
parent 1a7f456c83
commit 332330f68e
15 changed files with 111 additions and 111 deletions

View File

@@ -1,4 +1,4 @@
var logging = require('./logging');
var logging = require("./logging");
var config = require("./config");
var redis = null;
var fs = require("fs");
@@ -43,7 +43,7 @@ function update_file_date(hash) {
}
});
} else {
logging.error("Tried to update " + path + " date, but it doesn't exist");
logging.error("Tried to update " + path + " date, but it does not exist");
}
});
}

View File

@@ -5,8 +5,8 @@ var config = {
local_cache_time: 3600, // seconds until we will check if the image changed. should be > 60 to prevent mojang 429 response
browser_cache_time: 3600, // seconds until browser will request image again
http_timeout: 1000, // ms until connection to mojang is dropped
faces_dir: 'skins/faces/', // directory where faces are kept. should have trailing '/'
helms_dir: 'skins/helms/', // directory where helms are kept. should have trailing '/'
faces_dir: "skins/faces/", // directory where faces are kept. should have trailing "/"
helms_dir: "skins/helms/", // directory where helms are kept. should have trailing "/"
debug_enabled: false // enables logging.debug
};

View File

@@ -5,8 +5,8 @@ var config = {
local_cache_time: 30, // seconds until we will check if the image changed. should be > 60 to prevent mojang 429 response
browser_cache_time: 30, // seconds until browser will request image again
http_timeout: 3000, // ms until connection to mojang is dropped
faces_dir: 'skins/faces/', // directory where faces are kept. should have trailing '/'
helms_dir: 'skins/helms/', // directory where helms are kept. should have trailing '/'
faces_dir: "skins/faces/", // directory where faces are kept. should have trailing "/"
helms_dir: "skins/helms/", // directory where helms are kept. should have trailing "/"
debug_enabled: true // enables logging.debug
};

View File

@@ -1,9 +1,9 @@
var networking = require('./networking');
var logging = require('./logging');
var config = require('./config');
var cache = require('./cache');
var skins = require('./skins');
var fs = require('fs');
var networking = require("./networking");
var logging = require("./logging");
var config = require("./config");
var cache = require("./cache");
var skins = require("./skins");
var fs = require("fs");
// 0098cb60-fa8e-427c-b299-793cbd302c9a
var valid_uuid = /^([0-9a-f-]{32,36}|[a-zA-Z0-9_]{1,16})$/; // uuid|username
@@ -33,8 +33,8 @@ function store_images(uuid, details, callback) {
} else {
// hash has changed
logging.log(uuid + " new hash: " + hash);
var facepath = __dirname + '/../' + config.faces_dir + hash + ".png";
var helmpath = __dirname + '/../' + config.helms_dir + hash + ".png";
var facepath = __dirname + "/../" + config.faces_dir + hash + ".png";
var helmpath = __dirname + "/../" + config.helms_dir + hash + ".png";
if (fs.existsSync(facepath)) {
logging.log(uuid + " Avatar already exists, not downloading");
@@ -132,8 +132,8 @@ exp.get_avatar = function(uuid, helm, size, callback) {
logging.log("\nrequest: " + uuid);
exp.get_image_hash(uuid, function(err, status, hash) {
if (hash) {
var facepath = __dirname + '/../' + config.faces_dir + hash + ".png";
var helmpath = __dirname + '/../' + config.helms_dir + hash + ".png";
var facepath = __dirname + "/../" + config.faces_dir + hash + ".png";
var helmpath = __dirname + "/../" + config.helms_dir + hash + ".png";
var filepath = facepath;
if (helm && fs.existsSync(helmpath)) {
filepath = helmpath;

View File

@@ -1,7 +1,7 @@
var logging = require('./logging');
var request = require('request');
var config = require('./config');
var skins = require('./skins');
var logging = require("./logging");
var request = require("request");
var config = require("./config");
var skins = require("./skins");
var fs = require("fs");
var session_url = "https://sessionserver.mojang.com/session/minecraft/profile/";
@@ -13,8 +13,8 @@ function extract_skin_url(profile) {
var url = null;
if (profile && profile.properties) {
profile.properties.forEach(function(prop) {
if (prop.name == 'textures') {
var json = Buffer(prop.value, 'base64').toString();
if (prop.name == "textures") {
var json = Buffer(prop.value, "base64").toString();
var props = JSON.parse(json);
url = props && props.textures && props.textures.SKIN && props.textures.SKIN.url || null;
}

View File

@@ -1,6 +1,6 @@
var logging = require('./logging');
var lwip = require('lwip');
var fs = require('fs');
var logging = require("./logging");
var lwip = require("lwip");
var fs = require("fs");
var exp = {};
@@ -77,7 +77,7 @@ exp.resize_img = function(inname, size, callback) {
} else {
image.batch()
.resize(size, size, "nearest-neighbor") // nearest-neighbor doesn't blur
.toBuffer('png', function(err, buffer) {
.toBuffer("png", function(err, buffer) {
callback(null, buffer);
});
}