Skip to content

Commit 70218b2

Browse files
authored
Merge pull request #330 from metricfu/improve-readme
Improve documentation in README file
2 parents e792034 + a471319 commit 70218b2

File tree

1 file changed

+44
-78
lines changed

1 file changed

+44
-78
lines changed

README.md

+44-78
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,34 @@
1-
# MetricFu [![Gem Version](https://badge.fury.io/rb/metric_fu.svg)](http://badge.fury.io/rb/metric_fu) [![Test](https://github.com/metricfu/metric_fu/actions/workflows/ruby.yml/badge.svg)](https://github.com/metricfu/metric_fu/actions/workflows/ruby.yml)
1+
# MetricFu [![Gem Version](https://badge.fury.io/rb/metric_fu.svg)](http://badge.fury.io/rb/metric_fu) [![Test](https://github.com/metricfu/metric_fu/actions/workflows/ruby.yml/badge.svg)](https://github.com/metricfu/metric_fu/actions/workflows/ruby.yml) [![Join the chat at https://gitter.im/metricfu/metric_fu](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/metricfu/metric_fu?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Code Climate](https://codeclimate.com/github/metricfu/metric_fu.svg)](https://codeclimate.com/github/metricfu/metric_fu) [![Inline docs](http://inch-ci.org/github/metricfu/metric_fu.svg)](http://inch-ci.org/github/metricfu/metric_fu)
22

3-
[![Join the chat at https://gitter.im/metricfu/metric_fu](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/metricfu/metric_fu?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
3+
[MetricFu](http://rdoc.info/github/metricfu/metric_fu/) is a set of tools to provide reports that show which parts of your code might need extra work.
44

5-
[![Code Climate](https://codeclimate.com/github/metricfu/metric_fu.svg)](https://codeclimate.com/github/metricfu/metric_fu) [![Inline docs](http://inch-ci.org/github/metricfu/metric_fu.svg)](http://inch-ci.org/github/metricfu/metric_fu)
5+
Metrics supported: [Cane](http://github.com/square/cane), [Churn](http://github.com/danmayer/churn), [Flog](https://github.com/seattlerb/flog), [Flay](https://github.com/seattlerb/flay), [Reek](https://github.com/troessner/reek), [Roodi](https://github.com/roodi/roodi), [Saikuro](https://github.com/metricfu/Saikuro), [Code Statistics](https://github.com/bf4/code_metrics), [Hotspots](https://github.com/chiku/hotspots), [SimpleCov](https://github.com/simplecov-ruby/simplecov), [Rcov](https://github.com/relevance/rcov), [Rails Best Practices](https://github.com/flyerhzm/rails_best_practices) (Rails-only).
66

7-
[Rdoc](http://rdoc.info/github/metricfu/metric_fu/)
7+
## Installation
88

9-
## Maintenance
9+
Run:
1010

11-
MetricFu needs maintainers. If you are up for helping out, please left a note in [issue 280]( https://github.com/metricfu/metric_fu/issues/280). MetricFu is free and open source code that belongs to everyone. Benjamin (@bf4) hasn't been working on MetricFu for a while, which is a great opportunity for you to step up!
11+
```
12+
$ gem install metric_fu
13+
```
1214

13-
## Installation
15+
Or add this line to your application's Gemfile:
16+
17+
```ruby
18+
gem 'metric_fu'
19+
```
1420

15-
gem install metric_fu
21+
And then execute:
1622

17-
If you have trouble installing the gem
18-
- try adding metric_fu to your Gemfile and bundling.
19-
- file a ticket on the issues page.
23+
```
24+
$ bundle
25+
```
26+
27+
### Considerations
2028

2129
MetricFu is [cryptographically signed](http://guides.rubygems.org/security/).
2230
To be sure the gem you install hasn't been tampered with:
31+
2332
- Add my public key (if you haven't already) as a trusted certificate `gem cert --add <(curl -Ls https://raw.github.com/metricfu/metric_fu/master/certs/bf4.pem)`
2433
- `gem install metric_fu -P MediumSecurity`
2534

@@ -29,29 +38,15 @@ This is necessary because not all of MetricFu's dependencies are signed, so we c
2938

3039
## Usage
3140

32-
From your application root. Running via Rake is still supported.
41+
From your application root, run:
3342

34-
```sh
35-
metric_fu
43+
```
44+
$ metric_fu
3645
```
3746

38-
See:
39-
- `metric_fu --help` for more options
40-
- Documentation and Compatibility below
41-
- There is also a [wiki page of user-maintained usage information](https://github.com/metricfu/metric_fu/wiki#usage)
42-
43-
## Contact
44-
45-
*Code and Bug Reports*
46-
47-
* [Issue Tracker](http://github.com/metricfu/metric_fu/issues)
48-
* See [CONTRIBUTING](https://github.com/metricfu/metric_fu/blob/master/CONTRIBUTING.md) for how to contribute
49-
50-
*Questions, Problems, Suggestions, etc.*
51-
52-
* [Google Group](https://groups.google.com/forum/#!forum/metric_fu)
47+
To see available options run `metric_fu --help`
5348

54-
## Documentation
49+
## Configuration
5550

5651
MetricFu will attempt to load configuration data from a
5752
`.metrics` file, if present in your repository root.
@@ -171,7 +166,6 @@ metric_fu --out $HOME/tmp/metrics # outputs to $HOME/tmp/metrics
171166

172167
You can specify a different formatter at the command line by referencing a built-in formatter or providing the fully-qualified name of a custom formatter.
173168

174-
175169
```sh
176170
metric_fu --format yaml --out custom_report.yml
177171
```
@@ -214,7 +208,7 @@ Then
214208
metric_fu --format MyCustomFormatter
215209
```
216210
217-
See [lib/metric_fu/formatter/](lib/metric_fu/formatter/) for examples.
211+
See [lib/metric_fu/formatter](https://github.com/metricfu/metric_fu/tree/main/lib/metric_fu/formatter) for examples.
218212
219213
MetricFu will attempt to require a custom formatter by
220214
fully qualified name based on ruby search path. So if you include a custom
@@ -224,76 +218,48 @@ your .metrics configuration file.
224218
225219
For instance, to require a formatter in your app's lib directory `require './lib/my_custom_formatter.rb'`
226220
227-
### Configure Graph Engine
221+
### Configure Graph Engine
228222
229223
By default, MetricFu uses the Bluff (JavaScript) graph engine.
230224
231225
```ruby
232226
MetricFu.configuration.configure_graph_engine(:bluff)
233227
```
234228
235-
But it you may also use the [Highcharts JS library](http://shop.highsoft.com/highcharts.html)
229+
But you can also use the [Highcharts JS library](https://shop.highsoft.com/)
236230
237231
```ruby
238232
MetricFu.configuration.configure_graph_engine(:highcharts)
239233
```
240234
241-
Notice: There was previously a :gchart option.
235+
Notice: There was previously a `:gchart` option.
242236
It was not properly deprecated in the 4.x series.
243237
244238
## Common problems / debugging
245239
246240
- ['ArgumentError; message invalid byte sequence in US-ASCII'](https://github.com/metricfu/metric_fu/issues/215) may be caused by having a default external encoding that is not UTF-8. You can see this in the output of `metric_fu --debug`
247-
- OSX: Ensure you have set `LANG=en_US.UTF-8` and `LC_ALL=en_US.UTF-8`. You can add these to your `~/.profile`.
241+
- OSX: Ensure you have set `LANG=en_US.UTF-8` and `LC_ALL=en_US.UTF-8`. You can add these to your `~/.profile`.
248242
249243
## Compatibility
250244
251-
* It is currently testing on MRI (>= 1.9.3), JRuby (19 mode), and Rubinius (19 mode). Ruby 1.8 is no longer supported.
252-
253-
* For 1.8.7 support, see version 3.0.0 for partial support, or 2.1.3.7.18.1 (where [Semantic Versioning](http://semver.org/) goes to die)
254-
255-
* MetricFu no longer runs any of the analyzed code. For code coverage, you may use a formatter as documented above
256-
257-
* The Cane, Flog, and Rails Best Practices metrics are disabled when Ripper is not available
258-
259-
### Historical
260-
261-
There is some useful-but-out-of-date documentation about configuring metric_fu at http://metricfu.github.io/metric_fu and a change log in the the HISTORY file.
262-
263-
## Resources:
264-
265-
This is the official repository for metric_fu. The original repository by Jake Scruggs at [https://github.com/jscruggs/metric_fu](https://github.com/jscruggs/metric_fu) has been deprecated.
266-
267-
* [Official Repository](http://github.com/metricfu/metric_fu)
268-
* [Outdated Homepage](http://metricfu.github.io/metric_fu/)
269-
* [List of code tools](https://github.com/metricfu/metric_fu/wiki/Code-Tools)
270-
* [Roadmap](https://github.com/metricfu/metric_fu/wiki/Roadmap)
245+
- It is currently testing on MRI (>= 1.9.3), JRuby (19 mode), and Rubinius (19 mode). Ruby 1.8 is no longer supported.
271246
272-
### Metrics
247+
- For 1.8.7 support, see version 3.0.0 for partial support, or 2.1.3.7.18.1 (where [Semantic Versioning](http://semver.org/) goes to die)
273248
274-
* [Cane](https://rubygems.org/gems/cane), [Source](http://github.com/square/cane)
275-
* [Churn](https://rubygems.org/gems/churn), [Source](http://github.com/danmayer/churn)
276-
* [Flog](https://rubygems.org/gems/flog), [Source](https://github.com/seattlerb/flog)
277-
* [Flay](https://rubygems.org/gems/flay), [Source](https://github.com/seattlerb/flay)
278-
* [Reek](https://rubygems.org/gems/reek) [Source](https://github.com/troessner/reek)
279-
* [Roodi](https://rubygems.org/gems/roodi), [Source](https://github.com/roodi/roodi)
280-
* [Saikuro](https://rubygems.org/gems/metric_fu-Saikuro), [Source](https://github.com/metricfu/Saikuro)
281-
* [Code Statistics](https://rubygems.org/gems/code_metrics), [Source](https://github.com/bf4/code_metrics)
282-
* Rails-only
283-
* [Rails Best Practices](https://rubygems.org/gems/rails_best_practices), [Source](https://github.com/railsbp/rails_best_practices)
284-
* Test Coverage
285-
* 1.9: [SimpleCov](http://rubygems.org/gems/simplecov) and SimpleCov::Formatter::MetricFu
286-
* 1.8: [Rcov](http://rubygems.org/gems/rcov)
287-
* Hotspots (a meta-metric of the above)
249+
- MetricFu no longer runs any of the analyzed code. For code coverage, you may use a formatter as documented above
288250
251+
- The Cane, Flog, and Rails Best Practices metrics are disabled when Ripper is not available
289252
290-
### Original Resources:
253+
## Contributing
291254
292-
* Github: http://github.com/jscruggs/metric_fu
293-
* Issue Tracker: http://github.com/jscruggs/metric_fu/issues
294-
* Historical Homepage: http://metric-fu.rubyforge.org/
295-
* Jake's Blog: http://jakescruggs.blogspot.com/
296-
* Jake's Post about stepping down: http://jakescruggs.blogspot.com/2012/08/why-i-abandoned-metricfu.html
255+
Take a look at our [contributing guide](https://github.com/metricfu/metric_fu/blob/master/CONTRIBUTING.md).
256+
Bug reports and pull requests are welcome on GitHub at [https://github.com/metricfu/metric_fu](https://github.com/metricfu/metric_fu). This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Code of Conduct](https://www.contributor-covenant.org/version/1/4/code-of-conduct/).
297257
258+
## Resources
298259
299-
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/metricfu/metric_fu/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
260+
- [Wiki](https://github.com/metricfu/metric_fu/wiki)
261+
- [List of code tools](https://github.com/metricfu/metric_fu/wiki/Code-Tools)
262+
- [Roadmap](https://github.com/metricfu/metric_fu/wiki/Roadmap)
263+
- [Google Group](https://groups.google.com/forum/#!forum/metric_fu)
264+
- [Original repository by Jake Scruggs](https://github.com/jscruggs/metric_fu)
265+
- [Jake's post about stepping down](http://jakescruggs.blogspot.com/2012/08/why-i-abandoned-metricfu.html)

0 commit comments

Comments
 (0)