Skip to content

Commit

Permalink
Merge pull request #45 from molekilla/rc_1.2.0
Browse files Browse the repository at this point in the history
upgrading UI to hapi 9.x, service to hapi 8.8.x, bumping some depende…
  • Loading branch information
molekilla committed Aug 18, 2015
2 parents a306436 + 195cae3 commit 6407bd5
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 245 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- "0.10"
- "0.12"
services:
- mongodb
env:
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Pure pragmatic NodeJS stack
#### Changelog: [changelog](changelog.md)

#### Last update: 1.1.0
#### Last update: 1.2.0

#### Docs:

Expand All @@ -28,18 +28,16 @@ Pure pragmatic NodeJS stack

* **Rule Them All with a single environment**: Both development and production environment are the same. We concat, annotate, mix some ingredients and offer you the same production environment for development.
* **AngularJS 1.3.x**
* **Hapi 8.0.0**
* **Hapi 9.0.0**
* **ES6 ready** for service api layer (UI/Angular later mid 2015)
* **Jasmine NPM**
* **Ionic**: Try [rutha-ionic](https://github.com/molekilla/rutha-ionic)

### Additional features
* **Grunt JIT**: Is JIT for Grunt. No more waits.
* **BrowserSync**: Choose this because it was painless to configure
* **Underscore for frontend server side templates**: To avoid issues with AngularJS.
* [Grunt ngAnnotate](https://github.com/mzgol/grunt-ng-annotate)
* [Grunt Angular Templates](https://github.com/ericclemmons/grunt-angular-templates)
* [Grunt Wiredep](https://github.com/stephenplusplus/grunt-wiredep)
* **Specs and Functional Tests (Frontend)**: Based partially on [year of moo](http://www.yearofmoo.com/2013/01/full-spectrum-testing-with-angularjs-and-karma.html)
* **Frontend** [Todd Motto's](http://toddmotto.com/opinionated-angular-js-styleguide-for-teams/) AngularJS guideline: I also based some ideas on [PackPub's Angular Book](http://www.packtpub.com/angularjs-web-application-development/book?tag=dp/masteringwebwithangularjs-abr1/0913)
* **Visionmedia/debug** [module](https://github.com/visionmedia/debug) by default
Expand All @@ -56,7 +54,7 @@ Pure pragmatic NodeJS stack
## Installing
1. Clone repo
2. Rename text containing `rutha` to `your_app_name`
3. Be sure to have node 0.10.32 or greater (e.g. nvm use 0.10.32)
3. Be sure to have node 0.12.6 or greater (e.g. nvm use 0.12.6)
4. Run `npm install grunt-cli -g`
5. Change dir to ui and run `npm install` and then `bower install`
6. Open a new tab and change dir to service and run `npm install`
Expand Down
7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ Pure pragmatic NodeJS stack

### Changelog ###

#### 1.2.0

* NodeJS: Updated dependencies to make it work for NodeJS 0.12.x
* Service: Bumped dependencies, hapi to 8.8.1, hapi-swagger to 0.8.2 and ES6 tasks (grunt-ts and grunt-babel)
* UI: Migrated to hapi 9.x
* UI: Removed lib/hapi/server.js

#### 1.1.0

* ES6: service specs folder enabled in `grunt spec`
Expand Down
2 changes: 1 addition & 1 deletion service/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = function (grunt) {
debugPort: 5858
},
nodemon: {
args: ['--debug']
args: []
},
// es6: {
// transpiler: 'babel',
Expand Down
1 change: 0 additions & 1 deletion service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ After years of dealing with Sinatra (Ruby) and Backbone, and a brief ExpressJS s
* **Specs and Functional Tests (Frontend)**: Based partially on [year of moo](http://www.yearofmoo.com/2013/01/full-spectrum-testing-with-angularjs-and-karma.html)
* **Frontend** [Todd Motto's](http://toddmotto.com/opinionated-angular-js-styleguide-for-teams/) AngularJS guideline: I also based some ideas on [PackPub's Angular Book](http://www.packtpub.com/angularjs-web-application-development/book?tag=dp/masteringwebwithangularjs-abr1/0913)
* **Visionmedia/debug** [module](https://github.com/visionmedia/debug) by default
* **Lout module** for [API docs](https://github.com/spumko/lout) by default

### Grunt Help (Service) ###

Expand Down
21 changes: 10 additions & 11 deletions service/package.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,38 @@
{
"name": "rutha_stack_service",
"version": "1.1.0",
"version": "1.2.0",
"description": "Rutha REST API Service",
"main": "lib/hapi/index.js",
"scripts": {
"start": "node lib/hapi/index.js",
"test": "grunt spec",
"postinstall": "grunt postinstall"
"test": "grunt spec"
},
"author": "Rogelio Morrell",
"repository": {
"type": "git",
"url": "git://github.com/molekilla/rutha.git"
},
"engines": {
"node": ">0.10.35"
"node": ">0.12.6"
},
"license": "MIT",
"devDependencies": {
"grunt": "~0.4.5",
"grunt-babel": "^5.0.0",
"grunt-babel": "^5.0.1",
"grunt-concurrent": "~0.5.0",
"grunt-contrib-clean": "~0.6.0",
"grunt-contrib-copy": "~0.5.0",
"grunt-contrib-jshint": "~0.11.0",
"grunt-contrib-watch": "~0.6.1",
"grunt-env": "~0.4.1",
"grunt-istanbul": "0.3.0",
"grunt-istanbul": "0.6.0",
"grunt-jasmine-node": "~0.2.1",
"grunt-jsdoc": "^0.6.2",
"grunt-node-inspector": "~0.1.6",
"grunt-nodemon": "~0.2.1",
"grunt-nsp-package": "0.0.5",
"grunt-shell": "^1.1.1",
"grunt-ts": "^4.0.1",
"grunt-ts": "^4.2.0",
"jasmine": "^2.2.1",
"jit-grunt": "~0.9.1",
"load-grunt-config": "~0.16.0",
Expand All @@ -44,12 +43,12 @@
},
"dependencies": {
"bcrypt-nodejs": "0.0.3",
"boom": "^2.6.1",
"boom": "^2.8.0",
"debug": "~2.1.3",
"hapi": "~8.5.0",
"hapi": "~8.8.1",
"hapi-auth-bearer-token": "^3.1.0",
"hapi-swagger": "^0.7.1",
"joi": "^6.1.0",
"hapi-swagger": "^0.8.2",
"joi": "^6.6.1",
"mongoose": "^4.0.1",
"rutha-utils": "^1.1.0",
"underscore": "~1.8.0"
Expand Down
29 changes: 16 additions & 13 deletions ui/lib/hapi/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ var RuthaUtils = require('rutha-utils');
var routes = require('./routes');
var MongooseHandler = require('rutha-utils/mongoose');
var Mongoose = require('mongoose');
// Hapi 9.x !
var Inert = require('inert');


var config = RuthaUtils.createConfig({
path: {
Expand Down Expand Up @@ -38,18 +41,6 @@ canned.connection({
port: 9002
});

// views
server.views(viewOptions);
canned.views(viewOptions);

// statics
server.route(routes.assets);
canned.route(routes.assets);

// health check
server.route(routes.health);
canned.route(routes.health);

var compiler = function(template, options) {
return require('underscore').template(template, options || { });
};
Expand Down Expand Up @@ -83,9 +74,21 @@ var cannedControllers = [
function LoadServer(server, controllers) {
server.register([
require('hapi-auth-cookie'),
require('bell')
require('bell'),
require('vision'),
Inert
], function(err) {


// views
server.views(viewOptions);

// statics
server.route(routes.assets);

// health check
server.route(routes.health);

server.auth.strategy('facebook', 'bell', {
provider: 'facebook',
password: 'some password',
Expand Down
204 changes: 0 additions & 204 deletions ui/lib/hapi/server.js

This file was deleted.

Loading

0 comments on commit 6407bd5

Please sign in to comment.