Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

prepare some files for public release

  • Loading branch information...
commit 0ff75e1f581bbfafb7b4cea115b0a7ba5ed43c2a 1 parent 085cea0
@cies cies authored
View
58 INSTALL.cies
@@ -1,58 +0,0 @@
-INSTALLING
-==========
-
-This is how I, Cies Breijs, got the new-layout branch of Mostfit to install and run. I use RVM and gemsets to do so. This is not a copy-paste script for a clean install ubuntu -- merely a not to self for what was needed to do the trick on my machine.
-
-
-
-
-git clone git@git.mostfit.in:mostfit.git
-git co new-layout
-
-rvm use 1.8.7 # install it if you haven't got it already
-rvm gemset create mostfit-new-layout
-rvm 1.8.7@mostfit-new-layout
-rvm rubygems 1.4.2
-
-# found this in install instructions
-gem install thor -v 0.9.9
-gem install dm-observer -v 0.10.1
-gem install uuid pdf-writer mongrel log4r
-
-sudo apt-get install libmysqlclient16-dev mysql-server
-
-thor merb:gem:redeploy
-thor merb:gem:install
-
-gem install uuid pdf-writer mongrel log4r i18n-translators-tools \
- i18n-translators-tools google-spreadsheet-ruby i18n \
- fastercsv rgettext roo
-
-cp config/example.database.yml config/database.yml
-vi config/database.yml
-
-bin/merb
-
-
-## SECOND ATTEMPT
-
-I heard from Sid that I was doing it wrong, so here my second attempt.
-
-
-
-git clone git@git.mostfit.in:mostfit.git
-git co new-layout
-
-rvm use 1.8.7 # install it if you haven't got it already
-rvm gemset create mostfit-new-layout
-rvm 1.8.7@mostfit-new-layout
-rvm rubygems 1.4.2
-
-(cd gems/cache; gem install --local * --no-ri --no-rdoc)
-# got errors: pdf-writer wants color, and roo wants spreadsheet, google-spreadsheet-ruby wants hpricot
-
-cp config/example.database.yml config/database.yml
-vi config/database.yml
-
-bin/merb
-
View
69 INSTALL.md
@@ -0,0 +1,69 @@
+INSTALLING
+==========
+
+This document describes how to quickly install Mostfit (the branch that you are looking at).
+
+Both `rvm` and `gemsets` are employed to do so.
+
+This is not a copy-paste script for a clean install ubuntu -- YMMV.
+
+
+
+## SECOND ATTEMPT
+
+I heard that I was doing it wrong, so here my second attempt. This seems to work nicely.
+
+
+ git clone git@git.mostfit.in:mostfit.git
+ git co new-layout
+
+ rvm use 1.8.7 # install it if you haven't got it already
+ rvm gemset create mostfit-new-layout
+ rvm 1.8.7@mostfit-new-layout
+ rvm rubygems 1.4.2
+
+ (cd gems/cache; gem install --local * --no-ri --no-rdoc)
+ # got errors: pdf-writer wants color, and roo wants spreadsheet, google-spreadsheet-ruby wants hpricot
+
+ cp config/example.database.yml config/database.yml
+ vi config/database.yml
+
+ bin/merb
+
+
+
+
+
+## FIRST ATTEMPT
+
+Here I use thor, which is not the most ideal method...
+
+
+ git clone git@git.mostfit.in:mostfit.git
+ git co new-layout
+
+ rvm use 1.8.7 # install it if you haven't got it already
+ rvm gemset create mostfit-new-layout
+ rvm 1.8.7@mostfit-new-layout
+ rvm rubygems 1.4.2
+
+ # found this in install instructions
+ gem install thor -v 0.9.9
+ gem install dm-observer -v 0.10.1
+ gem install uuid pdf-writer mongrel log4r
+
+ sudo apt-get install libmysqlclient16-dev mysql-server
+
+ thor merb:gem:redeploy
+ thor merb:gem:install
+
+ gem install uuid pdf-writer mongrel log4r i18n-translators-tools \
+ i18n-translators-tools google-spreadsheet-ruby i18n \
+ fastercsv rgettext roo
+
+ cp config/example.database.yml config/database.yml
+ vi config/database.yml
+
+ bin/merb
+
+
View
0  COPYING → LICENSE.AGPLv3
File renamed without changes
View
38 NAMING.md
@@ -24,13 +24,13 @@ Some inconsistently named methods in models/modules:
Consistent id columns
---------------------
-We're not being terribly consistent with association naming when we use non-standard indexes, specifically when associating staff members a managers or "updated_by" type associations. If we want to make clear the difference between changes made by managers, staff-members or users the association should reflect this as well as the id column naming. (e.g either created_by_user and created_by_user_id OR created_by and created_by_id, not a combination.)
+We're not being terribly consistent with association naming when we use non-standard indexes, specifically when associating staff members a managers or `updated_by` type associations. If we want to make clear the difference between changes made by managers, staff-members or users the association should reflect this as well as the id column naming. (e.g either `created_by_user` and `created_by_user_id` OR `created_by` and `created_by_id`, not a combination.)
-Considering we often use many of these methods on models I recommend we go with the "full" naming, (e.g. created_by_user, validated_by_staff_member) to avoid confusion as to what model we're referring to.
+Considering we often use many of these methods on models I recommend we go with the "full" naming, (e.g. `created_by_user`, `validated_by_staff_member`) to avoid confusion as to what model we're referring to.
-I recommend we stick to 'standard' association naming and using :child_key options as little as possible.
+I recommend we stick to 'standard' association naming and using `:child_key` options as little as possible.
-Some examples listed below (a simple grep will show all). In some cases the naming is ok but use of :child_key is superfluous.
+Some examples listed below (a simple grep will show all). In some cases the naming is ok but use of `:child_key` is superfluous.
* "Good" uses:
AuditItem belongs_to :assigned_to, :model => StaffMember
@@ -50,19 +50,19 @@ Dates
There are also many cases of models being approved, disbursed, deleted, etc. on certain dates. Let's set up a consistent naming scheme for these attributes. The Loan model for example has these date attributes:
-* scheduled_disbursal_date
-* scheduled_first_payment_date
-* applied_on
-* approved_on
-* rejected_on
-* disbursal_date
-* written_off_on
-* suggested_written_off_on
-* write_off_rejected_on
-* validated_on
-* preclosed_on
+* `scheduled_disbursal_date`
+* `scheduled_first_payment_date`
+* `applied_on`
+* `approved_on`
+* `rejected_on`
+* `disbursal_date`
+* `written_off_on`
+* `suggested_written_off_on`
+* `write_off_rejected_on`
+* `validated_on`
+* `preclosed_on`
-As you can see the naming varies between _on and _date. I would recommend sticking with _on for dates and _at for times both because it's the de-facto standard and because most existing attributes already comply.
+As you can see the naming varies between `_on` and `_date`. I would recommend sticking with `_on` for dates and `_at` for times both because it's the de-facto standard and because most existing attributes already comply.
Hand-made associations
@@ -98,15 +98,15 @@ Other models with similar associations:
Nullable
--------
-Not so much a naming issue, but in a number of places we use :nullable => false, which was deprecated in DM 0.10.2 in favor of :required => true
+Not so much a naming issue, but in a number of places we use `:nullable => false`, which was deprecated in DM 0.10.2 in favor of :required => true
-We also have a bunch of places where :nullable => false is set and later validates_presence.
+We also have a bunch of places where `:nullable => false` is set and later `validates_presence`.
Constants
---------
-We have a large number of constants in config/constants.rb ripe for renaming. I don't think we need examples here as they are quite obvious, but Types and Methods (used only in the Bookmark model) for starters.
+We have a large number of constants in `config/constants.rb` ripe for renaming. I don't think we need examples here as they are quite obvious, but Types and Methods (used only in the Bookmark model) for starters.
Outdated views
View
8 README.md
@@ -1,18 +1,21 @@
Mostfit: an MIS for MFIs
========================
+
This software is build using the [Ruby](http://ruby-lang.org) programming language, on top of the Merb web framework and the DataMapper ORM. Mostfit takes a minimal approach, it basically creates the application in the most generic form, yet fully usable for the needs of our clients and beyond. You can [see our demo](http://mostfit.intellecap.in).
## Philosophy
-A dead-simple, easy-to-use and easy-to-adapt, webbased MIS for MFIs with a decent feature set.
+A dead-simple, easy-to-use and easy-to-adapt, web-based MIS for MFIs with a decent feature set.
Many software has been written to accomplish this. Not much was written well. Most of it is closed source, so suffers from limited exposure and often stalled development. We try to do is right by creating just enough.
## Installation
+See the `INSTALL.md` file first.
+
Edit `config/dependencies.rb` and make sure you have the correct version of the gems required. Edit `config/example.database.yml`, update the db name, username and password to reflect your database settings and save it as `config/database.yml`. Then run:
rake mock:load_demo
@@ -40,7 +43,8 @@ Which brings us to our goals of sharing costs, being flexible and delivering the
## Copyright and License
-Copyright (c) 2009-2011 Intellecap.
+Copyright (c) 2009-2012 Intellecap/ISTPL.
Mostfit is available under the GNU AFFERO GENERAL PUBLIC LICENSE version 3 or (at your option) any later version. You should have received a file named COPYING along with Mostfit. COPYING is the complete text of the license. If you did not receive this file you can find it on [the GNU website](http://www.gnu.org/licenses).
+
View
30 RULES.md
@@ -0,0 +1,30 @@
+The Mostfit Business Rules Engine
+=================================
+
+It consists of:
+
+ 1. Main Files - `lib/rules.rb`
+ 2. View - `app/views/rules/`
+ 3. Controller - `app/controllers/rules.rb`
+ 4. Model - `app/models/rule.rb`
+
+This rules engine can handle multiple conditions (connected with `and`
+and `or` operators) simultaneously and since the rules are compiled to
+respective models (using validates_with_method of `datamapper`), it produces
+minimal overhead.
+
+The rules can be manipulated in run-time without re-booting the server.
+
+
+## Internals
+
+Internally, the rules engine uses BasicCondition(B) class (in lib/rules.rb) to represent a simple condition(S), a complex condition(C1) is either
+C1 = [:not, C2]
+or
+C1 = [:and, C2, C3]
+or
+C1 = [:or. C2, C3]
+or
+C1 = [is_basic_condition = true, B]
+
+
View
9 conversion notes
@@ -1,9 +0,0 @@
-Loan Product 13 has to be unchecked the "installment dates are center meeting days"
-Loan Product 16 has to be unchecked the "installment dates are center meeting days"
-Loan Product 24 has to be unchecked the "installment dates are center meeting days"
-Loan Product 33 has to be unchecked the "installment dates are center meeting days"
-
-Center 1642 meeting date change has to be adjusted to the following wednsday
-Center 1675 meeting date change has to be adjusted to the following wednsday
-Center 1676 meeting date change has to be adjusted to the following wednsday
-Center 1120,1121,1122 last center meeting day has to be bumpeed by 1 day
View
BIN  public/mostfit-20090204.tar.gz
Binary file not shown
View
25 rules.txt
@@ -1,25 +0,0 @@
-Rules Engine of MOSTFIT
------------------------
-
-It consists of
-1) Main Files - lib/rules.rb
-2) View - app/views/rules/
-3) Controller - app/controllers/rules.rb
-4) Model - app/models/rule.rb
-
-This rule engine can handle multiple conditions (connected with and/or) simultaneusly and since the rules are compiled to respective models (using validates_with_method of datamapper), it produces
-lowest overheads.
-The rules can be manipulated in run-time without re-booting the server.
-
-Internals
----------
-Internally, the rules engine uses BasicCondition(B) class (in lib/rules.rb) to represent a simple condition(S), a complex condition(C1) is either
-C1 = [:not, C2]
-or
-C1 = [:and, C2, C3]
-or
-C1 = [:or. C2, C3]
-or
-C1 = [is_basic_condition = true, B]
-
-
Please sign in to comment.
Something went wrong with that request. Please try again.