Agile Web Development with Rails, Edition 4

19 Finding Your Way Around 17 Deployment

18 Retrospective

edit README.rdoc
= The Depot Online Store
 
This application implements an online store, with a catalog, cart, and orders.
 
It is divided into two main sections:
 
* The buyer's side of the application manages the catalog, cart, 
  and checkout. It is implementation spans in four models and associated
  controllers and views: Cart, LineItem, Order, and Product.  Additionally,
  there is a StoreController for the store front itself, and a
  SessionsController to manage sessions.
 
* Only administrators can access stuff in the seller's side
  (product maintenance and order fulfillment).  This is implemented by the
  SessionsController, is enforced by the ApplicationController#authorize
  method, and assisted by the Users and Carts resources.
 
This code was produced as an example for the book {Agile Web Development with
Rails}[http://www.pragprog.com/titles/rails4/agile-web-development-with-rails-4th-edition]. It should not be 
run as a real online store.
 
=== Authors
 
 * Sam Ruby, IBM
 * Dave Thomas, The Pragmatic Programmers, LLC
 * David Heinemeier Hansson, 37signals
 
=== Warranty
 
This code is provided for educational purposes only, and comes with 
absolutely no warranty. It should not be used in live applications.
 
== Copyright
 
This code is Copyright (c) 2013 The Pragmatic Programmers, LLC.
 
It is released under the same license as Ruby.
rake doc:app
rm -r doc/app
Parsing sources...
  3% [ 1/27]  README.rdoc
  7% [ 2/27]  app/controllers/admin_controller.rb
 11% [ 3/27]  app/controllers/application_controller.rb
 14% [ 4/27]  app/controllers/carts_controller.rb
 18% [ 5/27]  app/controllers/concerns/current_cart.rb
 22% [ 6/27]  app/controllers/line_items_controller.rb
 25% [ 7/27]  app/controllers/orders_controller.rb
 29% [ 8/27]  app/controllers/products_controller.rb
 33% [ 9/27]  app/controllers/sessions_controller.rb
 37% [10/27]  app/controllers/store_controller.rb
 40% [11/27]  app/controllers/users_controller.rb
 44% [12/27]  app/helpers/admin_helper.rb
 48% [13/27]  app/helpers/application_helper.rb
 51% [14/27]  app/helpers/carts_helper.rb
 55% [15/27]  app/helpers/line_items_helper.rb
 59% [16/27]  app/helpers/orders_helper.rb
 62% [17/27]  app/helpers/products_helper.rb
 66% [18/27]  app/helpers/sessions_helper.rb
 70% [19/27]  app/helpers/store_helper.rb
 74% [20/27]  app/helpers/users_helper.rb
 77% [21/27]  app/mailers/application_mailer.rb
 81% [22/27]  app/mailers/order_mailer.rb
 85% [23/27]  app/models/cart.rb
 88% [24/27]  app/models/line_item.rb
 92% [25/27]  app/models/order.rb
 96% [26/27]  app/models/product.rb
100% [27/27]  app/models/user.rb

    
Generating Darkfish format into /home/rubys/git/awdwr/edition4/work-226-42/depot/doc/app...
 
 
  Files:      27
 
  Classes:    17 ( 9 undocumented)
  Modules:    11 (11 undocumented)
  Constants:   0 ( 0 undocumented)
  Attributes:  0 ( 0 undocumented)
  Methods:    52 ( 4 undocumented)
 
  Total:      80 (24 undocumented)
   70.00% documented
 
  Elapsed: 0.3s
 
rake stats
+----------------------+-------+-------+---------+---------+-----+-------+
| Name                 | Lines |   LOC | Classes | Methods | M/C | LOC/M |
+----------------------+-------+-------+---------+---------+-----+-------+
| Controllers          |   637 |   395 |       9 |      58 |   6 |     4 |
| Helpers              |    26 |    24 |       0 |       1 |   0 |    22 |
| Models               |   119 |    75 |       6 |       6 |   1 |    10 |
| Mailers              |    33 |    15 |       2 |       2 |   1 |     5 |
| Javascripts          |    54 |     3 |       0 |       2 |   0 |    -1 |
| Libraries            |     0 |     0 |       0 |       0 |   0 |     0 |
| Controller tests     |   374 |   276 |       8 |       0 |   0 |     0 |
| Helper tests         |     0 |     0 |       0 |       0 |   0 |     0 |
| Model tests          |   130 |    90 |       5 |       2 |   0 |    43 |
| Mailer tests         |    39 |    26 |       2 |       2 |   1 |    11 |
| Integration tests    |   198 |   138 |       2 |       9 |   4 |    13 |
+----------------------+-------+-------+---------+---------+-----+-------+
| Total                |  1610 |  1042 |      34 |      82 |   2 |    10 |
+----------------------+-------+-------+---------+---------+-----+-------+
  Code LOC: 512     Test LOC: 530     Code to Test Ratio: 1:1.0
 

19 Finding Your Way Around 17 Deployment