diff --git a/config/config.js b/config/config.js index 2f0e7c93..4d3aa6a7 100644 --- a/config/config.js +++ b/config/config.js @@ -3,7 +3,7 @@ var _ = require('lodash'); // Load app configuration - +process.env.NODE_ENV = process.env.NODE_ENV || 'development'; module.exports = _.extend( require(__dirname + '/../config/env/all.js'), require(__dirname + '/../config/env/' + process.env.NODE_ENV + '.js') || {}); diff --git a/package.json b/package.json index 9d3110cc..01608f08 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,8 @@ "should": "~2.1.1", "view-helpers": "latest", "socket.io": "~0.9.16", - "moment": "~2.5.0" + "moment": "~2.5.0", + "sinon": "~1.7.3" }, "devDependencies": { "grunt-contrib-watch": "latest", diff --git a/public/css/common.css b/public/css/common.css index 3a97c4ba..8853a578 100644 --- a/public/css/common.css +++ b/public/css/common.css @@ -118,3 +118,54 @@ body { .fader.ng-enter-active { opacity: 1; } + + + +.badge { + padding: 1px 9px 2px; + font-size: 12.025px; + font-weight: bold; + white-space: nowrap; + color: #ffffff; + background-color: #999999; + -webkit-border-radius: 9px; + -moz-border-radius: 9px; + border-radius: 9px; +} +.badge:hover { + color: #ffffff; + text-decoration: none; + cursor: pointer; +} +.badge-error { + background-color: #b94a48; +} +.badge-error:hover { + background-color: #953b39; +} +.badge-warning { + background-color: #f89406; +} +.badge-warning:hover { + background-color: #c67605; +} +.badge-success { + background-color: #468847; +} +.badge-success:hover { + background-color: #356635; +} +.badge-info { + background-color: #3a87ad; +} +.badge-info:hover { + background-color: #2d6987; +} +.badge-inverse { + background-color: #333333; +} +.badge-inverse:hover { + background-color: #1a1a1a; +} + + diff --git a/public/js/controllers/index.js b/public/js/controllers/index.js index 30de7da0..9d56f5ed 100755 --- a/public/js/controllers/index.js +++ b/public/js/controllers/index.js @@ -21,6 +21,11 @@ angular.module('mystery.system').controller('IndexController', ['$scope', 'Globa $scope.blocks.unshift(block); }); + $scope.human_since = function(time) { + var m = moment.unix(time); + return m.max().fromNow(); + } + $scope.index = function() { Blocks.get({ limit: BLOCKS_DISPLAYED diff --git a/public/views/index.html b/public/views/index.html index c2c4495c..b9268299 100644 --- a/public/views/index.html +++ b/public/views/index.html @@ -3,14 +3,18 @@

New transactions

- diff --git a/test/lib/PeerSync.js b/test/lib/PeerSync.js new file mode 100644 index 00000000..de6b49be --- /dev/null +++ b/test/lib/PeerSync.js @@ -0,0 +1,14 @@ +'use strict'; +var assert = require('assert'); +var PeerSync = require('../../lib/PeerSync.js').class(); +describe('Unit testing PeerSync', function() { + var ps = new PeerSync(); + describe('#init()', function() { + it('should return with no errors', function() { + assert.doesNotThrow(function(){ + ps.init(); + }); + }); + }); +}); +