Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added karma testing suite v1 & current matches functionality #19

Merged
merged 4 commits into from
Jul 25, 2014
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fixed merge conflicts 7/24/2014
  • Loading branch information
albreyb committed Jul 24, 2014
commit fb327d20b413f192eab56d1d060784a846e858a6
63 changes: 63 additions & 0 deletions npm-debug.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli 'karma' ]
2 info using [email protected]
3 info using [email protected]
4 warn package.json [email protected] No repository field.
5 warn package.json [email protected] url is also the name of a node core module.
6 warn package.json [email protected] querystring is also the name of a node core module.
7 verbose readDependencies using package.json deps
8 verbose cache add [ 'karma', null ]
9 verbose cache add name=undefined spec="karma" args=["karma",null]
10 verbose parsed url { protocol: null,
10 verbose parsed url slashes: null,
10 verbose parsed url auth: null,
10 verbose parsed url host: null,
10 verbose parsed url port: null,
10 verbose parsed url hostname: null,
10 verbose parsed url hash: null,
10 verbose parsed url search: null,
10 verbose parsed url query: null,
10 verbose parsed url pathname: 'karma',
10 verbose parsed url path: 'karma',
10 verbose parsed url href: 'karma' }
11 silly lockFile 512423cb-karma karma
12 verbose lock karma /Users/albreybrown/.npm/512423cb-karma.lock
13 silly lockFile 512423cb-karma karma
14 silly lockFile 512423cb-karma karma
15 verbose addNamed [ 'karma', '' ]
16 verbose addNamed [ null, '*' ]
17 silly lockFile cd7961bb-karma karma@
18 verbose lock karma@ /Users/albreybrown/.npm/cd7961bb-karma.lock
19 silly addNameRange { name: 'karma', range: '*', hasData: false }
20 verbose url raw karma
21 verbose url resolving [ 'https://registry.npmjs.org/', './karma' ]
22 verbose url resolved https://registry.npmjs.org/karma
23 info trying registry request attempt 1 at 16:08:09
24 http GET https://registry.npmjs.org/karma
25 info retry will retry, error on last attempt: Error: connect ETIMEDOUT
26 info trying registry request attempt 2 at 16:09:35
27 http GET https://registry.npmjs.org/karma
28 info retry will retry, error on last attempt: Error: connect ETIMEDOUT
29 info trying registry request attempt 3 at 16:11:51
30 http GET https://registry.npmjs.org/karma
31 silly lockFile cd7961bb-karma karma@
32 silly lockFile cd7961bb-karma karma@
33 error network connect ETIMEDOUT
33 error network This is most likely not a problem with npm itself
33 error network and is related to network connectivity.
33 error network In most cases you are behind a proxy or have bad network settings.
33 error network
33 error network If you are behind a proxy, please make sure that the
33 error network 'proxy' config is set properly. See: 'npm help config'
34 error System Darwin 11.4.2
35 error command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "karma"
36 error cwd /Users/albreybrown/Desktop/AllThingsCode/Projects/ice-client
37 error node -v v0.10.29
38 error npm -v 1.4.14
39 error syscall connect
40 error code ETIMEDOUT
41 error errno ETIMEDOUT
42 verbose exit [ 1, true ]
14 changes: 13 additions & 1 deletion www/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,17 @@ app.run(function($ionicPlatform, $rootScope, MatchLoader, Events, $http, $window
// event.preventDefault();
// }
// });

// var socket = io('http://ice-chat.cloudapp.net:80');

// socket.on('chat message', function(msg){
// // should only append to a somwhere holding
// // only msg.sender + receiver message
// console.log(msg.msg)
// });

var user = prompt("please enter your name");
socket.emit('join', {user: user});
$rootScope.currentUser = {};
$rootScope.currentUser.id = 0;
$rootScope.currentEvent = {};
Expand Down Expand Up @@ -77,7 +88,8 @@ app.run(function($ionicPlatform, $rootScope, MatchLoader, Events, $http, $window

.config(function($stateProvider, $urlRouterProvider, $httpProvider) {

$httpProvider.interceptors.push('httpRequestInterceptor');

// $httpProvider.interceptors.push('httpRequestInterceptor');
$urlRouterProvider.otherwise("/sign-in");

$stateProvider
Expand Down
4 changes: 2 additions & 2 deletions www/js/services/matchLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ app.factory('MatchLoader', function($http) {

loadAllMatches: function() {
return $http({
url: 'http://zavadil7.cloudapp.net/allcandidates/',
url: 'http://zavadil7.cloudapp.net/allcandidates/?apiKey=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhcGlLZXkiOiJ6b3VuZHNfcGVla2luZyJ9.U-2sjzUTITlXuetMgYJJFEQ6LJQ-5mx1dLwUa6xQfFI&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJmYl9pZCI6IjcxNDA4OTMwNTMwMzM2NSJ9.VhKU-hHYhjboq882KWufV9_Mj4V9iOljM5yb_aC1wZg',
method: "GET"
}).success(function(data){
data.reverse();
Expand All @@ -16,7 +16,7 @@ app.factory('MatchLoader', function($http) {

loadCurrentMatches: function() {
return $http({
url: 'http://zavadil7.cloudapp.net/matches/',
url: 'http://zavadil7.cloudapp.net/matches/?apiKey=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhcGlLZXkiOiJ6b3VuZHNfcGVla2luZyJ9.U-2sjzUTITlXuetMgYJJFEQ6LJQ-5mx1dLwUa6xQfFI&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJmYl9pZCI6IjcxNDA4OTMwNTMwMzM2NSJ9.VhKU-hHYhjboq882KWufV9_Mj4V9iOljM5yb_aC1wZg',
method: "GET"
});
}
Expand Down
27 changes: 13 additions & 14 deletions www/js/services/oAuth.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,20 +106,19 @@ app.factory('OpenFB', function ($rootScope, $q, $window, $http, MatchLoader) {
userToken = userToken.slice(0, -4);
localStorage.setItem('userToken', userToken);

MatchLoader.loadAllMatches().then(function(results) {
$rootScope.allMatches = results.data;
console.log($rootScope.allMatches);
for (var i = 0; i < results.data.length; i++) {
if(results.data[i].is_male === 1) {
results.data[i]['pic'] = 'http://yourgrantauthority.com/wp-content/uploads/2012/09/George_Clooney-0508.jpg';
} else {
results.data[i]['pic'] = 'http://si.wsj.net/public/resources/images/BN-BY925_mag041_OZ_20140318165119.jpg';
}
}
$rootScope.potentialMatches = $rootScope.allMatches.slice(0, 20);
$rootScope.allMatches = $rootScope.allMatches.slice(20);
});

// MatchLoader.loadAllMatches().then(function(results) {
// $rootScope.allMatches = results.data;
// console.log($rootScope.allMatches);
// for (var i = 0; i < results.data.length; i++) {
// if(results.data[i].is_male === 1) {
// results.data[i]['pic'] = 'http://yourgrantauthority.com/wp-content/uploads/2012/09/George_Clooney-0508.jpg';
// } else {
// results.data[i]['pic'] = 'http://si.wsj.net/public/resources/images/BN-BY925_mag041_OZ_20140318165119.jpg';
// }
// }
// $rootScope.potentialMatches = $rootScope.allMatches.slice(0, 20);
// $rootScope.allMatches = $rootScope.allMatches.slice(20);
// });
deferredLogin.resolve();
} else {
deferredLogin.reject();
Expand Down
21 changes: 21 additions & 0 deletions www/js/services/tokenMaker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
app.factory('TokenMaker', function($window) {

var TokenMaker = {

makeToken: function($window) {
var apiKey =
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhcGlLZXkiOiJ6b3VuZHNfcGVla2luZyJ9.U-2sjzUTITlXuetMgYJJFEQ6LJQ-5mx1dLwUa6xQfFI';
// var userToken = $window.localStorage.getItem('jwtToken');
var userToken =
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJmYl9pZCI6IjE1In0.sCx2kRCyPY4wL8QMhEELWt4M_lwuYjsnDMW6P136Tos';
return '?apiKey=' + apiKey + '&token=' + userToken;
},

eventApi: function() {
return '4IP4VYD2JFW2MOT2Y7EC';
}
};

return TokenMaker;

});
You are viewing a condensed version of this merge commit. You can view the full changes here.