This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Karma configuration | |
// Generated on Wed Sep 18 2013 14:27:40 GMT-0700 (PDT) | |
module.exports = function(config) { | |
config.set({ | |
// base path, that will be used to resolve files and exclude | |
basePath: '', | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// list of files / patterns to load in the browser | |
files: [ | |
'vendor/managed/angular/angular.js', | |
'vendor/managed/angular-mocks/angular-mocks.js', | |
'src/js/**/{%=name%}.js', | |
'src/js/**/!({%=name%}).js', | |
'test/unit/**/*.spec.js' | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module("angularQuiz").controller "RegisterModalController", | |
class RegisterModalController | |
prvScope = null #prototype private scope member | |
prvModalInstance = null #prototype private modal instance | |
prvAPIService = null #prototype private api service | |
constructor: ($scope,$modalInstance, APIService) -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$rootScope.$safeApply = function (fn) { #safe apply can be accessed from any $scope | |
var phase; | |
phase = this.$root.$$phase; | |
if (phase === '$apply' || phase === '$digest') { | |
if (fn) { | |
fn(); | |
} | |
} else { | |
this.$apply(fn); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
login: () => | |
self = this | |
@$scope.data.toggle = false #toggle the buttons off | |
@FB.login(@$scope.data.email, @$scope.data.password).then ((data)-> # Try to login | |
self.$modalInstance.close # If successful, close the modal | |
email: self.$scope.data.email # and pass the email address | |
),(reason)-> # If failure | |
console.log(reason); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$rootScope.$safeApply = function(fn) { | |
var phase; | |
phase = this.$root.$$phase; | |
if (phase === '$apply' || phase === '$digest') { | |
if (fn) { | |
fn(); | |
} | |
} else { | |
this.$apply(fn); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FBase.prototype.register = function(email, password) { | |
var killFailureListener, killSuccessListener, promise, self; | |
this.regDeferral = _q.defer(); | |
self = this; | |
promise = this.regDeferral.promise; | |
killSuccessListener = null; | |
killFailureListener = null; | |
killSuccessListener = _rootScope.$once("angularFireAuth:login", function(event, user) { | |
killFailureListener(); | |
console.log("hello"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var $q = {defer:function(){return {reject:function(){},resolve:function(){},promise:{}}}} | |
var db = {query:function(x,y,z){z();}}; | |
var $rootScope = {$apply:function(fn){fn();}}; | |
var x = { | |
getEvents: function() { | |
var matchCallback = null; | |
var reduce = null; | |
var deferred = $q.defer(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
andrew@andrew-desktop:~/WebstormProjects/angular-quiz$ jitsu deploy | |
info: Welcome to Nodejitsu rhyneandrew | |
info: jitsu v0.13.2, node v0.10.18 | |
info: It worked if it ends with Nodejitsu ok | |
info: Executing command deploy | |
info: Analyzing application dependencies in node index.js | |
warn: Local package version appears to be old | |
warn: The package.json version will be incremented automatically | |
warn: About to write /home/andrew/WebstormProjects/angular-quiz/package.json | |
data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var passport = require('passport'), | |
FacebookStrategy = require('passport-facebook').Strategy; | |
/** | |
* This function handles passport verification | |
* @param {Object} token Token | |
* @param {Object} tokenSecret Token secret | |
* @param {Object} profile Information regarding this user |
OlderNewer