Skip to content

Commit 0205725

Browse files
author
Aitor Magán García
committed
Merge pull request #216 from telefonicaid/unstable
Version 1.8 Release
2 parents 4c7f2c2 + 42abcda commit 0205725

File tree

122 files changed

+12640
-1785
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+12640
-1785
lines changed

.gitattributes

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Set default behaviour, in case users don't have core.autocrlf set.
2+
* text=auto
3+
4+
# Explicitly declare text files we want to always be normalized and converted
5+
# to native line endings on checkout.
6+
*.js text
7+
*.json
8+
*.yml
9+
README.md
10+
11+
# Denote all files that are truly binary and should not be modified.
12+
*.png binary

.gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.idea
2+
*.log
3+
node_modules
4+
coverage
5+
report
6+
*.crt
7+
*.csr
8+
*.key
9+
*.key.org
10+
*.rdb
11+
test/acceptance/config.js

.jshintrc

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"quotmark": "single",
3+
"bitwise": true,
4+
"indent": 2,
5+
"camelcase": true,
6+
"strict": true,
7+
"trailing": true,
8+
"curly": true,
9+
"eqeqeq": true,
10+
"immed": true,
11+
"latedef": true,
12+
"newcap": true,
13+
"noempty": true,
14+
"unused": false,
15+
"noarg": true,
16+
"sub": true,
17+
"undef": true,
18+
"maxdepth": 4,
19+
"maxlen": 120,
20+
"node": true,
21+
"white": false,
22+
"globals": {
23+
"describe":true,
24+
"it": true,
25+
"expect": true
26+
}
27+
}

.travis.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
language: node_js
2+
3+
node_js:
4+
- "0.8"
5+
- "0.10"
6+
7+
branches:
8+
only:
9+
- unstable
10+
- master
11+
12+
services:
13+
- mongodb
14+
- redis-server
15+
16+
install:
17+
- npm install
18+
19+
before_script:
20+
- cd ./utils
21+
- openssl genrsa -des3 -passout pass:test1234 -out server.key 1024
22+
- openssl req -new -key server.key -batch -passin pass:test1234 -out server.csr
23+
- cp server.key server.key.org
24+
- openssl rsa -in server.key.org -passin pass:test1234 -out server.key
25+
- openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
26+
- cd ..

Gruntfile.js

+131
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
'use strict';
2+
var shell = require('shelljs');
3+
4+
module.exports = function (grunt) {
5+
6+
// Project configuration.
7+
grunt.initConfig({
8+
pkgFile: 'package.json',
9+
pkg: grunt.file.readJSON('package.json'),
10+
jshint: {
11+
options: {
12+
jshintrc: '.jshintrc'
13+
},
14+
gruntfile: {
15+
src: 'Gruntfile.js'
16+
},
17+
lib: {
18+
src: ['lib/**/*.js']
19+
},
20+
test: {
21+
src: ['test/e2e/*Test.js', 'test/component/*Test.js']
22+
}
23+
},
24+
watch: {
25+
gruntfile: {
26+
files: '<%= jshint.gruntfile.src %>',
27+
tasks: ['jshint:gruntfile']
28+
},
29+
lib: {
30+
files: '<%= jshint.lib.src %>',
31+
tasks: ['jshint:lib', 'test']
32+
},
33+
test: {
34+
files: '<%= jshint.test.src %>',
35+
tasks: ['jshint:test', 'test']
36+
}
37+
},
38+
39+
'mocha-hack': {
40+
test : {
41+
options: {
42+
ui: 'bdd',
43+
reporter: 'spec',
44+
ignoreLeaks: true
45+
},
46+
src: [
47+
'mocha-globals.js',
48+
'test/e2e/*Test.js',
49+
'test/component/*Test.js'
50+
]
51+
},
52+
check : {
53+
options: {
54+
ui: 'bdd',
55+
reporter: 'spec',
56+
ignoreLeaks: true
57+
},
58+
src: [
59+
'mocha-globals.js',
60+
'test/e2e/*Check.js',
61+
'test/e2e/*Test.js',
62+
'test/component/*Check.js',
63+
'test/component/*Test.js'
64+
]
65+
}
66+
},
67+
68+
exec: {
69+
doxfoundation: {
70+
cmd: 'node ./node_modules/.bin/dox-foundation --source lib --target doc'
71+
}
72+
},
73+
74+
plato: {
75+
options: {
76+
jshint: grunt.file.readJSON('.jshintrc')
77+
},
78+
lib: {
79+
files: {
80+
'report': '<%= jshint.lib.src %>'
81+
}
82+
}
83+
},
84+
85+
env : {
86+
options : {
87+
//Shared Options Hash
88+
},
89+
dev : {
90+
RUSH_CONFIG_FILE : 'lib/configTest.js'
91+
}
92+
}
93+
94+
});
95+
96+
// These plugins provide necessary tasks.
97+
grunt.loadNpmTasks('grunt-contrib-jshint');
98+
grunt.loadNpmTasks('grunt-contrib-watch');
99+
grunt.loadNpmTasks('grunt-mocha-hack');
100+
grunt.loadNpmTasks('grunt-exec');
101+
grunt.loadNpmTasks('grunt-plato');
102+
grunt.loadNpmTasks('grunt-env');
103+
104+
grunt.loadTasks('tools/tasks');
105+
106+
grunt.registerTask('test', ['env', 'mocha-hack:test']);
107+
108+
grunt.registerTask('check', ['env', 'mocha-hack:check']);
109+
110+
grunt.registerTask('testAll', ['env', 'mocha-hack:check']);
111+
112+
grunt.registerTask('init-dev-env', ['hook:pre-commit']);
113+
114+
grunt.registerTask('generate-report',function(){
115+
var generateData = './node_modules/.bin/istanbul cover --root lib/ -- grunt test';
116+
var generateReport = './node_modules/.bin/istanbul report --root coverage/ cobertura';
117+
shell.exec(generateData, {silent : false});
118+
shell.exec(generateReport, {silent : false});
119+
});
120+
121+
grunt.registerTask('coverage', ['env', 'generate-report']);
122+
123+
124+
grunt.registerTask('complexity', ['plato']);
125+
126+
grunt.registerTask('doc', ['exec:doxfoundation']);
127+
128+
// Default task.
129+
grunt.registerTask('default', ['jshint', 'test']);
130+
131+
};

README

-3
This file was deleted.

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Rush [![Build Status](https://travis-ci.org/telefonicaid/Rush.png)](https://travis-ci.org/telefonicaid/Rush) [![Dependency Status](https://david-dm.org/telefonicaid/Rush.png)](https://david-dm.org/telefonicaid/Rush)
2+
===
3+
* Would you like to make effortless Async HTTP request?
4+
* Do yo want to track the state of your relayed requests?
5+
* Add automatic retransmissions/retries of your request?
6+
* Do you need callbacks when your request is finished?
7+
* Keep an historic record of custom information related to the request?
8+
9+
Rush implements an scalable mechanism to provide such functionality, with minor client impact (Header stamping HTTP API).
10+
11+
12+
**Rush has been developed using:**
13+
14+
[![WebStorm](http://www.jetbrains.com/webstorm/documentation/webstorm_banners/webstorm1/webstorm210x60_white.gif)](http://www.jetbrains.com/webstorm/)
15+
16+
Ask us for your OpenSource License
17+
18+
Still interested?, visit our [WIKI and DOCS](https://github.com/telefonicaid/Rush/wiki) section.

bin/consumer

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env node
2+
3+
var consumer = require('../lib/consumer');
4+
consumer.start();

bin/listener

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env node
2+
3+
var listener = require('../lib/listener');
4+
listener.start();

config/test.acceptance.cfg

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
############################ Acceptance Config file#######################################
2+
3+
# Configuration for the acceptance test script execution
4+
# Test suite defines the scope of the tests. Values available are: all, comp, int, e2e
5+
#test_suite=e2e
6+
test_suite=acceptance
7+
8+
# Environment defines if the tests will be executed locally or remotely. Values available are: local or other value that will be
9+
# mapped to the settings file name
10+
#environment=local
11+
environment=aws

config/test.alarm.cfg

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
############################ Alarm Config file#######################################
2+
3+
# Configuration for the alarm test script execution
4+
5+
CERT_PATH=../utils/server.crt
6+
KEY_PATH=../utils/server.key
7+
8+
MONGO_HOST=localhost
9+
REDIS_HOST=localhost
10+
11+
MONGO_PORT=27017
12+
REDIS_PORT=6379
13+
RUSH_PORT=5001
14+
15+
#Default values
16+
REDIS_PATH="/usr/local/bin/redis-server"
17+
MONGO_PATH="/usr/bin/mongod"
18+

lib/config.js

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//Copyright 2012 Telefonica Investigación y Desarrollo, S.A.U
2+
//
3+
//This file is part of RUSH.
4+
//
5+
// RUSH is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public
6+
// License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
7+
// version.
8+
// RUSH is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
9+
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
10+
//
11+
// You should have received a copy of the GNU Affero General Public License along with RUSH
12+
// . If not, seehttp://www.gnu.org/licenses/.
13+
//
14+
//For those usages not covered by the GNU Affero General Public License please contact with::dtc_support@tid.es
15+
16+
var path = require('path'),
17+
envFile = process.env.RUSH_CONFIG_FILE,
18+
configFile = './configBase.js';
19+
20+
if (envFile) {
21+
configFile = path.resolve('.', envFile);
22+
}
23+
24+
module.exports = require(configFile);

0 commit comments

Comments
 (0)