-
Notifications
You must be signed in to change notification settings - Fork 2
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
31 changed files
with
576 additions
and
261 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 |
---|---|---|
|
@@ -3,3 +3,9 @@ | |
|
||
# npm-installed modules | ||
node_modules/ | ||
|
||
# sass output | ||
web/css/ | ||
|
||
# vendor files | ||
web/vendor/ |
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,5 @@ | ||
# will install with 'npm install' | ||
node_modules/ | ||
|
||
# will install after 'npm install' | ||
web/vendor/ |
Empty file.
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,18 @@ | ||
language: node_js | ||
node_js: | ||
- '4.2' | ||
- '0.11' | ||
- '0.10' | ||
before_deploy: | ||
- mv .openshift/gitignore .gitignore | ||
deploy: | ||
provider: openshift | ||
user: [email protected] | ||
password: | ||
secure: UeYKxuX479enwcn1rziErDtnHjR5RFu0a4zK83qZKPhgsXbk+NUXw20fMGtRQvfK/YKm5RW3hqQup6d8dinUJeTqANI4xeunhwV331nWUyzzhRZJUXPb0IiD3idJDpiDDH05leQzSp/8uGt1wb9fYPe1OoN3ylq46RT5kW0tQ/CqkjIOkTPgrX0jY1moANse4RfvGD/6hmgL8nrOM6mqNG2n8fpnoRdznAkZkQlV/vjLEn45SpQEWGmCwn4uFFouXaV3WQMgcuuNvKWQBRS9ZY0VwSNdZoTXvFqaHTxHaPADoMtxszHY18q9XiRpr2TBoBjEXQYtFWBTVN7n3kkQXLHzoMJk/LfsWW3z8lUHVU7Q7MJyuFLj4qRP85neLKQ38CahUCCxbr5IaxvS9/PMysYJi34LYR43SiK2WBf6gdH6SB/GHEJA2IU8TjNmfA0LVbhS/zaDCLD+NRxXghhsaIXAb5JIYfYiOKDwA5WVcIk/Tfz5CpM6M8pYbiP3PYn2bYFr7OY9HL78z0+7NqU4YYiIlgfPf0TKz/FDmtgMJErFNbZbu72uPBryUotjC7zTkSQwtRmyFXGmtc/OpLEnTr3jSK1Sx7BbS1IsravMycNQtzygAykT7SotyhinjE+fXY0fXP59UmQvV/SMjbc6j2GSWsyU4JBF2BV7TpHZMAM= | ||
app: mmtcke | ||
domain: forfutureco | ||
on: | ||
repo: forfuturellc/mmtc-ke | ||
branch: master | ||
skip_cleanup: 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,26 @@ | ||
# Change Log | ||
|
||
All notable changes to this project will be documented in this file. | ||
This project adheres to [Semantic Versioning](http://semver.org/). | ||
|
||
## [Unreleased][Unreleased] | ||
|
||
|
||
## [0.1.0][0.1.0] - 2016-03-25 | ||
|
||
Added: | ||
|
||
* Update Data File Format Specification to accommodate for USSD codes (issue #1) | ||
* Display USSD codes in network pages | ||
* Update data for networks: safaricom | ||
* Display table for ranges (issue #3) | ||
|
||
|
||
## [0.0.0][0.0.0] - 2016-03-11 | ||
|
||
This is the very first version. | ||
|
||
|
||
[Unreleased]: https://github.com/forfuturellc/mmtc-ke/compare/v0.1.0...HEAD | ||
[0.0.0]: https://github.com/forfuturellc/mmtc-ke/compare/v0.0.0...HEAD | ||
[0.1.0]: https://github.com/forfuturellc/mmtc-ke/compare/v0.1.0...HEAD |
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
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
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
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
|Aspect|Detail| | ||
|------|------| | ||
|Version|0.0| | ||
|Version|0.2| | ||
|Written by|GochoMugo <[email protected]>| | ||
|
||
The data used in the application in its computations is fed through data files | ||
|
@@ -11,25 +11,40 @@ independent of the different networks available. | |
|
||
## spec: | ||
|
||
The data files are written in JSON format. | ||
The data files are written in [JSON][json] format. | ||
|
||
A single file can only hold one [Network](#type-network) object. | ||
|
||
<a name="type-network"></a> | ||
### Network | ||
|
||
A single data file can **only** hold one [Network](#type-network) object. | ||
|
||
|Key|Type|Description| | ||
|---|----|-----------| | ||
|name|[Name](#type-name)|Name of the Network| | ||
|meta|[Metadata](#type-metadata)|Metadata associated with the network| | ||
|transactions|\[[Transaction](#type-transaction)]|Transactions supported by the network| | ||
|ussd_codes|\[[USSDCode](#type-ussdcode)]|The available shortcodes| | ||
|
||
|
||
<a name="type-metadata"></a> | ||
### Metadata | ||
|
||
|Key|Type|Description| | ||
|---|----|-----------| | ||
|name|[Name](#type-name)|The name of the Network| | ||
|transactions|[Transaction](#type-transaction)|The transactions supported by the network| | ||
|spec|String|Specification version the file adheres to| | ||
|date_updated|[Date](#type-date)|Date on which the data was last updated| | ||
|
||
|
||
<a name="type-transaction"></a> | ||
### Transaction | ||
|
||
|Key|Type|Description| | ||
|---|----|-----------| | ||
|name|[Name](#type-name)|Type of the transaction| | ||
|classes|[Class](#type-class)|The different classes of the transaction| | ||
|classes|\[[Class](#type-class)]|The different classes of the transaction| | ||
|amount_input|boolean|`false` if an amount, as input to the transaction, is **not** applicable. *Defaults to `true`.*| | ||
|
||
|
||
<a name="type-class"></a> | ||
### Class | ||
|
@@ -38,11 +53,11 @@ A single file can only hold one [Network](#type-network) object. | |
|---|----|-----------| | ||
|name|[Name](#type-name)|Name of the class of the transaction| | ||
|ranges|\[[Range](#type-range)]|The ranges in the transaction class| | ||
|amount|boolean|`false` if amount is **not** applicable to the class. Otherwise `false`. Default is `true`| | ||
|amount|[Cost](#type-cost)|Amount charged to the user. *This should be provided __only__ if parent `Transaction` has `amount_input` set to `false`.*| | ||
|
||
|
||
### Range | ||
<a name="type-range"></a> | ||
### Range | ||
|
||
|Key|Type|Description| | ||
|---|----|-----------| | ||
|
@@ -63,7 +78,30 @@ This type is based on the native `Number` type in JSON with these few additions: | |
Therefore, the cost is accurate to **1 KES**. | ||
|
||
|
||
<a name="type-ussdcode"></a> | ||
### USSDCode | ||
|
||
This is a [USSD][ussd] code, supported by the network. | ||
|
||
|Key|Type|Description| | ||
|---|----|-----------| | ||
|code|string|The actual USSD code. For example, `*144#`| | ||
|description|string|Describes the use of the code| | ||
|
||
|
||
<a name="type-name"></a> | ||
### Name | ||
|
||
This is a string, **uniquely** identifying the named object. | ||
|
||
|
||
<a name="type-date"></a> | ||
### Date | ||
|
||
Date, in `YYYY-MM-DD` format. See this [W3C document][date] for | ||
more information. | ||
|
||
|
||
[date]:https://www.w3.org/TR/NOTE-datetime | ||
[json]:http://json.org | ||
[ussd]:https://en.wikipedia.org/wiki/Unstructured_Supplementary_Service_Data |
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
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,25 @@ | ||
/** | ||
* The MIT License (MIT) | ||
* Copyright (c) 2016 Forfuture LLC | ||
* | ||
* Client to support services. | ||
*/ | ||
|
||
|
||
exports = module.exports = { | ||
getLogger: getLogger, | ||
}; | ||
|
||
|
||
// npm-installed modules | ||
var winston = require('winston'); | ||
|
||
|
||
/** | ||
* Return the main application logger | ||
* | ||
* @return {Object} logger | ||
*/ | ||
function getLogger() { | ||
return winston; | ||
} |
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,27 @@ | ||
/** | ||
* The MIT License (MIT) | ||
* Copyright (c) 2016 Forfuture LLC | ||
* | ||
* Error handling | ||
*/ | ||
|
||
|
||
// npm-installed modules | ||
var errors = require('common-errors'); | ||
|
||
|
||
// module variables | ||
var define = errors.helpers.generateClass; | ||
|
||
|
||
exports = module.exports = { | ||
// General Errors | ||
PageNotFoundError: define('PageNotFoundError'), | ||
|
||
// Calculation Errors | ||
InvalidAmountError: define('InvalidAmountError'), | ||
NetworkNotFoundError: define('NetworkNotFoundError'), | ||
RangeNotFoundError: define('RangeNotFoundError'), | ||
TransactionClassNotFoundError: define('TransactionClassNotFoundError'), | ||
TransactionNotFoundError: define('TransactionNotFoundError'), | ||
}; |
Oops, something went wrong.
335c1a4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is cool, i love the way you code, the jsdocs comments and all that... so cool
335c1a4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 😄
Code is Poetry. Code is an expression of Thoughts.