Get stats on your Ruby on Rails code Dapatkan statistik pada Ruby on Rails kode
Run this command from a command prompt inside your project directory: Jalankan perintah ini dari prompt perintah di dalam direktori proyek Anda:
rake stats menyapu stats
You should see output that looks similar to this, although the lines of code will probably be different, since this is just a test project. Anda seharusnya melihat output seperti ini, meskipun baris kode mungkin akan berbeda, karena ini hanyalah sebuah proyek uji. =) =)
+----------------------+-------+-------+---------+---------+-----+-------+ +----------------------+-------+-------+---------+ ---------+-----+-------+ | Name | Lines | LOC | Classes | Methods | M/C | LOC/M | | Name | Lines | LOC | Classes | Methods | M / C | LOC / M | +----------------------+-------+-------+---------+---------+-----+-------+ +----------------------+-------+-------+---------+ ---------+-----+-------+ | Helpers | 18 | 17 | 0 | 1 | 0 | 15 | | Helpers | 18 | 17 | 0 | 1 | 0 | 15 | | Controllers | 190 | 162 | 5 | 23 | 4 | 5 | | Controller | 190 | 162 | 5 | 23 | 4 | 5 | | Components | 0 | 0 | 0 | 0 | 0 | 0 | | Components | 0 | 0 | 0 | 0 | 0 | 0 | | Functional tests | 169 | 125 | 8 | 23 | 2 | 3 | | Fungsional tes | 169 | 125 | 8 | 23 | 2 | 3 | | Models | 156 | 129 | 6 | 18 | 3 | 5 | | Models | 156 | 129 | 6 | 18 | 3 | 5 | | Unit tests | 110 | 85 | 5 | 12 | 2 | 5 | | Unit Tes | 110 | 85 | 5 | 12 | 2 | 5 | | Libraries | 0 | 0 | 0 | 0 | 0 | 0 | | Library | 0 | 0 | 0 | 0 | 0 | 0 | | Integration tests | 44 | 35 | 1 | 2 | 2 | 15 | | Integrasi tes | 44 | 35 | 1 | 2 | 2 | 15 | +----------------------+-------+-------+---------+---------+-----+-------+ +----------------------+-------+-------+---------+ ---------+-----+-------+ | Total | 687 | 553 | 25 | 79 | 3 | 5 | | Total | 687 | 553 | 25 | 79 | 3 | 5 | +----------------------+-------+-------+---------+---------+-----+-------+ +----------------------+-------+-------+---------+ ---------+-----+-------+ Code LOC: 308 Test LOC: 245 Code to Test Ratio: 1:0.8 Kode LOC: 308 Test LOC: 245 Code to Test Ratio: 1:0.8

Daily Email Updates Harian Email Pembaharuan
You can get our how-to articles in your inbox each day for free. Anda bisa mendapatkan kita bagaimana-untuk artikel dalam kotak masuk Anda setiap hari secara gratis. Just enter your name and email below: Cukup masukkan nama dan email Anda di bawah ini:


