Saturday, May 9, 2009

My RailsSpace Journey - Day 8 - Chapter 9

  1. Starting Chapter 9 (Personal Profiles).
  2. Created Profile controller with 2 actions (index, show). (p.257)
  3. Edited the config/routes.rb file. (9.1/p.257-258)
  4. Edited the profile_controller. (9.2/p.258)
  5. Edited two views: show.rhtml, index.rhtml (9.3,9.4/p.259)
  6. Created and edited Spec model (migration). Then do the migration/Done. (9.5/p.260-262)
  7. Edited models/spec.rb. (9.6/p.262)
  8. Edited config/environment.rb (9.7/p.263)
  9. Tried to run user_controller_tests and it is broken.
  10. Edited models/user.rb. (9.8/p.265)
  11. Edited models/spec.rb. (9.9/p.265)
  12. Repeated step 2 (new Profile controller) Ran "rake"/Worked.
  13. SKIPPED STEP 3 (routes.rb). DID NOT CHANGE config/routes.rb. ######
  14. Repeated step 4 (profile_controller). Ran "rake"/Worked.
  15. Repeated step 5 (2 views). Ran "rake"/Worked.
  16. Repeated step 6 (new Spec model). Skipped the migration because I did it before. Also had to delete the Migration I just created, but did not want to use because rake would not run until migration was done. Ran 'rake"/Worked. Got extra test.
  17. Repeated step 7 (edited spec model). Ran "rake"/Worked.
  18. SKIPPED STEP 8 (environment.rb). DID NOT CHANGE config/ environment.rb.
  19. Could not continue safety with chapter 9 so I stopped for lunch and study group.
  20. Later I went back and read the whole chapter and marked it up.
  21. Brought up the project. Walked successfully thru the top level windows and ran "rake" (all the tests). All tests (11,54,0,0) (19,94,0,0) (1,2,0,0) ran cleanly.
  22. So starting Chapter 9 again.
  23. step 2: Profile controller is already created, so skipped. (p.257)
  24. step 4: profile_controller has already be edited, so skipped. (9.2/p.258)
  25. step 5: Two views has already be edited, so skipped. (9.3,9.4/p.259)
  26. step 6: Spec model already been created/migrated, so skipped. (9.5/p.260-261)
  27. step 7; Spec.rb already been edited, so skipped. (9.6/p.262)
  28. step 3: YES, I edited the new lines into config/routes.rb file and commented out the old lines. Then ran "rake" and all tests passed. (9.1/p.257)
  29. Brought up Figure 9.1 (web page) and it worked. WOW!!! (F9.1/p.254)
  30. step 8+9: YES, I edited (added one line: DB_STRING_MAX_LENGTH = 255) to end of config/environment.rb file. THE TRICK WAS NOT DOING THIS STEP AS A CUT-AND-PASTE. Restarted web server and then ran "rake" (step 9) and all tests passed. (9.7/p.263)
  31. Brought up Figure 9.2 (bad user) (web page) and it worked. WOW!!! (F9.2/p.259-260)
  32. step 10: Repeated edit on models/user.rb and then ran "rake" and all tests passed. (9.8/p.265)
  33. step 11: Repeated edit on models/spec.rb and then ran "rake" and all tests passed. (9.9/p.265)
  34. Created new Spec controller with 2 views (index, edit) and then ran "rake" and all tests passed. (p.266)
  35. Edited application.rb controller and then ran "rake" and all tests passed. NOTE: Got one new test and one new assertion. (9.10/p.266-267)
  36. Filled out new spec_controller.rb file and then ran "rake" and all tests passed. (9.11/p.267)
  37. Edit helpers/applcation_helper.rb file and then ran "rake" and all tests passed. (9.12/p.269)
  38. Edited (added one line: HTML_TEXT_FIELD_SIZE = 15) to end of config/environment.rb file. Restarted web server and then ran "rake" and all tests passed. (9.13/p.269-270)
  39. Filled out new view/spec/edit.rhtml file and then ran "rake" and all tests passed. (9.14/p.270-271)
  40. Brought up Figure 9.3(web page) and it worked ONCE I LOGGED IN. WOW!!! (F9.3/p.271)
  41. Tried Figure 9.4(web page) and it worked sort of (less params). (F9.4/p.272)
  42. Edited application.rb controller and then ran "rake" and all tests passed. (9.15/p.272-273)
  43. Edited spec_controller.rb file and then ran "rake" and all tests passed. (9.16/p.273)
  44. Edited spec_controller_test.rb file and then ran "rake" and all tests but 5 assertions passed. Also got 5 new tests, s9 (11,54,0,0) (24,94,0,5)(1,2,0). (9.17/p.273-274)
  45. Edited test/test_helper.rb file and ran "rake" and got same results as step 44. (9.18/p.275)
  46. Filled out test/fixtures/specs.yml file and then ran "rake" and all tests passed with some new numbers (11,54,0,0) (24,127,0,0)(1,2,0). (9.19/p.275) FIXED
  47. Filled out new test/unit/spec_test.rb and then ran "rake" and all tests passed with some new numbers (17,83,0,0) (24,127,0,0)(1,2,0). (9.20/p.276)
  48. Edited user_controller.rb and then ran "rake" and all tests passed with 3 new assertions (17,83,0,0) (24,130,0,0)(1,2,0). (9.21/p.277)
  49. Edited models/spec.rb file and then ran "rake" and all tests passed (9.22/p.277)
  50. Edited views/layouts/application.rhtml file and some middle tests failed (24,89,8,0) (9.23/p.278)
  51. Repeated previous step because I mis-cut-pasted it and ran rake and all tests passed. (9.23/p.278)
  52. Created and filled in brand new public/stylesheets/profile.css file and ran rake and all tests passed (same numbers). (9.24/p.278)
  53. Created and filled in brand new (I THINK) views/user/index.rhtml file and ran rake and all tests passed (same numbers). (9.25/p.279)
  54. Edited views/user/index.rhtml file and ran rake and all tests passed (same numbers). (9.26/p.281)
  55. Created and filled in views/spec/_field_row.rhtml partial file and all tests passed (same numbers). (9.27/p.281)
  56. I renamed views/user/index.html.erb to hid_index.html.erb and refreshed hub page and got Figure 9.5(web page) and also Figure 9.6 (web page) with the "Empty right column, for now" (F9.5/p.280) so somewhere a long the way index.html.erb went away. Then ran "rake" and all tests passed (same numbers). (9.27, F9.5, F9.6/p.281-282)
  57. Edited (changed one word: s/map.connect/map.profile/) in config/routes.rb file. Restarted web server and then ran "rake" and all tests passed. (9.28/p.283)
  58. Filled in app/helpers/profile_helper.rb file, restarted web server and then ran "rake" and all tests passed. (9.28/p.283)
  59. Edited app/helpers/profile_helper.rb file and then ran "rake" and all tests passed. (9.29/p.284)
  60. Edited user_controller.rb file and then ran "rake" and all tests passed. (9.29.5/SEE ERATA/see bottom of p.284)
  61. Edited views/user/index.rthml file and then ran "rake" and some middle tests failed (24,125,0,2). (9.30/p.285-286)
  62. Edited public/stylesheets/profile.css file and then ran "rake" and some middle tests failed (24,125,0,2). (9.31/p.286)
  63. Created and filled in lib/string.rb file and ran "rake" and got same results as previous step. (9.32/p.287)
  64. Edited app/helpers/application_helper.rb file and ran "rake" and all tests passed. (9.33/p.287) FIXED
  65. Brought up Figure 9.7 (web page) and it worked. WOW!!! (F9.7/p.289)
  66. Created new Faq model. (p.288)
  67. Filled in migration script (....create faqs.rb) and ran "rake" and all tests passed. Got one new test and one new assertion. (9.34/p.289)
  68. Filled in new Faq model and ran "rake" and got same results as previous step. (9.35/p.290)
  69. Edited (added one line: DB_TEXT_MAX_LENGTH = 40000) to end of config/environment.rb file. Restarted web server and then ran "rake" and all tests passed. (9.36/p.290)
  70. Created new Faq controller with 2 views (index, edit). (p.292)
  71. Filled in new faq_controller.rb file and ran "rake" and all tests passed. Got one new middle test and one new middle assertion. (9.35/p.290)
  72. Edited (added one line: map.hub 'user', :controller => 'user', :action => 'index') in config/routes.rb file. Restarted web server and then ran "rake" and all tests passed as previous step. (9.39/p.292)
  73. Filled in new faq_controller.rb file and ran "rake" and all tests passed. (9.40/p.293)
  74. Filled in new views/faq/edit.rhtml file and ran "rake" and all tests passed. (9.41/p.293)
  75. Created and filled in views/faq/_answer_text_area.rhtml file and ran "rake" and all tests passed. (9.42/p.294)
  76. Updated public/stylesheets/profile.css and ran "rake" and all tests passed. (9.43/p.294)
  77. Updated user_controller.rb file and ran "rake" and all tests passed. (9.44/p.295)
  78. Updated user_controller.rb file again and ran "rake" and all tests passed. (9.45/p.296)
  79. Filled in new views/user/index.rhtml file and ran "rake" and all tests passed except 2 assertions. (9.46/p.296)
  80. Created and filled in views/faq/_sidebar_box.rhtml file and all tests passed. (9.47/p.297) FIXED
  81. Filled test/fixtures/faqs.yml file. (9.48/p.298)
  82. Filled in test/unit/faq.rb file and ran "rake" and all tests (18,110,0,0) (25,131,0,0) (1,2,0,0) passed. (9.49/p.299)
  83. Update profile_controller.rb file and ran "rake" and all tests passed. (9.50/p.300)
  84. Update helpers/profile_helper.rb file and ran "rake" and all tests passed. (9.51/p.300)
  85. Filled in views/profile/show.rhtml file and ran "rake" and all tests passed. (9.52/p.301)
  86. End of Chapter 10 so I pushed it to github.com.

No comments:

Post a Comment