Skip to content

Commit

Permalink
Merge branch 'release/1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMaruchu committed May 23, 2018
2 parents bf583a3 + b733fa3 commit 2d2eed9
Show file tree
Hide file tree
Showing 141 changed files with 18,185 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .editorconfig
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
31 changes: 31 additions & 0 deletions .gitignore
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
8 changes: 8 additions & 0 deletions .jsbeautifyrc
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
}
}
20 changes: 20 additions & 0 deletions .jshintrc
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
}
21 changes: 21 additions & 0 deletions .npmignore
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
7 changes: 7 additions & 0 deletions .travis.yml
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
88 changes: 88 additions & 0 deletions Gruntfile.js
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']);

};
9 changes: 9 additions & 0 deletions LICENSE
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.
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: BASE_PATH=./examples node ./examples/app.js
80 changes: 80 additions & 0 deletions README.md
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.
10 changes: 10 additions & 0 deletions apidoc.json
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
}
}
15 changes: 15 additions & 0 deletions app.json
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 added docs/.gitkeep
Empty file.
Loading

0 comments on commit 2d2eed9

Please sign in to comment.