Skip to content

Commit

Permalink
Add documentation about requiring custom formatters.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Curry committed Jul 16, 2013
1 parent 612d9a4 commit 649d487
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .metrics
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,10 @@ $metric_file_loaded = true
# config.add_formatter(:yaml, "customreport.yml")
# config.add_formatter(MyCustomFormatter)
# end
#
# metric_fu will attempt to require a custom formatter by
# fully qualified name based on ruby search path,
# but you may find that you need to add a require above.
#
# For instance, to require a formatter in your app's lib directory:
# require './lib/my_custom_formatter.rb'
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,17 @@ that takes an options hash and responds to one or more notifications:
See [lib/metric_fu/formatter/](lib/metric_fu/formatter/) for examples.
metric_fu will attempt to require a custom formatter by
fully qualified name based on ruby search path. So if you include a custom
formatter as a gem in your Gemfile, you should be able to use it out of the box.
But you may find in certain cases that you need to add a require to
your .metrics configuration file.
For instance, to require a formatter in your app's lib directory:
```ruby
require './lib/my_custom_formatter.rb'
```
### Configuration
Expand Down

0 comments on commit 649d487

Please sign in to comment.