Skip to content

Commit

Permalink
More documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Long committed Jan 18, 2013
1 parent 4672249 commit bce5b32
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 13 deletions.
11 changes: 11 additions & 0 deletions 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.
25 changes: 12 additions & 13 deletions README.markdown
Expand Up @@ -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.
Expand All @@ -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

0 comments on commit bce5b32

Please sign in to comment.