@@ -8,18 +8,20 @@ RailsStats mainly adds the ability to be run from outside the project in questio
8
8
9
9
### Run it outside Rails project
10
10
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:
13
12
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).
18
20
19
21
Then you can call it:
20
22
21
23
``` bash
22
- $ rake stats \[ /path/to/app/\]
24
+ $ rails_stats /path/to/app/
23
25
24
26
Directory: /path/to/app/
25
27
@@ -48,7 +50,7 @@ Directory: /path/to/app/
48
50
### Run it on many Rails engines
49
51
50
52
``` 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
52
54
```
53
55
54
56
### Within your Rails project
@@ -80,7 +82,7 @@ RailsStats adds more coverage than the default.
80
82
Here are some open source Rails projects and their output.
81
83
82
84
``` bash
83
- $ bundle exec rake stats[ /users/brian/examples/diaspora/]
85
+ $ rails_stats /users/brian/examples//users/brian/examples/diaspora
84
86
85
87
Directory: /users/brian/examples/diaspora
86
88
@@ -116,7 +118,7 @@ Directory: /users/brian/examples/diaspora
116
118
Code LOC: 19333 Test LOC: 17403 Code to Test Ratio: 1:0.9
117
119
118
120
119
- $ bundle exec rake stats[ /users/brian/examples/discourse]
121
+ $ rails_stats /users/brian/examples//users/brian/examples/ discourse
120
122
121
123
Directory: /users/brian/examples/discourse
122
124
@@ -149,7 +151,7 @@ Directory: /users/brian/examples/discourse
149
151
Code LOC: 59738 Test LOC: 28167 Code to Test Ratio: 1:0.5
150
152
151
153
152
- $ bundle exec rake stats[ /users/brian/examples/gitlabhq]
154
+ $ rails_stats /users/brian/examples//users/brian/examples/ gitlabhq
153
155
154
156
Directory: /users/brian/examples/gitlabhq
155
157
@@ -188,7 +190,7 @@ Directory: /users/brian/examples/gitlabhq
188
190
Code LOC: 20039 Test LOC: 24857 Code to Test Ratio: 1:1.2
189
191
190
192
191
- $ bundle exec rake stats[ /users/brian/examples/redmine/]
193
+ $ rails_stats /users/brian/examples//users/brian/examples/ redmine/
192
194
193
195
Directory: /users/brian/examples/redmine
194
196
@@ -212,7 +214,7 @@ Directory: /users/brian/examples/redmine
212
214
Code LOC: 31437 Test LOC: 42912 Code to Test Ratio: 1:1.4
213
215
214
216
215
- $ bundle exec rake stats[ /users/brian/examples/refinerycms]
217
+ $ rails_stats /users/brian/examples//users/brian/examples/ refinerycms
216
218
217
219
Directory: /users/brian/examples/refinerycms
218
220
@@ -240,7 +242,7 @@ Directory: /users/brian/examples/refinerycms
240
242
Code LOC: 5447 Test LOC: 5219 Code to Test Ratio: 1:1.0
241
243
242
244
243
- $ bundle exec rake stats[ /users/brian/examples/spree]
245
+ $ rails_stats /users/brian/examples//users/brian/examples/ spree
244
246
245
247
Directory: /users/brian/examples/spree
246
248
0 commit comments