Skip to content

Commit

Permalink
Merge pull request #24 from cmgustavo/feature/preparing-env-test
Browse files Browse the repository at this point in the history
wow!
  • Loading branch information
Mario Colque committed Jan 13, 2014
2 parents 5855efa + d145cc6 commit 4ba6842
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 10 deletions.
6 changes: 3 additions & 3 deletions app/views/includes/head.jade
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ head
meta(http-equiv='X-UA-Compatible', content='IE=edge,chrome=1')
meta(name='viewport', content='width=device-width,initial-scale=1.0')

title Mystery
title= appName+' - '+title
meta(http-equiv='Content-type', content='text/html;charset=UTF-8')
meta(name="keywords", content="node.js, express, mongoose, mongodb, angularjs")
meta(name="description", content="Mystery")

link(href='/img/icons/favicon.ico', rel='shortcut icon', type='image/x-icon')

link(rel='stylesheet', href='/lib/bootstrap/dist/css/bootstrap.min.css')
link(rel='stylesheet', href='/css/common.css')

5 changes: 3 additions & 2 deletions config/env/test.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
'use strict';

module.exports = {
db: "mongodb://localhost/mystery-dev",
db: "mongodb://localhost/mystery-test",
app: {
name: "Mystery - Test"
},
port: '3301',
bitcoind: {
user: 'mystery',
pass: 'real_mystery',
protocol: 'http',
host: process.env.BITCOIND_HOST || '127.0.0.1',
port: process.env.BITCOIND_PORT || '8332',
port: process.env.BITCOIND_PORT || '18332',
},
network: 'testnet',
}
8 changes: 6 additions & 2 deletions config/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
* Module dependencies.
*/
var express = require('express'),
config = require('./config');
helpers = require('view-helpers'),
config = require('./config');

module.exports = function(app, passport, db) {
app.set('showStackError', true);
Expand Down Expand Up @@ -36,6 +37,9 @@ module.exports = function(app, passport, db) {
app.use(express.json());
app.use(express.methodOverride());

//dynamic helpers
app.use(helpers(config.app.name));

//routes should be at the last
app.use(app.router);

Expand Down Expand Up @@ -66,4 +70,4 @@ module.exports = function(app, passport, db) {
});

});
};
};
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
"grunt-concurrent": "~0.4.2",
"grunt-nodemon": "~0.1.2",
"grunt-mocha-test": "~0.8.1",
"should": "~2.1.1"
"should": "~2.1.1",
"view-helpers": "latest"
},
"devDependencies": {
"grunt-contrib-watch": "latest",
Expand Down
2 changes: 0 additions & 2 deletions public/js/controllers/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,4 @@ angular.module('mystery.blocks').controller('BlocksController', ['$scope', '$rou
});
};

// for avoid warning. please remove when you use Blocks
$scope.blocks = Blocks;
}]);
33 changes: 33 additions & 0 deletions util/find_ref.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

FIND='find';

##if [[ "$OSTYPE" =~ "darwin" ]]
##then
## FIND='gfind'
##fi


if [ -z "$1" ]
then
echo "$0 : find functions references "
echo "Usage $0 function_name "
exit;
fi

EXTRA=''


CMD="grep -rnH"

if [ "$2" != '--nocolor' ]
then
CMD="$CMD --color=always"
fi


$FIND -L . -name \*.json -not -wholename \*node_modules\* -not -wholename \*public/lib\* -exec $CMD "$1" {} + \
-o -name \*.html -not -wholename \*node_modules\* -not -wholename \*public/lib\* -exec $CMD "$1" {} + \
-o -name \*.jade -not -wholename \*node_modules\* -not -wholename \*public/lib\* -exec $CMD "$1" {} + \
-o -name \*.js -not -wholename \*node_modules\* -not -wholename \*public/lib\* -exec $CMD "$1" {} +

0 comments on commit 4ba6842

Please sign in to comment.