From bce5b32feae048968e2b3dfa70e62bb327230b64 Mon Sep 17 00:00:00 2001 From: Nathan Long Date: Fri, 18 Jan 2013 18:12:26 -0500 Subject: [PATCH] More documentation --- CONTRIBUTING.md | 11 +++++++++++ README.markdown | 25 ++++++++++++------------- 2 files changed, 23 insertions(+), 13 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..4e5b054 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,11 @@ +# Contributing to Dossier + +All contributions to Dossier must come well-tested. + +## Adapters + +Dossier currently has `Dossier::Adapter::ActiveRecord`, which allows it to get an ActiveRecord connection and use it for escaping queries, and executing them. It wraps the returned result object in a `Dossier::Adapter::ActiveRecord::Result`, which simply provides a standard way of getting headers and rows. + +If you'd like to add the ability to use a different ORM's connections, you'd need to add a new adapter class and a new adapter result class. + +You'd also need to update `Client#loaded_orms` to check for the presence of your ORM. diff --git a/README.markdown b/README.markdown index f82746d..2a296b1 100644 --- a/README.markdown +++ b/README.markdown @@ -165,6 +165,10 @@ end To see a report with all the bells and whistles, check out `spec/support/reports/employee_report.rb` or other reports in `spec/support/reports`. +## Compatibility + +Dossier currently supports all databases supported by ActiveRecord; it comes with `Dossier::Adapter::ActiveRecord`, which uses ActiveRecord connections for escaping and executing queries. However, as the `Dossier::Adapter` namespace implies, it was written to allow for other connection adapters. See `CONTRIBUTING.md` if you'd like to add one. + ## Running the Tests Note: when you run the tests, Dossier will **make and/or truncate** some tables in the `dossier_test` database. @@ -175,19 +179,14 @@ Note: when you run the tests, Dossier will **make and/or truncate** some tables - `cp spec/fixtures/db/sqlite3.yml{.example,}` - `rspec spec` -## TODO - -### Features - -- Support more orm adapters - -### Moar Dokumentationz pleaze +## Moar Dokumentationz pleaze -- Document how Dossier uses ORM adapters to connect to databases, currently only AR's are used. +- How Dossier uses ORM adapters to connect to databases, currently only AR's are used. - Document using hooks and what methods are available in them -- callbacks - - stored procedures - - reformat results -- linking to reports - - linking to formats +- Callbacks, eg: + - Stored procedures + - Reformat results +- Linking + - To other reports + - To other formats - Extending the formatter