@@ -8,18 +8,20 @@ RailsStats mainly adds the ability to be run from outside the project in questio
88
99### Run it outside Rails project
1010
11- You will need a ` Rakefile ` in the directory where you call ` rake ` and you will
12- need to require ` rails_stats ` :
11+ Install the gem globally with:
1312
14- ``` ruby
15- # Rakefile
16- require " rails_stats"
17- ```
13+ ` gem install rails_stats `
14+
15+ You can then run:
16+
17+ ` rails_stats PATH_TO_APP [FORMAT] `
18+
19+ (the format is optional and defaults to the console formatter).
1820
1921Then you can call it:
2022
2123``` bash
22- $ rake stats \[ /path/to/app/\]
24+ $ rails_stats /path/to/app/
2325
2426Directory: /path/to/app/
2527
@@ -48,7 +50,7 @@ Directory: /path/to/app/
4850### Run it on many Rails engines
4951
5052``` bash
51- $ for dir in /path/to/many/engines/* /; do bundle exec rake stats[ $dir ] ; done
53+ $ for dir in /path/to/many/engines/* /; do rails_stats /users/brian/examples/ $dir ; done
5254```
5355
5456### Within your Rails project
@@ -80,7 +82,7 @@ RailsStats adds more coverage than the default.
8082Here are some open source Rails projects and their output.
8183
8284``` bash
83- $ bundle exec rake stats[ /users/brian/examples/diaspora/]
85+ $ rails_stats /users/brian/examples//users/brian/examples/diaspora
8486
8587Directory: /users/brian/examples/diaspora
8688
@@ -116,7 +118,7 @@ Directory: /users/brian/examples/diaspora
116118 Code LOC: 19333 Test LOC: 17403 Code to Test Ratio: 1:0.9
117119
118120
119- $ bundle exec rake stats[ /users/brian/examples/discourse]
121+ $ rails_stats /users/brian/examples//users/brian/examples/ discourse
120122
121123Directory: /users/brian/examples/discourse
122124
@@ -149,7 +151,7 @@ Directory: /users/brian/examples/discourse
149151 Code LOC: 59738 Test LOC: 28167 Code to Test Ratio: 1:0.5
150152
151153
152- $ bundle exec rake stats[ /users/brian/examples/gitlabhq]
154+ $ rails_stats /users/brian/examples//users/brian/examples/ gitlabhq
153155
154156Directory: /users/brian/examples/gitlabhq
155157
@@ -188,7 +190,7 @@ Directory: /users/brian/examples/gitlabhq
188190 Code LOC: 20039 Test LOC: 24857 Code to Test Ratio: 1:1.2
189191
190192
191- $ bundle exec rake stats[ /users/brian/examples/redmine/]
193+ $ rails_stats /users/brian/examples//users/brian/examples/ redmine/
192194
193195Directory: /users/brian/examples/redmine
194196
@@ -212,7 +214,7 @@ Directory: /users/brian/examples/redmine
212214 Code LOC: 31437 Test LOC: 42912 Code to Test Ratio: 1:1.4
213215
214216
215- $ bundle exec rake stats[ /users/brian/examples/refinerycms]
217+ $ rails_stats /users/brian/examples//users/brian/examples/ refinerycms
216218
217219Directory: /users/brian/examples/refinerycms
218220
@@ -240,7 +242,7 @@ Directory: /users/brian/examples/refinerycms
240242 Code LOC: 5447 Test LOC: 5219 Code to Test Ratio: 1:1.0
241243
242244
243- $ bundle exec rake stats[ /users/brian/examples/spree]
245+ $ rails_stats /users/brian/examples//users/brian/examples/ spree
244246
245247Directory: /users/brian/examples/spree
246248
0 commit comments