Skip to content
This repository has been archived by the owner on Nov 11, 2018. It is now read-only.

Commit

Permalink
Merge pull request #140 from christianbundy/new-branch
Browse files Browse the repository at this point in the history
Bump version
  • Loading branch information
christianbundy committed May 9, 2014
2 parents 09de928 + c7f3b83 commit ba7dc0f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 21 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fraction",
"version": "0.21.0",
"version": "0.21.1",
"author": "Christian Bundy",
"description": "A machine learning content aggregator in Meteor.",
"contributors": [
Expand Down
16 changes: 16 additions & 0 deletions shared/router/lib/lib/shuffle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
shuffle = function (array) {
"use strict";

var currentIndex = array.length, temporaryValue, randomIndex;

while (0 !== currentIndex) {
randomIndex = Math.floor(Math.random() * currentIndex);
currentIndex -= 1;

temporaryValue = array[currentIndex];
array[currentIndex] = array[randomIndex];
array[randomIndex] = temporaryValue;
}

return array;
};
19 changes: 0 additions & 19 deletions shared/router/lib/random.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
// todo: make a lib and move this
var shuffle = function (array) {
"use strict";

var currentIndex = array.length, temporaryValue, randomIndex;

while (0 !== currentIndex) {
randomIndex = Math.floor(Math.random() * currentIndex);
currentIndex -= 1;

temporaryValue = array[currentIndex];
array[currentIndex] = array[randomIndex];
array[randomIndex] = temporaryValue;
}

return array;
};


randomRoute = {
controller: 'NewsController',
path: '/random',
Expand Down
4 changes: 3 additions & 1 deletion shared/router/lib/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ userRoute = {
data: function () {
"use strict";

Session.set('sortType', null);
Session.set('currentView', 'Profile');
Session.set('showComments', false);
Session.set('back', Session.get('sortType'));
Session.set('sortType', null);

Session.set('posts', Posts.find({
author: this.params.username
}, {
Expand Down

0 comments on commit ba7dc0f

Please sign in to comment.