-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
141 changed files
with
18,185 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# http://editorconfig.org | ||
# https://github.com/airbnb/javascript/blob/master/.editorconfig | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
end_of_line = lf | ||
# editorconfig-tools is unable to ignore longs strings or urls | ||
max_line_length = null | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Logs | ||
logs | ||
*.log | ||
|
||
#Temporary data | ||
.tmp | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directory | ||
# Deployed apps should consider commenting this line out: | ||
# see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git | ||
node_modules | ||
startup.sh | ||
spec/intergration.spec.js | ||
config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"js": | ||
{ | ||
"jslint_happy": true, | ||
"indent_size": 2, | ||
"wrap_line_length": 80 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"bitwise": true, | ||
"browser": true, | ||
"camelcase": true, | ||
"curly": true, | ||
"eqeqeq": true, | ||
"esnext": true, | ||
"immed": true, | ||
"latedef": true, | ||
"newcap": true, | ||
"noarg": true, | ||
"node": true, | ||
"proto": true, | ||
"mocha": true, | ||
"quotmark": "single", | ||
"strict": true, | ||
"undef": true, | ||
"unused": true, | ||
"ignore": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
node_modules | ||
ssl | ||
.DS_STORE | ||
*~ | ||
.idea | ||
nbproject | ||
test | ||
.git | ||
.gitignore | ||
.tmp | ||
*.swo | ||
*.swp | ||
*.swn | ||
*.swm | ||
*.log | ||
.jshintrc | ||
.editorconfig | ||
.travis.yml | ||
Gruntfile.js | ||
doc | ||
docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
language: node_js | ||
services: | ||
- mongodb | ||
node_js: | ||
- "9.3.0" | ||
before_script: | ||
- npm install -g grunt-cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
'use strict'; | ||
|
||
module.exports = function (grunt) { | ||
|
||
// add grunt tasks. | ||
grunt.loadNpmTasks('grunt-mocha-test'); | ||
grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
grunt.loadNpmTasks('grunt-contrib-watch'); | ||
grunt.loadNpmTasks('grunt-apidoc'); | ||
|
||
grunt.initConfig({ | ||
apidoc: { | ||
api: { | ||
src: ['node_modules/@codetanzania/majifix-common/lib','lib/'], | ||
dest: 'docs/', | ||
options: { | ||
debug: true, | ||
includeFilters: ['.*\\.js$'], | ||
// excludeFilters: ['node_modules/'] | ||
} | ||
} | ||
}, | ||
mochaTest: { | ||
unit: { | ||
options: { | ||
reporter: 'spec', | ||
timeout: 20000 | ||
}, | ||
src: [ | ||
'test/**/*.js', | ||
'test/unit/**/*.js', | ||
'!test/integration/**/*.js' | ||
] | ||
}, | ||
integration: { | ||
options: { | ||
reporter: 'spec', | ||
timeout: 20000 | ||
}, | ||
src: [ | ||
'test/**/*.js', | ||
'test/integration/**/*.js', | ||
'!test/unit/**/*.js' | ||
] | ||
} | ||
}, | ||
jshint: { | ||
options: { | ||
reporter: require('jshint-stylish'), | ||
jshintrc: '.jshintrc' | ||
}, | ||
main: { | ||
src: [ | ||
'Gruntfile.js', | ||
'index.js', | ||
'lib/**/*.js', | ||
] | ||
}, | ||
test: { | ||
options: { | ||
jshintrc: 'test/.jshintrc' | ||
}, | ||
src: [ | ||
'test/**/*.js' | ||
] | ||
} | ||
}, | ||
watch: { | ||
all: { | ||
files: [ | ||
'Gruntfile.js', | ||
'index.js', | ||
'lib/**/*.js', | ||
'test/**/*.js' | ||
], | ||
tasks: ['default'] | ||
} | ||
} | ||
}); | ||
|
||
//custom tasks | ||
grunt.registerTask('default', ['jshint', 'mochaTest', 'watch']); | ||
grunt.registerTask('test', ['jshint', 'mochaTest']); | ||
grunt.registerTask('integration', ['jshint', 'mochaTest:integration']); | ||
grunt.registerTask('unit', ['jshint', 'mochaTest:unit']); | ||
grunt.registerTask('doc', ['jshint', 'apidoc:api']); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2018 CodeTanzania & Contributors | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: BASE_PATH=./examples node ./examples/app.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# majifix-jurisdiction | ||
|
||
[![Build Status](https://travis-ci.org/CodeTanzania/majifix-jurisdiction.svg?branch=develop)](https://travis-ci.org/CodeTanzania/majifix-jurisdiction) | ||
[![Dependencies Status](https://david-dm.org/CodeTanzania/majifix-jurisdiction/status.svg?style=flat-square)](https://david-dm.org/CodeTanzania/majifix-jurisdiction) | ||
[![Deploy to Heroku](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy?template=https://github.com/CodeTanzania/majifix-jurisdiction/tree/develop) | ||
|
||
A representation of an entity (e.g municipal) responsible for addressing citizen(or customer) service request(issue). | ||
|
||
## Requirements | ||
|
||
- [NodeJS v8.1.11+](https://nodejs.org) | ||
- [MongoDB v3.4.10+](https://www.mongodb.com/) | ||
- [Mongoose v5.1.2+](https://github.com/Automattic/mongoose) | ||
|
||
## Installation | ||
|
||
```sh | ||
npm install @codetanzania/majifix-jurisdiction --save | ||
``` | ||
|
||
## Usage | ||
|
||
```js | ||
const mongoose = require('mongoose'); | ||
const { app } = require('@codetanzania/majifix-jurisdiction'); | ||
|
||
//connect to mongodb | ||
mongoose.connect(process.env.MONGODB_URI); | ||
|
||
//fire the app | ||
app.start(function (error, env) { | ||
... | ||
}); | ||
``` | ||
|
||
## Testing | ||
|
||
- Clone this repository | ||
|
||
- Install all development dependencies | ||
|
||
```sh | ||
npm install | ||
``` | ||
|
||
- Run example | ||
|
||
```sh | ||
npm run dev | ||
``` | ||
|
||
- Then run test | ||
|
||
```sh | ||
npm test | ||
``` | ||
|
||
## Contribute | ||
|
||
It will be nice, if you open an issue first so that we can know what is going on, then, fork this repo and push in your ideas. Do not forget to add a bit of test(s) of what value you adding. | ||
|
||
## References | ||
|
||
- [Open311 GeoReport v2](http://wiki.open311.org/GeoReport_v2/) | ||
- [popolo project](https://www.popoloproject.com/) | ||
- [http://geojson.org/](http://geojson.org/) | ||
- [https://tools.ietf.org/html/rfc7946](https://tools.ietf.org/html/rfc7946) | ||
- [https://opengovdata.io/](https://opengovdata.io/) | ||
|
||
## Licence | ||
|
||
The MIT License (MIT) | ||
|
||
Copyright (c) 2018 CodeTanzania & Contributors | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "majifix-jurisdiction", | ||
"title": "majifix - Jurisdiction", | ||
"url": "https://majifix-jurisdiction.herokuapp.com/v1", | ||
"sampleUrl": "https://majifix-jurisdiction.herokuapp.com/v1", | ||
"template": { | ||
"withCompare": true, | ||
"withGenerator": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "majifix-jurisdiction", | ||
"description": "A representation of an entity (e.g municipal) responsible for addressing citizen(or customer) service request(issue).", | ||
"repository": "https://github.com/CodeTanzania/majifix-jurisdiction.git", | ||
"keywords": [ | ||
"codetanzania", | ||
"majifix", | ||
"majifix-module", | ||
"jurisdiction", | ||
"open311" | ||
], | ||
"addons": [ | ||
"mongolab" | ||
] | ||
} |
Empty file.
Oops, something went wrong.