ECパッケージ対決 エレコマ VS EC-Rider

エレコマ

# rake stats
(in /Users/sogo/code/rails/elecoma-1.0.3)
+----------------------+-------+-------+---------+---------+-----+-------+
| Name                 | Lines |   LOC | Classes | Methods | M/C | LOC/M |
+----------------------+-------+-------+---------+---------+-----+-------+
| Controllers          |  4660 |  3870 |      43 |     277 |   6 |    11 |
| Helpers              |  1208 |  1018 |       0 |      88 |   0 |     9 |
| Models               |  4740 |  3955 |      68 |     262 |   3 |    13 |
| Libraries            |  1288 |  1101 |      19 |      91 |   4 |    10 |
| Integration tests    |     0 |     0 |       0 |       0 |   0 |     0 |
| Functional tests     |     0 |     0 |       0 |       0 |   0 |     0 |
| Unit tests           |     8 |     6 |       1 |       1 |   1 |     4 |
| Model specs          |  4898 |  4010 |       2 |      11 |   5 |   362 |
| View specs           |     0 |     0 |       0 |       0 |   0 |     0 |
| Controller specs     |  6432 |  5243 |       1 |       5 |   5 |  1046 |
| Helper specs         |   500 |   337 |       0 |       0 |   0 |     0 |
+----------------------+-------+-------+---------+---------+-----+-------+
| Total                | 23734 | 19540 |     134 |     735 |   5 |    24 |
+----------------------+-------+-------+---------+---------+-----+-------+
  Code LOC: 9944     Test LOC: 9596     Code to Test Ratio: 1:1.0

EC-Rider

# cd ec_front 
# rake stats
(in /Users/sogo/code/rails/ecrider-0.8.1/ec_front)
rake gems:install to use schema_comments tasks
+----------------------+-------+-------+---------+---------+-----+-------+
| Name                 | Lines |   LOC | Classes | Methods | M/C | LOC/M |
+----------------------+-------+-------+---------+---------+-----+-------+
| Controllers          |  2305 |  1565 |      18 |     118 |   6 |    11 |
| Helpers              |  9768 |  8604 |       4 |     556 | 139 |    13 |
| Models               | 14104 | 10253 |     155 |     815 |   5 |    10 |
| Libraries            |  2581 |  1875 |      19 |     158 |   8 |     9 |
| Integration tests    |     0 |     0 |       0 |       0 |   0 |     0 |
| Functional tests     |     0 |     0 |       0 |       0 |   0 |     0 |
| Model specs          | 20170 | 16773 |       4 |      20 |   5 |   836 |
| View specs           |   527 |   407 |       0 |       0 |   0 |     0 |
| Controller specs     |  3437 |  2738 |       1 |      11 |  11 |   246 |
| Helper specs         |  7960 |  6931 |       4 |      56 |  14 |   121 |
| Model specs          | 20170 | 16773 |       4 |      20 |   5 |   836 |
| View specs           |   527 |   407 |       0 |       0 |   0 |     0 |
| Controller specs     |  3437 |  2738 |       1 |      11 |  11 |   246 |
| Helper specs         |  7960 |  6931 |       4 |      56 |  14 |   121 |
+----------------------+-------+-------+---------+---------+-----+-------+
| Total                | 60852 | 49146 |     205 |    1734 |   8 |    26 |
+----------------------+-------+-------+---------+---------+-----+-------+
  Code LOC: 22297     Test LOC: 26849     Code to Test Ratio: 1:1.2

# cd ../ec_admin 
# rake stats
(in /Users/sogo/code/rails/ecrider-0.8.1/ec_admin)
rake gems:install to use schema_comments tasks
rake gems:install to use unencoded UTF-8 yaml by yaml_waml
+----------------------+-------+-------+---------+---------+-----+-------+
| Name                 | Lines |   LOC | Classes | Methods | M/C | LOC/M |
+----------------------+-------+-------+---------+---------+-----+-------+
| Controllers          |  6453 |  4822 |      57 |     412 |   7 |     9 |
| Helpers              | 10929 |  9545 |       9 |     642 |  71 |    12 |
| Models               | 14104 | 10253 |     155 |     815 |   5 |    10 |
| Libraries            |  2390 |  1766 |      16 |     134 |   8 |    11 |
| Integration tests    |     0 |     0 |       0 |       0 |   0 |     0 |
| Functional tests     |    40 |    30 |       5 |       0 |   0 |     0 |
| Unit tests           |    28 |    21 |       6 |       0 |   0 |     0 |
| Model specs          | 20170 | 16773 |       4 |      20 |   5 |   836 |
| View specs           |   972 |   733 |       0 |       0 |   0 |     0 |
| Controller specs     |  8214 |  6894 |       1 |      34 |  34 |   200 |
| Helper specs         |  8379 |  7230 |       4 |      57 |  14 |   124 |
| Routing specs        |  1008 |   784 |       0 |       0 |   0 |     0 |
+----------------------+-------+-------+---------+---------+-----+-------+
| Total                | 72687 | 58851 |     257 |    2114 |   8 |    25 |
+----------------------+-------+-------+---------+---------+-----+-------+
  Code LOC: 26386     Test LOC: 32465     Code to Test Ratio: 1:1.2
  • 両方ともテストがしっかり書かれている印象
  • EC-Riderでけえ!!コード行数は約13倍