Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 0 additions & 48 deletions assets/css/2-double-bounce.css

This file was deleted.

91 changes: 42 additions & 49 deletions assets/css/new-challenge.css
Original file line number Diff line number Diff line change
Expand Up @@ -117,63 +117,56 @@ gre7-border.border-box code {
display: inline-block;
}

/* VERIFY
-------------------------------------------------------------------------- */
/* VERIFY
-------------------------------------------------------------------------- */

.verify h3 {
display: inline-block;
padding-right: 12px;
}

#path-required-warning,
#div-selected-dir{
padding: 6px 12px 6px 10px;
vertical-align: middle;
margin-bottom: 0;
font-size: 13px;
font-weight: 400;
text-align: center;
white-space: nowrap;
margin-left: -3px;
color: #8cf;
}
.verify h3 {
display: inline-block;
padding-right: 12px;
}

.verify-fail:before {
content: '✗ ';
}
#path-required-warning,
#div-selected-dir{
padding: 6px 12px 6px 10px;
vertical-align: middle;
margin-bottom: 0;
font-size: 13px;
font-weight: 400;
text-align: center;
white-space: nowrap;
margin-left: -3px;
color: #8cf;
}

.verify-pass:before {
content: '✔︎ ';
}
.verify-fail:before {
content: ' ';
}

#verify-list {
display: none;
list-style: none;
padding-left: 0;
}
.verify-pass:before {
content: '✔︎ ';
}

#challenge-completed {
color: #2BDA9E;
font-size: 24px;
font-family: "NothingYouCouldDo";
}
#verify-list {
display: none;
list-style: none;
padding-left: 0;
}

#challenge-completed h2 {
padding: 0; margin: 0;
}
#challenge-completed {
color: #2BDA9E;
font-size: 24px;
font-family: "NothingYouCouldDo";
}

#verify-spinner.sk-double-bounce {
display: none;
width: 26px;
height: 26px;
position: relative;
margin: 0 auto 0 14px;
vertical-align: middle;
}
#challenge-completed h2 {
padding: 0; margin: 0;
}

#verify-spinner.sk-double-bounce .sk-child {
background-color: #E0E0E0;
}
#verify-spinner.sk-bounce {
display: none;
margin-left: 14px;
vertical-align: middle;
}

/* CODE STYLES
-------------------------------------------------------------------------- */
Expand Down
46 changes: 46 additions & 0 deletions assets/css/sk-bounce.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* This is a part of Spinkit by the awesome Tobias Ahlin!
* http://tobiasahlin.com/spinkit/
*/

/* Bounce Usage
<div class="sk-bounce">
<div class="sk-bounce-dot"></div>
<div class="sk-bounce-dot"></div>
</div>
*/

/* Config */
:root {
--sk-size: 26px;
--sk-color: #E0E0E0;
}

/* Implementation */
.sk-bounce {
width: var(--sk-size);
height: var(--sk-size);
position: relative;
}

.sk-bounce-dot {
width: 100%;
height: 100%;
border-radius: 50%;
background-color: var(--sk-color);
opacity: 0.6;
position: absolute;
top: 0;
left: 0;
animation: sk-bounce 2s infinite cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

.sk-bounce-dot:nth-child(2) { animation-delay: -1.0s; }

@keyframes sk-bounce {
0%, 100% {
transform: scale(0);
} 45%, 55% {
transform: scale(1);
}
}
8 changes: 4 additions & 4 deletions lib/verify/branches_arent_just_for_birds.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const { addToVerifyList, checkChallengeComplete, execGit, getEmptyVerifyResult }
// verify they've pushed
// check the file is in contributors directory

module.exports = function (repopath) {
module.exports = async function (repopath) {
const result = getEmptyVerifyResult()
let username = ''

Expand All @@ -19,15 +19,15 @@ module.exports = function (repopath) {

// Get stored username
try {
username = execGit('config user.username', { cwd: repopath })
username = await execGit('config user.username', { cwd: repopath })
} catch (err) {
addToVerifyList('Error: ' + err.message, false, result.verifyList)
return result
}

let currentBranch = ''
try {
currentBranch = execGit('rev-parse --abbrev-ref HEAD', { cwd: repopath })
currentBranch = await execGit('rev-parse --abbrev-ref HEAD', { cwd: repopath })

const expectedBranch = 'add-' + username
if (currentBranch.match(expectedBranch)) {
Expand Down Expand Up @@ -67,7 +67,7 @@ module.exports = function (repopath) {
// TODO look into this, is using reflog the best way? what about origin?
// sometimes it seems this doesn't work
try {
const log = execGit('reflog show origin/' + currentBranch, { cwd: repopath })
const log = await execGit('reflog show origin/' + currentBranch, { cwd: repopath })

if (log.match('update by push')) {
addToVerifyList('verify~Changes have been pushed!', true, result.verifyList)
Expand Down
4 changes: 2 additions & 2 deletions lib/verify/commit_to_it.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const fs = require('fs')
const { addToVerifyList, checkChallengeComplete, execGit, getEmptyVerifyResult } = require('./verify-helpers')

// check that they've commited changes
module.exports = function (path) {
module.exports = async function (path) {
const result = getEmptyVerifyResult()

// path should be a directory
Expand All @@ -12,7 +12,7 @@ module.exports = function (path) {
}

try {
const show = execGit('status', { cwd: path })
const show = await execGit('status', { cwd: path })

if (show.match('No commits yet')) {
addToVerifyList("verify~Can't find committed changes.", false, result.verifyList)
Expand Down
6 changes: 3 additions & 3 deletions lib/verify/forks_and_clones.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { addToVerifyList, checkChallengeComplete, execGit, getEmptyVerifyResult }
// that they've also then forked and cloned.
// TODO Separate check on fork for nice feedback?!

module.exports = function (path) {
module.exports = async function (path) {
const result = getEmptyVerifyResult()
let username = ''

Expand All @@ -17,15 +17,15 @@ module.exports = function (path) {

// Get stored username
try {
username = execGit('config user.username')
username = await execGit('config user.username')
} catch (err) {
addToVerifyList('Error: ' + err.message, false, result.verifyList)
return result
}

let remotes = []
try {
const out = execGit('remote -v', { cwd: path })
const out = await execGit('remote -v', { cwd: path })
remotes = out.split('\n')

if (remotes.length !== 4) {
Expand Down
8 changes: 4 additions & 4 deletions lib/verify/get_git.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ const { addToVerifyList, checkChallengeComplete, execGit, getEmptyVerifyResult }
// TODO
// Think about how best to show errors to user

module.exports = function () {
module.exports = async function () {
const result = getEmptyVerifyResult()

// Check version, return if no git installed, as further checks are useless.
try {
const gitOutput = execGit('--version')
const gitOutput = await execGit('--version')

if (gitOutput.match('git version')) {
addToVerifyList('verify~Found Git installed!', true, result.verifyList)
Expand All @@ -24,7 +24,7 @@ module.exports = function () {

// Check user.name
try {
const name = execGit('config user.name')
const name = await execGit('config user.name')

if (name !== '') {
addToVerifyList('verify~Name Added!', true, result.verifyList)
Expand All @@ -38,7 +38,7 @@ module.exports = function () {

// Check user.email
try {
const email = execGit('config user.email')
const email = await execGit('config user.email')

if (email !== '') {
addToVerifyList('verify~Email Added!', true, result.verifyList)
Expand Down
2 changes: 1 addition & 1 deletion lib/verify/githubbin.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = async function () {

// Check if username has been set on git-config
try {
username = execGit('config user.username')
username = await execGit('config user.username')

if (username === '') {
addToVerifyList('verify~No username found.', false, result.verifyList)
Expand Down
2 changes: 1 addition & 1 deletion lib/verify/its_a_small_world.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = async function () {

// Get stored username
try {
username = execGit('config user.username')
username = await execGit('config user.username')
} catch (err) {
addToVerifyList('Error: ' + err.message, false, result.verifyList)
return result
Expand Down
8 changes: 4 additions & 4 deletions lib/verify/merge_tada.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { addToVerifyList, checkChallengeComplete, execGit, getEmptyVerifyResult }
// check that they performed a merge
// check there is not username named branch

module.exports = function (path) {
module.exports = async function (path) {
const result = getEmptyVerifyResult()
let username = ''

Expand All @@ -16,15 +16,15 @@ module.exports = function (path) {

// Get stored username
try {
username = execGit('config user.username')
username = await execGit('config user.username')
} catch (err) {
addToVerifyList('Error: ' + err.message, false, result.verifyList)
return result
}

// Search log for merge activity
try {
const ref = execGit('reflog -10', { cwd: path })
const ref = await execGit('reflog -10', { cwd: path })
if (ref.match('merge add-' + username)) {
addToVerifyList('verify~Your branch has been merged!', true, result.verifyList)
} else {
Expand All @@ -36,7 +36,7 @@ module.exports = function (path) {

// Check if branch still exists
try {
const branches = execGit('branch', { cwd: path })
const branches = await execGit('branch', { cwd: path })
if (branches.match('add-' + username)) {
addToVerifyList('verify~Uh oh, your branch is still there.', false, result.verifyList)
} else {
Expand Down
4 changes: 2 additions & 2 deletions lib/verify/pull_never_out_of_date.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ const { addToVerifyList, checkChallengeComplete, execGit, getEmptyVerifyResult }
// do a fetch dry run to see if there is anything
// to pull; if there is they haven't pulled yet

module.exports = function (path) {
module.exports = async function (path) {
const result = getEmptyVerifyResult()

try {
const status = execGit('fetch --dry-run', { cwd: path })
const status = await execGit('fetch --dry-run', { cwd: path })

if (status === '') {
addToVerifyList('verify~Up to date!', true, result.verifyList)
Expand Down
Loading