Merge branch 'develop' into sabrecat/party-page

This commit is contained in:
Blade Barringer 2015-08-22 21:42:05 -05:00
commit fefcbd1d2f
7 changed files with 16 additions and 19 deletions

View file

@ -35,8 +35,9 @@ module.exports = function(config) {
'website/public/bower_components/js-emoji/emoji.js',
'common/dist/scripts/habitrpg-shared.js',
"website/public/js/env.js",
'test/spec/mocks/**/*.js',
"website/public/js/env.js",
"website/public/js/app.js",
"common/script/public/config.js",
"common/script/public/userServices.js",
@ -47,7 +48,6 @@ module.exports = function(config) {
"website/public/js/directives/**/*.js",
"website/public/js/controllers/**/*.js",
'test/spec/mocks/**/*.js',
'test/spec/specHelper.js',
'test/spec/**/*.js'
],

View file

@ -93,7 +93,7 @@ gulp.task('test:server_side:safe', ['test:prepare:build'], (cb) => {
testBin('mocha test/server_side'),
(err, stdout, stderr) => {
testResults.push({
suite: 'Server Side Specs\t',
suite: 'Server Side Specs',
pass: testCount(stdout, /(\d+) passing/),
fail: testCount(stderr, /(\d+) failing/),
pend: testCount(stdout, /(\d+) pending/)
@ -141,9 +141,9 @@ gulp.task('test:api:watch', [
gulp.watch(['website/src/**', 'test/api/**'], ['test:api:clean']);
});
gulp.task('test:karma:watch', ['test:prepare:build'], (cb) => {
gulp.task('test:karma', ['test:prepare:build'], (cb) => {
let runner = exec(
testBin('karma start'),
testBin('karma start --single-run'),
(err, stdout) => {
cb(err);
}
@ -151,9 +151,9 @@ gulp.task('test:karma:watch', ['test:prepare:build'], (cb) => {
pipe(runner);
});
gulp.task('test:karma', ['test:prepare:build'], (cb) => {
gulp.task('test:karma:watch', ['test:prepare:build'], (cb) => {
let runner = exec(
testBin('karma start --single-run'),
testBin('karma start'),
(err, stdout) => {
cb(err);
}
@ -167,9 +167,9 @@ gulp.task('test:karma:safe', ['test:prepare:build'], (cb) => {
(err, stdout) => {
testResults.push({
suite: 'Karma Specs\t',
pass: testCount(stdout, /(\d+) tests completed/),
fail: testCount(stdout, /(\d+) tests failed/),
pend: testCount(stdout, /(\d+) tests skipped/)
pass: testCount(stdout, /(\d+) tests? completed/),
fail: testCount(stdout, /(\d+) tests? failed/),
pend: testCount(stdout, /(\d+) tests? skipped/)
});
cb();
}

View file

@ -246,10 +246,9 @@ api.resetPassword = function(req, res, next){
from: "Habitica <admin@habitica.com>",
to: email,
subject: "Password Reset for Habitica",
text: "Password for " + user.auth.local.username + " has been reset to " + newPassword + " Important! Both username and password are case-sensitive -- you must enter both exactly as shown here. We recommend copying and pasting both instead of typing them. Log in at https://habitica.com/. After you've logged in, head to https://habitica.com/#/options/settings/settings and change your password.",
html: "Password for <strong>" + user.auth.local.username + "</strong> has been reset to <strong>" + newPassword + "</strong><br /><br />Important! Both username and password are case-sensitive -- you must enter both exactly as shown here. We recommend copying and pasting both instead of typing them.<br /><br />Log in at https://habitica.com/. After you've logged in, head to https://habitica.com/#/options/settings/settings and change your password."
text: "Password for " + user.auth.local.username + " has been reset to " + newPassword + " Important! Both username and password are case-sensitive -- you must enter both exactly as shown here. We recommend copying and pasting both instead of typing them. Log in at " + nconf.get('BASE_URL') + ". After you've logged in, head to " + nconf.get('BASE_URL') + "/#/options/settings/settings and change your password.",
html: "Password for <strong>" + user.auth.local.username + "</strong> has been reset to <strong>" + newPassword + "</strong><br /><br />Important! Both username and password are case-sensitive -- you must enter both exactly as shown here. We recommend copying and pasting both instead of typing them.<br /><br />Log in at " + nconf.get('BASE_URL') + ". After you've logged in, head to " + nconf.get('BASE_URL') + "/#/options/settings/settings and change your password."
});
// TODO: change all four instances of habitica.com above to use BASE_URL when it has been updated. Previous version: https://github.com/HabitRPG/habitrpg/blob/2069936603aca7f8139a6c98e063136248262bdf/website/src/controllers/auth.js#L249
user.save(function(err){
if(err) return next(err);
res.send('New password sent to '+ email);

View file

@ -28,8 +28,6 @@ module.exports.forceSSL = function(req, res, next){
};
// Redirect to habitica for non-api urls
// NOTE: Currently using a static 'habitica.com' string, rather than BASE_URL,
// to make rollback easy. Eventually, BASE_URL should be migrated.
function nonApiUrl(req) {
return req.url.search(/\/api\//) === -1;
@ -37,7 +35,7 @@ function nonApiUrl(req) {
module.exports.forceHabitica = function(req, res, next) {
if (IS_PROD && !ignoreRedirect && !isProxied(req) && nonApiUrl(req)) {
return res.redirect('https://habitica.com' + req.url);
return res.redirect(BASE_URL + req.url);
}
next();
};
};

View file

@ -144,7 +144,7 @@ script(type='text/ng-template', id='partials/options.social.challenges.html')
ng-model='newChallenge.shortName', placeholder=env.t('challengeTag'), required
ng-disabled='insufficientGemsForTavernChallenge()')
|&nbsp;
a.hint.vertical-20(target='_blank', href='http://habitrpg.wikia.com/wiki/Tags',
a.hint.vertical-20(target='_blank', href='http://habitica.wikia.com/wiki/Tags',
popover=env.t('challengeTagPop'), popover-trigger='mouseenter', popover-placement='right')
=env.t('moreInfo')

View file

@ -29,7 +29,7 @@ div(ng-if='::profile.contributor.level || user._id == profile._id')
small
=env.t('contribText')
|&nbsp;
+aLink('http://habitrpg.wikia.com/wiki/Contributing_to_HabitRPG', env.t('readMore'))
+aLink('http://habitica.wikia.com/wiki/Contributing_to_Habitica', env.t('readMore'))
| .
hr