Skip to content

Commit

Permalink
v0.3.0
Browse files Browse the repository at this point in the history
See CHANGELOG.md
  • Loading branch information
GochoMugo committed Jun 16, 2016
2 parents 8a227f1 + 375a5bb commit 410a56c
Show file tree
Hide file tree
Showing 20 changed files with 225 additions and 31 deletions.
7 changes: 7 additions & 0 deletions .openshift/action_hooks/pre_build
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

# this install all dependencies + devDevdependencies
NODE_ENV=development npm install

# building files
npm build
4 changes: 4 additions & 0 deletions .openshift/action_hooks/pre_start
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

# this starts the logentries agent
./${OPENSHIFT_DATA_DIR}/start-le
20 changes: 19 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,23 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased][Unreleased]


## [0.3.0][0.3.0] - 2016-06-16

Added:

* Add Support for [Airtel Money][airtel-money]
* Rename 'Safaricom' to 'Mpesa'
* Tracking page views with [Google Analytics][analytics]
* Updated schema and views to accommodate for URL to networks' homepages

Changed:

* Minor UI polishes

[airtel-money]:http://africa.airtel.com/wps/wcm/connect/AfricaRevamp/Kenya/Airtel_Money/Home/Personal/AirtelMoney_tariffs
[analytics]:https://analytics.google.com


## [0.2.0][0.2.0] - 2016-04-24

Added:
Expand All @@ -30,7 +47,8 @@ Added:
This is the very first version.


[Unreleased]: https://github.com/forfuturellc/mmtc-ke/compare/v0.2.0...HEAD
[Unreleased]: https://github.com/forfuturellc/mmtc-ke/compare/v0.3.0...HEAD
[0.0.0]:https://github.com/forfuturellc/mmtc-ke/releases/tag/v0.0.0
[0.1.0]:https://github.com/forfuturellc/mmtc-ke/releases/tag/v0.1.0
[0.2.0]:https://github.com/forfuturellc/mmtc-ke/releases/tag/v0.2.0
[0.3.0]:https://github.com/forfuturellc/mmtc-ke/releases/tag/v0.3.0
3 changes: 2 additions & 1 deletion data/SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

|Aspect|Detail|
|------|------|
|Version|0.2|
|Version|0.3|
|Written by|GochoMugo <mugo@forfuture.co.ke>|

The data used in the application in its computations is fed through data files
Expand Down Expand Up @@ -34,6 +34,7 @@ A single data file can **only** hold one [Network](#type-network) object.
|---|----|-----------|
|spec|String|Specification version the file adheres to|
|date_updated|[Date](#type-date)|Date on which the data was last updated|
|url|String|A valid URL to the network's homepage, preferably to the page concerning money transactions|


<a name="type-transaction"></a>
Expand Down
100 changes: 100 additions & 0 deletions data/airtel-money.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"name": "airtel money",
"meta": {
"spec": "0.2",
"date_updated": "2016-06-16",
"url": "http://africa.airtel.com/wps/wcm/connect/africarevamp/Kenya/Airtel_Money"
},
"transactions": [
{
"name": "transfer",
"classes": [
{
"name": "registered users",
"ranges": [
{ "low": "-Infinity", "high": 49, "amount": -1 },
{ "low": 50, "high": 100, "amount": 0 },
{ "low": 101, "high": 1000, "amount": 0 },
{ "low": 1001, "high": 2500, "amount": 0 },
{ "low": 2501, "high": 5000, "amount": 0 },
{ "low": 5001, "high": 10000, "amount": 0 },
{ "low": 10001, "high": 20000, "amount": 0 },
{ "low": 20001, "high": 35000, "amount": 0 },
{ "low": 35001, "high": 50000, "amount": 0 },
{ "low": 50001, "high": 70000, "amount": 0 },
{ "low": 70001, "high": "+Infinity", "amount": -1 }
]
},
{
"name": "unregistered users",
"ranges": [
{ "low": "-Infinity", "high": 49, "amount": -1 },
{ "low": 50, "high": 100, "amount": 0 },
{ "low": 101, "high": 1000, "amount": 0 },
{ "low": 1001, "high": 2500, "amount": 0 },
{ "low": 2501, "high": 5000, "amount": 0 },
{ "low": 5001, "high": 10000, "amount": 0 },
{ "low": 10001, "high": 20000, "amount": 0 },
{ "low": 20001, "high": 35000, "amount": 0 },
{ "low": 35001, "high": 50000, "amount": 0 },
{ "low": 50001, "high": 70000, "amount": 0 },
{ "low": 70001, "high": "+Infinity", "amount": -1 }
]
}
]
},
{
"name": "withdrawal",
"classes": [
{
"name": "agent",
"ranges": [
{ "low": "-Infinity", "high": 49, "amount": -1 },
{ "low": 50, "high": 100, "amount": 9 },
{ "low": 101, "high": 1000, "amount": 25 },
{ "low": 1001, "high": 2500, "amount": 26 },
{ "low": 2501, "high": 5000, "amount": 45 },
{ "low": 5001, "high": 10000, "amount": 75 },
{ "low": 10001, "high": 20000, "amount": 145 },
{ "low": 20001, "high": 35000, "amount": 175 },
{ "low": 35001, "high": 50000, "amount": 270 },
{ "low": 50001, "high": 70000, "amount": 330 },
{ "low": 70001, "high": "+Infinity", "amount": -1 }
]
}
]
},
{
"name": "others",
"amount_input": false,
"classes": [
{
"name": "deposits",
"amount": 0
},
{
"name": "transaction reports",
"amount": 20
},
{
"name": "airtime",
"amount": 0
},
{
"name": "balance enquiry",
"amount": 0
},
{
"name": "Nickname Change",
"amount": 20
},
{
"name": "PIN change",
"amount": 20
}
]
}
],
"ussd_codes": [
]
}
13 changes: 7 additions & 6 deletions data/safaricom.json → data/mpesa.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "safaricom",
"name": "mpesa",
"meta": {
"spec": "0.2",
"date_updated": "2016-03-25"
"date_updated": "2016-06-16",
"url": "http://www.safaricom.co.ke/personal/m-pesa"
},
"transactions": [
{
Expand Down Expand Up @@ -107,17 +108,17 @@
}
],
"ussd_codes": [
{
"code": "*131#",
"description": "okoa jahazi"
},
{
"code": "*144#",
"description": "credit balance"
},
{
"code": "*544#",
"description": "internet bundles"
},
{
"code": "*131#",
"description": "okoa jahazi"
}
]
}
14 changes: 14 additions & 0 deletions docs/news.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<h2>Updated Terms and Conditions <small>2016-06-16</small></h2>

We have updated our Terms and Conditions to reflect our change
in **Privacy Policy**. This is to inform you that we are tracking
page views using [Google Analytics][analytics].

[analytics]:https://analytics.google.com


<h2>Terms and Conditions <small>2016-04-23</small></h2>

We have added a page detailing the Terms and Conditions, subject to
application users. Please read through it and understand. It can be
found at http://mmtc.forfuture.co.ke/tcs .
10 changes: 7 additions & 3 deletions web/_raw/tcs.md → docs/terms-and-conditions.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# terms and conditions

Your usage of this application, at http://mmtc.forfuture.co.ke, assumes your
Your usage of this application, at http://mmtc.forfuture.co.ke , assumes your
acceptance of these terms and conditions.

1. **Source Code**: The source code for this application is available on
Github at https://github.com/forfuturellc/mmtc-ke. Proceed to the code
Github at https://github.com/forfuturellc/mmtc-ke . Proceed to the code
repository for more information on licensing. Auditing of the source
code is highly welcome.
1. **Accuracy of Results**: We do **not** guarantee the accuracy of any
Expand All @@ -13,7 +13,8 @@ acceptance of these terms and conditions.
reasons such as software crashes and development work.
1. **Privacy Policy**: We do **not** use cookies or collect any personal
information, except that submitted directly in the various forms made
available in the application itself.
available in the application itself. However, we track page views using
[Google Analytics][analytics].
1. **Copyright**: Any brand names and trademarks used in the application
belong to the respective companies.
1. **Service Abuse**: Any actions you undertake against this application
Expand All @@ -22,3 +23,6 @@ acceptance of these terms and conditions.

For any copyright-related and other legal issues may be addressed to
Forfuture, LLC at we {at} forfuture {dot} co {dot} ke.


[analytics]:https://analytics.google.com
5 changes: 4 additions & 1 deletion engine/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ var showdown = require('showdown');


// module variables
var converter = new showdown.Converter();
var converter = new showdown.Converter({
simplifiedAutoLink: true,
tables: true,
});


/**
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "mmtc-ke",
"version": "0.2.0",
"version": "0.3.0",
"private": true,
"scripts": {
"build": "grunt build",
"postinstall": "bower install",
"start": "forever app.js",
"start-dev": "DEBUG=mmtc-ke:* nodemon app.js",
Expand Down
4 changes: 2 additions & 2 deletions routes/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,14 @@ router

// News page
router.get("/news", function(req, res, next) {
var filepath = path.resolve(__dirname, '../web/_raw/news.md');
var filepath = path.resolve(__dirname, '../docs/news.md');
return renderMarkdownPage(req, res, next, filepath);
});


// Terms and conditions
router.use('/tcs', function(req, res, next) {
var filepath = path.resolve(__dirname, '../web/_raw/tcs.md');
var filepath = path.resolve(__dirname, '../docs/terms-and-conditions.md');
return renderMarkdownPage(req, res, next, filepath);
});

Expand Down
12 changes: 12 additions & 0 deletions web/_includes/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,15 @@

{% set defaultJSURL = '/js/index.js' %}
<script src="{{ site.baseurl }}{{ JSURL or defaultJSURL }}"></script>

{# Google analytics #}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)
},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-67254993-3', 'auto');
ga('send', 'pageview');
</script>
8 changes: 6 additions & 2 deletions web/_includes/transaction.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
<input type="hidden" name="amount" value="5000" />
{% else %}
<div class="form-group row">
<label for="amount" class="col-xs-2">Amount</label>
<div class="col-xs-2 form-label">
<label for="amount">Amount</label>
</div>
<div class="col-xs-10">
<input type="number" name="amount" value="{{ body.amount or 5000 }}" class="form-control" >
</div>
Expand All @@ -22,7 +24,9 @@

<div class="form-group row">
<!-- Transaction transactor -->
<label for="transactor" class="col-xs-2">Transactor</label>
<div class="col-xs-2 form-label">
<label for="transactor">Transactor</label>
</div>
<div class="col-xs-10">
<select class="form-control select-class" name="transactor">
{% for class in transaction.classes %}
Expand Down
7 changes: 7 additions & 0 deletions web/_includes/ussd_codes.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{% if network.ussd_codes.length %}
<table class="table table-striped">
<thead>
<tr>
Expand All @@ -15,3 +16,9 @@
{% endfor %}
</tbody>
</table>
{% else %}
<div class="alert alert-sm alert-danger">
<strong>Sorry!</strong>
No USSD Codes found in our data.
</div>
{% endif %}
2 changes: 1 addition & 1 deletion web/_layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
{% include '_includes/head.html' %}
<body>
<body class="container">
{% include '_includes/header.html' %}

<div class="page-content">
Expand Down
7 changes: 0 additions & 7 deletions web/_raw/news.md

This file was deleted.

8 changes: 8 additions & 0 deletions web/_sass/_layout.sass
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
padding: 40px
ul
list-style: none
padding: 0
li
padding: 10px
margin: 0
Expand All @@ -14,3 +15,10 @@
background: #edb2b2
border-radius: 4px
color: black


.form-label
display: table-cell
vertical-align: middle
label
padding: 12px
7 changes: 3 additions & 4 deletions web/_sass/content.sass
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
text-align: left


.post
h2 small
color: grey
font-size: 12px
h2 small
color: grey
font-size: 12px
6 changes: 6 additions & 0 deletions web/_sass/network.sass
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,9 @@
// active table of ranges
.table-ranges.active
display: table

// meta information
.networks-meta
font-size: 12px
padding: 20px
text-align: center
Loading

0 comments on commit 410a56c

Please sign in to comment.