Merge remote-tracking branch 'origin/staging' into staging

This commit is contained in:
benmcmahon100
2015-08-04 00:53:34 +01:00
6 changed files with 40 additions and 35 deletions

View File

@ -7,9 +7,6 @@
Welcome to Free Code Camp's open source codebase!
=======================
#Note
We're currently very close to moving from Express to Loopback. As such, please keep in mind that the instructions here for setting up and running the project do not directly translate to the staging branch. Additionally, the file structure is quite a bit different. As always, the staging branch is the appropriate place to branch off of to fix/add something!
Free Code Camp is an open-source community of busy people who learn to code, then build projects for nonprofits.
Our campers (students) start by working through our free, self-paced, browser-based curriculum. Next, they build several practice projects. Finally, we pair two campers together with a stakeholder from a nonprofit organization, and help them build the solution the nonprofit has requested.
@ -20,7 +17,14 @@ Our campers (students) start by working through our free, self-paced, browser-ba
This code is running live at [FreeCodeCamp.com](http://www.FreeCodeCamp.com). We also have [Gitter](https://gitter.im/FreeCodeCamp/FreeCodeCamp), a [blog](http://blog.freecodecamp.com), and even a [Twitch.tv channel](http://twitch.tv/freecodecamp).
[Join our community](http://www.freecodecamp.com/signin)!
[Join our community here](http://www.freecodecamp.com/signin).
*Note: We're currently very close to moving from Express to Loopback. As such, please keep in mind that the instructions here for setting up and running the project do not directly translate to the staging branch. Additionally, the file structure is quite a bit different. As always, the staging branch is the appropriate place to branch off of to fix/add something.*
Wiki
------------
We would love your help expanding our [wiki](https://github.com/freecodecamp/freecodecamp/wiki) with more information about learning to code and getting a coding job.
Contributing
------------

View File

@ -104,7 +104,8 @@
"weeks": "12",
"cities": [
"provo",
"salt-lake-city"
"salt-lake-city",
"dallas"
]
}, {
"name": "Epicodus",

View File

@ -277,9 +277,9 @@
],
"tests": [
"assert.deepEqual(friendly(['2015-07-01', '2015-07-04']), ['July 1st','4th'], 'ending month should be omitted since it is already mentioned');",
"assert.deepEqual(friendly(['2015-12-01', '2016-02-03']), ['December 1st','February 3rd'], 'one month apart can be inferred it is the next year');",
"assert.deepEqual(friendly(['2015-12-01', '2016-02-03']), ['December 1st','February 3rd'], 'two months apart can be inferred if it is the next year');",
"assert.deepEqual(friendly(['2015-12-01', '2017-02-03']), ['December 1st, 2015','February 3rd, 2017']);",
"assert.deepEqual(friendly(['2016-03-01', '2016-05-05']), ['March 1st','May 5th, 2016']);",
"assert.deepEqual(friendly(['2016-03-01', '2016-05-05']), ['March 1st','May 5th'], 'one month apart can be inferred it is the same year');",
"assert.deepEqual(friendly(['2017-01-01', '2017-01-01']), ['January 1st, 2017'], 'since we do not duplicate only return once');",
"assert.deepEqual(friendly(['2022-09-05', '2023-09-04']), ['September 5th, 2022','September 4th, 2023']);"
],

View File

@ -797,8 +797,8 @@
"Delete the \".red-text\", \"p\", and \".smaller-image\" CSS declarations from your <code>style</code> element so that the only declarations left in your <code>style</code> element are \"h2\" and \"thick-green-border\". Then Delete the <code>p</code> element that contains a dead link. Then remove the \"red-text\" class from your <code>h2</code> element and replace it with the \"text-primary\" Bootstrap class. Finally, remove the \"smaller-image\" class from your first <code>img</code> element and replace it with the <code>img-responsive</code> class."
],
"tests": [
"assert(!$('h2').hasClass('red-text'), 'You h2 element should no longer have the class \"red-text\".')",
"assert($('h2').hasClass('text-primary'), 'You h2 element should now have the class \"text-primary\".')",
"assert(!$('h2').hasClass('red-text'), 'Your h2 element should no longer have the class \"red-text\".')",
"assert($('h2').hasClass('text-primary'), 'Your h2 element should now have the class \"text-primary\".')",
"assert(!$('p').css('font-family').match(/monospace/i), 'Your paragraph elements should no longer use the font \"Monospace\".')",
"assert(!$('img').hasClass('smaller-image'), 'Remove the \"smaller-image\" class from your top image.')",
"assert($('.img-responsive').length > 1, 'Add the \"img-responsive\" class to your top image.')"

View File

@ -372,7 +372,7 @@ module.exports = function(app) {
function completedZiplineOrBasejump(req, res, next) {
var completedWith = req.body.challengeInfo.completedWith || false;
var completedWith = req.body.challengeInfo.completedWith || '';
var completedDate = Math.round(+new Date());
var challengeId = req.body.challengeInfo.challengeId;
var solutionLink = req.body.challengeInfo.publicURL;
@ -423,17 +423,17 @@ module.exports = function(app) {
pairedWith: pairedWith
};
})
.doOnNext(function(dats) {
.doOnNext(function({ user, pairedWith }) {
updateUserProgress(
dats.user,
user,
challengeId,
dats.pairedWith ?
assign({ completedWith: dats.pairedWith.id }, challengeData) :
pairedWith ?
assign({ completedWith: pairedWith.id }, challengeData) :
challengeData
);
})
.flatMap(function(dats) {
return Rx.Observable.from([dats.user, dats.pairedWith]);
.flatMap(function({ user, pairedWith }) {
return Rx.Observable.from([user, pairedWith]);
})
// save users
.flatMap(function(user) {

View File

@ -261,31 +261,31 @@ block content
.panel-heading.text-center Manage your account here:
.panel-body
if (!user.google || !user.facebook || !user.linkedin || !user.twitter)
if (!user.google)
if (!user.github)
.col-xs-12
a.btn.btn-lg.btn-block.btn-google-plus.btn-link-social(href='/auth/google')
i.fa.fa-google-plus
| Link Google with my account
if (!user.facebook)
.col-xs-12
a.btn.btn-lg.btn-block.btn-facebook.btn-link-social(href='/auth/facebook')
i.fa.fa-facebook
| Link Facebook with my account
//if (!user.github)
// .col-xs-12
// a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/auth/github')
// i.fa.fa-github
// | Link GitHub with my account
if (!user.linkedin)
.col-xs-12
a.btn.btn-lg.btn-block.btn-linkedin.btn-link-social(href='/auth/linkedin')
i.fa.fa-linkedin
| Link LinkedIn with my account
a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/auth/github')
i.fa.fa-github
| Link GitHub with my account
if (!user.twitter)
.col-xs-12
a.btn.btn-lg.btn-block.btn-twitter.btn-link-social(href='/auth/twitter')
i.fa.fa-twitter
| Link Twitter with my account
if (!user.google)
.col-xs-12
a.btn.btn-lg.btn-block.btn-google-plus.btn-link-social.disabled(href='#')
i.fa.fa-google-plus
| Link Google with my account
if (!user.facebook)
.col-xs-12
a.btn.btn-lg.btn-block.btn-facebook.btn-link-social.disabled(href='#')
i.fa.fa-facebook
| Link Facebook with my account
if (!user.linkedin)
.col-xs-12
a.btn.btn-lg.btn-block.btn-linkedin.btn-link-social.disabled(href='#')
i.fa.fa-linkedin
| Link LinkedIn with my account
.col-xs-12
a.btn.btn-lg.btn-block.btn-warning.btn-link-social(href='/logout')
span.ion-android-exit