Skip to content
This repository
Browse code

adding episodes 290 and 291

  • Loading branch information...
commit c07c57918764f9490de4e666335d4f518df72e66 1 parent 2ba0ecd
Ryan Bates authored October 16, 2011

Showing 223 changed files with 3,804 additions and 0 deletions. Show diff stats Hide diff stats

  1. 0  assets/.gitkeep b/episode-290/zip_coder-after/lib/assets/.gitkeep
  2. 0  assets/.gitkeep b/episode-290/zip_coder-before/lib/assets/.gitkeep
  3. 0  assets/.gitkeep b/episode-291/zip_coder-after/lib/assets/.gitkeep
  4. 0  assets/.gitkeep b/episode-291/zip_coder-before/lib/assets/.gitkeep
  5. 3  episode-290/README
  6. 5  episode-290/zip_coder-after/.gitignore
  7. 17  episode-290/zip_coder-after/Gemfile
  8. 134  episode-290/zip_coder-after/Gemfile.lock
  9. 6  episode-290/zip_coder-after/README
  10. 7  episode-290/zip_coder-after/Rakefile
  11. BIN  episode-290/zip_coder-after/app/assets/images/rails.png
  12. 9  episode-290/zip_coder-after/app/assets/javascripts/application.js
  13. 3  episode-290/zip_coder-after/app/assets/javascripts/zip_code_lookup.js.coffee
  14. 96  episode-290/zip_coder-after/app/assets/stylesheets/application.css
  15. 21  episode-290/zip_coder-after/app/assets/stylesheets/zip_code_lookup.css.scss
  16. 3  episode-290/zip_coder-after/app/controllers/application_controller.rb
  17. 5  episode-290/zip_coder-after/app/controllers/zip_code_lookup_controller.rb
  18. 2  episode-290/zip_coder-after/app/helpers/application_helper.rb
  19. 2  episode-290/zip_coder-after/app/helpers/zip_code_lookup_helper.rb
  20. 0  episode-290/zip_coder-after/app/mailers/.gitkeep
  21. 0  episode-290/zip_coder-after/app/models/.gitkeep
  22. 18  episode-290/zip_coder-after/app/models/zip_code.rb
  23. 17  episode-290/zip_coder-after/app/views/layouts/application.html.erb
  24. 21  episode-290/zip_coder-after/app/views/zip_code_lookup/index.html.erb
  25. 4  episode-290/zip_coder-after/config.ru
  26. 48  episode-290/zip_coder-after/config/application.rb
  27. 6  episode-290/zip_coder-after/config/boot.rb
  28. 25  episode-290/zip_coder-after/config/database.yml
  29. 5  episode-290/zip_coder-after/config/environment.rb
  30. 30  episode-290/zip_coder-after/config/environments/development.rb
  31. 60  episode-290/zip_coder-after/config/environments/production.rb
  32. 39  episode-290/zip_coder-after/config/environments/test.rb
  33. 7  episode-290/zip_coder-after/config/initializers/backtrace_silencers.rb
  34. 10  episode-290/zip_coder-after/config/initializers/inflections.rb
  35. 5  episode-290/zip_coder-after/config/initializers/mime_types.rb
  36. 7  episode-290/zip_coder-after/config/initializers/secret_token.rb
  37. 8  episode-290/zip_coder-after/config/initializers/session_store.rb
  38. 14  episode-290/zip_coder-after/config/initializers/wrap_parameters.rb
  39. 5  episode-290/zip_coder-after/config/locales/en.yml
  40. 3  episode-290/zip_coder-after/config/routes.rb
  41. 7  episode-290/zip_coder-after/db/seeds.rb
  42. 2  episode-290/zip_coder-after/doc/README_FOR_APP
  43. 0  episode-290/zip_coder-after/log/.gitkeep
  44. 26  episode-290/zip_coder-after/public/404.html
  45. 26  episode-290/zip_coder-after/public/422.html
  46. 26  episode-290/zip_coder-after/public/500.html
  47. 0  episode-290/zip_coder-after/public/favicon.ico
  48. 5  episode-290/zip_coder-after/public/robots.txt
  49. 6  episode-290/zip_coder-after/script/rails
  50. 0  episode-290/zip_coder-after/test/fixtures/.gitkeep
  51. 0  episode-290/zip_coder-after/test/functional/.gitkeep
  52. 9  episode-290/zip_coder-after/test/functional/zip_code_lookup_controller_test.rb
  53. 0  episode-290/zip_coder-after/test/integration/.gitkeep
  54. 12  episode-290/zip_coder-after/test/performance/browsing_test.rb
  55. 13  episode-290/zip_coder-after/test/test_helper.rb
  56. 0  episode-290/zip_coder-after/test/unit/.gitkeep
  57. 4  episode-290/zip_coder-after/test/unit/helpers/zip_code_lookup_helper_test.rb
  58. 0  episode-290/zip_coder-after/vendor/assets/stylesheets/.gitkeep
  59. 0  episode-290/zip_coder-after/vendor/plugins/.gitkeep
  60. 5  episode-290/zip_coder-before/.gitignore
  61. 16  episode-290/zip_coder-before/Gemfile
  62. 119  episode-290/zip_coder-before/Gemfile.lock
  63. 6  episode-290/zip_coder-before/README
  64. 7  episode-290/zip_coder-before/Rakefile
  65. BIN  episode-290/zip_coder-before/app/assets/images/rails.png
  66. 9  episode-290/zip_coder-before/app/assets/javascripts/application.js
  67. 3  episode-290/zip_coder-before/app/assets/javascripts/zip_code_lookup.js.coffee
  68. 96  episode-290/zip_coder-before/app/assets/stylesheets/application.css
  69. 21  episode-290/zip_coder-before/app/assets/stylesheets/zip_code_lookup.css.scss
  70. 3  episode-290/zip_coder-before/app/controllers/application_controller.rb
  71. 5  episode-290/zip_coder-before/app/controllers/zip_code_lookup_controller.rb
  72. 2  episode-290/zip_coder-before/app/helpers/application_helper.rb
  73. 2  episode-290/zip_coder-before/app/helpers/zip_code_lookup_helper.rb
  74. 0  episode-290/zip_coder-before/app/mailers/.gitkeep
  75. 0  episode-290/zip_coder-before/app/models/.gitkeep
  76. 6  episode-290/zip_coder-before/app/models/zip_code.rb
  77. 17  episode-290/zip_coder-before/app/views/layouts/application.html.erb
  78. 21  episode-290/zip_coder-before/app/views/zip_code_lookup/index.html.erb
  79. 4  episode-290/zip_coder-before/config.ru
  80. 48  episode-290/zip_coder-before/config/application.rb
  81. 6  episode-290/zip_coder-before/config/boot.rb
  82. 25  episode-290/zip_coder-before/config/database.yml
  83. 5  episode-290/zip_coder-before/config/environment.rb
  84. 30  episode-290/zip_coder-before/config/environments/development.rb
  85. 60  episode-290/zip_coder-before/config/environments/production.rb
  86. 39  episode-290/zip_coder-before/config/environments/test.rb
  87. 7  episode-290/zip_coder-before/config/initializers/backtrace_silencers.rb
  88. 10  episode-290/zip_coder-before/config/initializers/inflections.rb
  89. 5  episode-290/zip_coder-before/config/initializers/mime_types.rb
  90. 7  episode-290/zip_coder-before/config/initializers/secret_token.rb
  91. 8  episode-290/zip_coder-before/config/initializers/session_store.rb
  92. 14  episode-290/zip_coder-before/config/initializers/wrap_parameters.rb
  93. 5  episode-290/zip_coder-before/config/locales/en.yml
  94. 3  episode-290/zip_coder-before/config/routes.rb
  95. 7  episode-290/zip_coder-before/db/seeds.rb
  96. 2  episode-290/zip_coder-before/doc/README_FOR_APP
  97. 0  episode-290/zip_coder-before/log/.gitkeep
  98. 26  episode-290/zip_coder-before/public/404.html
  99. 26  episode-290/zip_coder-before/public/422.html
  100. 26  episode-290/zip_coder-before/public/500.html
  101. 0  episode-290/zip_coder-before/public/favicon.ico
  102. 5  episode-290/zip_coder-before/public/robots.txt
  103. 6  episode-290/zip_coder-before/script/rails
  104. 0  episode-290/zip_coder-before/test/fixtures/.gitkeep
  105. 0  episode-290/zip_coder-before/test/functional/.gitkeep
  106. 9  episode-290/zip_coder-before/test/functional/zip_code_lookup_controller_test.rb
  107. 0  episode-290/zip_coder-before/test/integration/.gitkeep
  108. 12  episode-290/zip_coder-before/test/performance/browsing_test.rb
  109. 13  episode-290/zip_coder-before/test/test_helper.rb
  110. 0  episode-290/zip_coder-before/test/unit/.gitkeep
  111. 4  episode-290/zip_coder-before/test/unit/helpers/zip_code_lookup_helper_test.rb
  112. 0  episode-290/zip_coder-before/vendor/assets/stylesheets/.gitkeep
  113. 0  episode-290/zip_coder-before/vendor/plugins/.gitkeep
  114. 3  episode-291/README
  115. 5  episode-291/zip_coder-after/.gitignore
  116. 1  episode-291/zip_coder-after/.rspec
  117. 25  episode-291/zip_coder-after/Gemfile
  118. 195  episode-291/zip_coder-after/Gemfile.lock
  119. 19  episode-291/zip_coder-after/Guardfile
  120. 6  episode-291/zip_coder-after/README
  121. 7  episode-291/zip_coder-after/Rakefile
  122. BIN  episode-291/zip_coder-after/app/assets/images/rails.png
  123. 9  episode-291/zip_coder-after/app/assets/javascripts/application.js
  124. 3  episode-291/zip_coder-after/app/assets/javascripts/zip_code_lookup.js.coffee
  125. 96  episode-291/zip_coder-after/app/assets/stylesheets/application.css
  126. 21  episode-291/zip_coder-after/app/assets/stylesheets/zip_code_lookup.css.scss
  127. 3  episode-291/zip_coder-after/app/controllers/application_controller.rb
  128. 5  episode-291/zip_coder-after/app/controllers/zip_code_lookup_controller.rb
  129. 2  episode-291/zip_coder-after/app/helpers/application_helper.rb
  130. 2  episode-291/zip_coder-after/app/helpers/zip_code_lookup_helper.rb
  131. 0  episode-291/zip_coder-after/app/mailers/.gitkeep
  132. 0  episode-291/zip_coder-after/app/models/.gitkeep
  133. 13  episode-291/zip_coder-after/app/models/zip_code.rb
  134. 17  episode-291/zip_coder-after/app/views/layouts/application.html.erb
  135. 21  episode-291/zip_coder-after/app/views/zip_code_lookup/index.html.erb
  136. 4  episode-291/zip_coder-after/config.ru
  137. 48  episode-291/zip_coder-after/config/application.rb
  138. 6  episode-291/zip_coder-after/config/boot.rb
  139. 25  episode-291/zip_coder-after/config/database.yml
  140. 5  episode-291/zip_coder-after/config/environment.rb
  141. 30  episode-291/zip_coder-after/config/environments/development.rb
  142. 60  episode-291/zip_coder-after/config/environments/production.rb
  143. 39  episode-291/zip_coder-after/config/environments/test.rb
  144. 7  episode-291/zip_coder-after/config/initializers/backtrace_silencers.rb
  145. 10  episode-291/zip_coder-after/config/initializers/inflections.rb
  146. 5  episode-291/zip_coder-after/config/initializers/mime_types.rb
  147. 7  episode-291/zip_coder-after/config/initializers/secret_token.rb
  148. 8  episode-291/zip_coder-after/config/initializers/session_store.rb
  149. 14  episode-291/zip_coder-after/config/initializers/wrap_parameters.rb
  150. 5  episode-291/zip_coder-after/config/locales/en.yml
  151. 3  episode-291/zip_coder-after/config/routes.rb
  152. 7  episode-291/zip_coder-after/db/seeds.rb
  153. 2  episode-291/zip_coder-after/doc/README_FOR_APP
  154. 0  episode-291/zip_coder-after/log/.gitkeep
  155. 26  episode-291/zip_coder-after/public/404.html
  156. 26  episode-291/zip_coder-after/public/422.html
  157. 26  episode-291/zip_coder-after/public/500.html
  158. 0  episode-291/zip_coder-after/public/favicon.ico
  159. 5  episode-291/zip_coder-after/public/robots.txt
  160. 6  episode-291/zip_coder-after/script/rails
  161. 18  episode-291/zip_coder-after/spec/requests/zip_code_lookup_spec.rb
  162. 25  episode-291/zip_coder-after/spec/spec_helper.rb
  163. 0  episode-291/zip_coder-after/spec/support/.gitkeep
  164. 14  episode-291/zip_coder-after/spec/support/vcr.rb
  165. 298  episode-291/zip_coder-after/spec/vcr/zip_code_lookup/searches_rails_casts.yml
  166. 274  episode-291/zip_coder-after/spec/vcr/zip_code_lookup/show_beverly_hills_given_90210.yml
  167. 0  episode-291/zip_coder-after/vendor/assets/stylesheets/.gitkeep
  168. 0  episode-291/zip_coder-after/vendor/plugins/.gitkeep
  169. 5  episode-291/zip_coder-before/.gitignore
  170. 1  episode-291/zip_coder-before/.rspec
  171. 21  episode-291/zip_coder-before/Gemfile
  172. 174  episode-291/zip_coder-before/Gemfile.lock
  173. 19  episode-291/zip_coder-before/Guardfile
  174. 6  episode-291/zip_coder-before/README
  175. 7  episode-291/zip_coder-before/Rakefile
  176. BIN  episode-291/zip_coder-before/app/assets/images/rails.png
  177. 9  episode-291/zip_coder-before/app/assets/javascripts/application.js
  178. 3  episode-291/zip_coder-before/app/assets/javascripts/zip_code_lookup.js.coffee
  179. 96  episode-291/zip_coder-before/app/assets/stylesheets/application.css
  180. 21  episode-291/zip_coder-before/app/assets/stylesheets/zip_code_lookup.css.scss
  181. 3  episode-291/zip_coder-before/app/controllers/application_controller.rb
  182. 5  episode-291/zip_coder-before/app/controllers/zip_code_lookup_controller.rb
  183. 2  episode-291/zip_coder-before/app/helpers/application_helper.rb
  184. 2  episode-291/zip_coder-before/app/helpers/zip_code_lookup_helper.rb
  185. 0  episode-291/zip_coder-before/app/mailers/.gitkeep
  186. 0  episode-291/zip_coder-before/app/models/.gitkeep
  187. 6  episode-291/zip_coder-before/app/models/zip_code.rb
  188. 17  episode-291/zip_coder-before/app/views/layouts/application.html.erb
  189. 21  episode-291/zip_coder-before/app/views/zip_code_lookup/index.html.erb
  190. 4  episode-291/zip_coder-before/config.ru
  191. 48  episode-291/zip_coder-before/config/application.rb
  192. 6  episode-291/zip_coder-before/config/boot.rb
  193. 25  episode-291/zip_coder-before/config/database.yml
  194. 5  episode-291/zip_coder-before/config/environment.rb
  195. 30  episode-291/zip_coder-before/config/environments/development.rb
  196. 60  episode-291/zip_coder-before/config/environments/production.rb
  197. 39  episode-291/zip_coder-before/config/environments/test.rb
  198. 7  episode-291/zip_coder-before/config/initializers/backtrace_silencers.rb
  199. 10  episode-291/zip_coder-before/config/initializers/inflections.rb
  200. 5  episode-291/zip_coder-before/config/initializers/mime_types.rb
  201. 7  episode-291/zip_coder-before/config/initializers/secret_token.rb
  202. 8  episode-291/zip_coder-before/config/initializers/session_store.rb
  203. 14  episode-291/zip_coder-before/config/initializers/wrap_parameters.rb
  204. 5  episode-291/zip_coder-before/config/locales/en.yml
  205. 3  episode-291/zip_coder-before/config/routes.rb
  206. 7  episode-291/zip_coder-before/db/seeds.rb
  207. 2  episode-291/zip_coder-before/doc/README_FOR_APP
  208. 0  episode-291/zip_coder-before/log/.gitkeep
  209. 26  episode-291/zip_coder-before/public/404.html
  210. 26  episode-291/zip_coder-before/public/422.html
  211. 26  episode-291/zip_coder-before/public/500.html
  212. 0  episode-291/zip_coder-before/public/favicon.ico
  213. 5  episode-291/zip_coder-before/public/robots.txt
  214. 6  episode-291/zip_coder-before/script/rails
  215. 4  episode-291/zip_coder-before/spec/requests/zip_code_lookup_spec.rb
  216. 21  episode-291/zip_coder-before/spec/spec_helper.rb
  217. 0  episode-291/zip_coder-before/spec/support/.gitkeep
  218. 0  episode-291/zip_coder-before/vendor/assets/stylesheets/.gitkeep
  219. 0  episode-291/zip_coder-before/vendor/plugins/.gitkeep
  220. 0  tasks/.gitkeep b/episode-290/zip_coder-after/lib/tasks/.gitkeep
  221. 0  tasks/.gitkeep b/episode-290/zip_coder-before/lib/tasks/.gitkeep
  222. 0  tasks/.gitkeep b/episode-291/zip_coder-after/lib/tasks/.gitkeep
  223. 0  tasks/.gitkeep b/episode-291/zip_coder-before/lib/tasks/.gitkeep
0  assets/.gitkeep b/episode-290/zip_coder-after/lib/assets/.gitkeep
No changes.
0  assets/.gitkeep b/episode-290/zip_coder-before/lib/assets/.gitkeep
No changes.
0  assets/.gitkeep b/episode-291/zip_coder-after/lib/assets/.gitkeep
No changes.
0  assets/.gitkeep b/episode-291/zip_coder-before/lib/assets/.gitkeep
No changes.
3  episode-290/README
... ...
@@ -0,0 +1,3 @@
  1
+RailsCasts Episode #290: SOAP with Savon
  2
+
  3
+http://railscasts.com/episodes/290-soap-with-savon
5  episode-290/zip_coder-after/.gitignore
... ...
@@ -0,0 +1,5 @@
  1
+.bundle
  2
+db/*.sqlite3
  3
+log/*.log
  4
+tmp/
  5
+.sass-cache/
17  episode-290/zip_coder-after/Gemfile
... ...
@@ -0,0 +1,17 @@
  1
+source 'http://rubygems.org'
  2
+
  3
+gem 'rails', '3.1.1'
  4
+gem 'sqlite3'
  5
+
  6
+
  7
+# Gems used only for assets and not required
  8
+# in production environments by default.
  9
+group :assets do
  10
+  gem 'sass-rails',   '~> 3.1.4'
  11
+  gem 'coffee-rails', '~> 3.1.1'
  12
+  gem 'uglifier', '>= 1.0.3'
  13
+end
  14
+
  15
+gem 'jquery-rails'
  16
+
  17
+gem 'savon'
134  episode-290/zip_coder-after/Gemfile.lock
... ...
@@ -0,0 +1,134 @@
  1
+GEM
  2
+  remote: http://rubygems.org/
  3
+  specs:
  4
+    actionmailer (3.1.1)
  5
+      actionpack (= 3.1.1)
  6
+      mail (~> 2.3.0)
  7
+    actionpack (3.1.1)
  8
+      activemodel (= 3.1.1)
  9
+      activesupport (= 3.1.1)
  10
+      builder (~> 3.0.0)
  11
+      erubis (~> 2.7.0)
  12
+      i18n (~> 0.6)
  13
+      rack (~> 1.3.2)
  14
+      rack-cache (~> 1.1)
  15
+      rack-mount (~> 0.8.2)
  16
+      rack-test (~> 0.6.1)
  17
+      sprockets (~> 2.0.2)
  18
+    activemodel (3.1.1)
  19
+      activesupport (= 3.1.1)
  20
+      builder (~> 3.0.0)
  21
+      i18n (~> 0.6)
  22
+    activerecord (3.1.1)
  23
+      activemodel (= 3.1.1)
  24
+      activesupport (= 3.1.1)
  25
+      arel (~> 2.2.1)
  26
+      tzinfo (~> 0.3.29)
  27
+    activeresource (3.1.1)
  28
+      activemodel (= 3.1.1)
  29
+      activesupport (= 3.1.1)
  30
+    activesupport (3.1.1)
  31
+      multi_json (~> 1.0)
  32
+    akami (1.0.0)
  33
+      gyoku (>= 0.4.0)
  34
+    arel (2.2.1)
  35
+    builder (3.0.0)
  36
+    coffee-rails (3.1.1)
  37
+      coffee-script (>= 2.2.0)
  38
+      railties (~> 3.1.0)
  39
+    coffee-script (2.2.0)
  40
+      coffee-script-source
  41
+      execjs
  42
+    coffee-script-source (1.1.2)
  43
+    erubis (2.7.0)
  44
+    execjs (1.2.9)
  45
+      multi_json (~> 1.0)
  46
+    gyoku (0.4.4)
  47
+      builder (>= 2.1.2)
  48
+    hike (1.2.1)
  49
+    httpi (0.9.5)
  50
+      rack
  51
+    i18n (0.6.0)
  52
+    jquery-rails (1.0.16)
  53
+      railties (~> 3.0)
  54
+      thor (~> 0.14)
  55
+    json (1.6.1)
  56
+    mail (2.3.0)
  57
+      i18n (>= 0.4.0)
  58
+      mime-types (~> 1.16)
  59
+      treetop (~> 1.4.8)
  60
+    mime-types (1.16)
  61
+    multi_json (1.0.3)
  62
+    nokogiri (1.5.0)
  63
+    nori (1.0.2)
  64
+    polyglot (0.3.2)
  65
+    rack (1.3.4)
  66
+    rack-cache (1.1)
  67
+      rack (>= 0.4)
  68
+    rack-mount (0.8.3)
  69
+      rack (>= 1.0.0)
  70
+    rack-ssl (1.3.2)
  71
+      rack
  72
+    rack-test (0.6.1)
  73
+      rack (>= 1.0)
  74
+    rails (3.1.1)
  75
+      actionmailer (= 3.1.1)
  76
+      actionpack (= 3.1.1)
  77
+      activerecord (= 3.1.1)
  78
+      activeresource (= 3.1.1)
  79
+      activesupport (= 3.1.1)
  80
+      bundler (~> 1.0)
  81
+      railties (= 3.1.1)
  82
+    railties (3.1.1)
  83
+      actionpack (= 3.1.1)
  84
+      activesupport (= 3.1.1)
  85
+      rack-ssl (~> 1.3.2)
  86
+      rake (>= 0.8.7)
  87
+      rdoc (~> 3.4)
  88
+      thor (~> 0.14.6)
  89
+    rake (0.9.2)
  90
+    rdoc (3.10)
  91
+      json (~> 1.4)
  92
+    sass (3.1.10)
  93
+    sass-rails (3.1.4)
  94
+      actionpack (~> 3.1.0)
  95
+      railties (~> 3.1.0)
  96
+      sass (>= 3.1.4)
  97
+      sprockets (~> 2.0.0)
  98
+      tilt (~> 1.3.2)
  99
+    savon (0.9.7)
  100
+      akami (~> 1.0)
  101
+      builder (>= 2.1.2)
  102
+      gyoku (>= 0.4.0)
  103
+      httpi (~> 0.9)
  104
+      nokogiri (>= 1.4.0)
  105
+      nori (~> 1.0)
  106
+      wasabi (~> 2.0)
  107
+    sprockets (2.0.2)
  108
+      hike (~> 1.2)
  109
+      rack (~> 1.0)
  110
+      tilt (~> 1.1, != 1.3.0)
  111
+    sqlite3 (1.3.4)
  112
+    thor (0.14.6)
  113
+    tilt (1.3.3)
  114
+    treetop (1.4.10)
  115
+      polyglot
  116
+      polyglot (>= 0.3.1)
  117
+    tzinfo (0.3.30)
  118
+    uglifier (1.0.3)
  119
+      execjs (>= 0.3.0)
  120
+      multi_json (>= 1.0.2)
  121
+    wasabi (2.0.0)
  122
+      nokogiri (>= 1.4.0)
  123
+
  124
+PLATFORMS
  125
+  ruby
  126
+
  127
+DEPENDENCIES
  128
+  coffee-rails (~> 3.1.1)
  129
+  jquery-rails
  130
+  rails (= 3.1.1)
  131
+  sass-rails (~> 3.1.4)
  132
+  savon
  133
+  sqlite3
  134
+  uglifier (>= 1.0.3)
6  episode-290/zip_coder-after/README
... ...
@@ -0,0 +1,6 @@
  1
+= RailsCasts Example Application
  2
+
  3
+Run these commands to try it out.
  4
+
  5
+  bundle
  6
+  rails s
7  episode-290/zip_coder-after/Rakefile
... ...
@@ -0,0 +1,7 @@
  1
+#!/usr/bin/env rake
  2
+# Add your own tasks in files placed in lib/tasks ending in .rake,
  3
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
  4
+
  5
+require File.expand_path('../config/application', __FILE__)
  6
+
  7
+ZipCoder::Application.load_tasks
BIN  episode-290/zip_coder-after/app/assets/images/rails.png
9  episode-290/zip_coder-after/app/assets/javascripts/application.js
... ...
@@ -0,0 +1,9 @@
  1
+// This is a manifest file that'll be compiled into including all the files listed below.
  2
+// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
  3
+// be included in the compiled file accessible from http://example.com/assets/application.js
  4
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
  5
+// the compiled file.
  6
+//
  7
+//= require jquery
  8
+//= require jquery_ujs
  9
+//= require_tree .
3  episode-290/zip_coder-after/app/assets/javascripts/zip_code_lookup.js.coffee
... ...
@@ -0,0 +1,3 @@
  1
+# Place all the behaviors and hooks related to the matching controller here.
  2
+# All this logic will automatically be available in application.js.
  3
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
96  episode-290/zip_coder-after/app/assets/stylesheets/application.css
... ...
@@ -0,0 +1,96 @@
  1
+/*
  2
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
  3
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
  4
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
  5
+ *= require_self
  6
+ *= require_tree .
  7
+*/
  8
+
  9
+html, body {
  10
+  background-color: #4B7399;
  11
+  font-family: Verdana, Helvetica, Arial;
  12
+  font-size: 14px;
  13
+}
  14
+
  15
+a img {
  16
+  border: none;
  17
+}
  18
+
  19
+a {
  20
+  color: #0000FF;
  21
+  text-decoration: none;
  22
+}
  23
+
  24
+a:hover {
  25
+  text-decoration: underline;
  26
+}
  27
+
  28
+.clear {
  29
+  clear: both;
  30
+  height: 0;
  31
+  overflow: hidden;
  32
+}
  33
+
  34
+#container {
  35
+  width: 75%;
  36
+  margin: 0 auto;
  37
+  background-color: #FFF;
  38
+  padding: 20px 40px;
  39
+  border: solid 1px black;
  40
+  margin-top: 20px;
  41
+}
  42
+
  43
+#flash_notice, #flash_error, #flash_alert {
  44
+  padding: 5px 8px;
  45
+  margin: 10px 0;
  46
+}
  47
+
  48
+#flash_notice {
  49
+  background-color: #CFC;
  50
+  border: solid 1px #6C6;
  51
+}
  52
+
  53
+#flash_error, #flash_alert {
  54
+  background-color: #FCC;
  55
+  border: solid 1px #C66;
  56
+}
  57
+
  58
+form label {
  59
+  display: block;
  60
+  margin-bottom: 2px;
  61
+}
  62
+
  63
+form .field, form .actions {
  64
+  margin: 12px 0;
  65
+}
  66
+
  67
+.fieldWithErrors {
  68
+  display: inline;
  69
+}
  70
+
  71
+.error_messages {
  72
+  width: 400px;
  73
+  border: 2px solid #CF0000;
  74
+  padding: 0px;
  75
+  margin-bottom: 20px;
  76
+  background-color: #f0f0f0;
  77
+  font-size: 12px;
  78
+}
  79
+
  80
+.error_messages h2 {
  81
+  text-align: left;
  82
+  font-weight: bold;
  83
+  padding: 5px 10px;
  84
+  font-size: 12px;
  85
+  margin: 0;
  86
+  background-color: #c00;
  87
+  color: #fff;
  88
+}
  89
+
  90
+.error_messages p {
  91
+  margin: 8px 10px;
  92
+}
  93
+
  94
+.error_messages ul {
  95
+  margin: 15px 0;
  96
+}
21  episode-290/zip_coder-after/app/assets/stylesheets/zip_code_lookup.css.scss
... ...
@@ -0,0 +1,21 @@
  1
+// Place all the styles related to the zip_code_lookup controller here.
  2
+// They will automatically be included in application.css.
  3
+// You can use Sass (SCSS) here: http://sass-lang.com/
  4
+#zip_info {
  5
+  padding: 20px;
  6
+  border-top: solid 3px #CCC;
  7
+
  8
+  dt {
  9
+    float: left;
  10
+    width: 100px;
  11
+    text-align: right;
  12
+    padding-right: 5px;
  13
+    font-weight: bold;
  14
+  }
  15
+  dd {
  16
+    display: block;
  17
+  }
  18
+  dt, dd {
  19
+    height: 20px;
  20
+  }
  21
+}
3  episode-290/zip_coder-after/app/controllers/application_controller.rb
... ...
@@ -0,0 +1,3 @@
  1
+class ApplicationController < ActionController::Base
  2
+  protect_from_forgery
  3
+end
5  episode-290/zip_coder-after/app/controllers/zip_code_lookup_controller.rb
... ...
@@ -0,0 +1,5 @@
  1
+class ZipCodeLookupController < ApplicationController
  2
+  def index
  3
+    @zip_code = ZipCode.new(params[:zip_code]) if params[:zip_code].present?
  4
+  end
  5
+end
2  episode-290/zip_coder-after/app/helpers/application_helper.rb
... ...
@@ -0,0 +1,2 @@
  1
+module ApplicationHelper
  2
+end
2  episode-290/zip_coder-after/app/helpers/zip_code_lookup_helper.rb
... ...
@@ -0,0 +1,2 @@
  1
+module ZipCodeLookupHelper
  2
+end
0  episode-290/zip_coder-after/app/mailers/.gitkeep
No changes.
0  episode-290/zip_coder-after/app/models/.gitkeep
No changes.
18  episode-290/zip_coder-after/app/models/zip_code.rb
... ...
@@ -0,0 +1,18 @@
  1
+class ZipCode
  2
+  attr_reader :state, :city, :area_code, :time_zone
  3
+
  4
+  def initialize(zip)
  5
+    # Gyoku.convert_symbols_to :camelcase
  6
+    client = Savon::Client.new("http://www.webservicex.net/uszip.asmx?WSDL")
  7
+    response = client.request :web, :get_info_by_zip, body: { "USZip" => zip }
  8
+    if response.success?
  9
+      data = response.to_array(:get_info_by_zip_response, :get_info_by_zip_result, :new_data_set, :table).first
  10
+      if data
  11
+        @state = data[:state]
  12
+        @city = data[:city]
  13
+        @area_code = data[:area_code]
  14
+        @time_zone = data[:time_zone]
  15
+      end
  16
+    end
  17
+  end
  18
+end
17  episode-290/zip_coder-after/app/views/layouts/application.html.erb
... ...
@@ -0,0 +1,17 @@
  1
+<!DOCTYPE html>
  2
+<html>
  3
+<head>
  4
+  <title>Zip Code Lookup</title>
  5
+  <%= stylesheet_link_tag    "application" %>
  6
+  <%= javascript_include_tag "application" %>
  7
+  <%= csrf_meta_tags %>
  8
+</head>
  9
+<body>
  10
+  <div id="container">
  11
+    <% flash.each do |name, msg| %>
  12
+      <%= content_tag :div, msg, :id => "flash_#{name}" %>
  13
+    <% end %>
  14
+    <%= yield %>
  15
+  </div>
  16
+</body>
  17
+</html>
21  episode-290/zip_coder-after/app/views/zip_code_lookup/index.html.erb
... ...
@@ -0,0 +1,21 @@
  1
+<h1>Zip Code Lookup</h1>
  2
+
  3
+<%= form_tag root_url, method: :get do %>
  4
+<p>
  5
+  <%= text_field_tag :zip_code, params[:zip_code] %>
  6
+  <%= submit_tag "Lookup", name: nil %>
  7
+</p>
  8
+<% end %>
  9
+
  10
+<% if @zip_code %>
  11
+  <dl id ="zip_info">
  12
+    <dt>City:</dt>
  13
+    <dd><%= @zip_code.city %></dd>
  14
+    <dt>State:</dt>
  15
+    <dd><%= @zip_code.state %></dd>
  16
+    <dt>Area Code:</dt>
  17
+    <dd><%= @zip_code.area_code %></dd>
  18
+    <dt>Time Zone:</dt>
  19
+    <dd><%= @zip_code.time_zone %></dd>
  20
+  </dl>
  21
+<% end %>
4  episode-290/zip_coder-after/config.ru
... ...
@@ -0,0 +1,4 @@
  1
+# This file is used by Rack-based servers to start the application.
  2
+
  3
+require ::File.expand_path('../config/environment',  __FILE__)
  4
+run ZipCoder::Application
48  episode-290/zip_coder-after/config/application.rb
... ...
@@ -0,0 +1,48 @@
  1
+require File.expand_path('../boot', __FILE__)
  2
+
  3
+require 'rails/all'
  4
+
  5
+if defined?(Bundler)
  6
+  # If you precompile assets before deploying to production, use this line
  7
+  Bundler.require(*Rails.groups(:assets => %w(development test)))
  8
+  # If you want your assets lazily compiled in production, use this line
  9
+  # Bundler.require(:default, :assets, Rails.env)
  10
+end
  11
+
  12
+module ZipCoder
  13
+  class Application < Rails::Application
  14
+    # Settings in config/environments/* take precedence over those specified here.
  15
+    # Application configuration should go into files in config/initializers
  16
+    # -- all .rb files in that directory are automatically loaded.
  17
+
  18
+    # Custom directories with classes and modules you want to be autoloadable.
  19
+    # config.autoload_paths += %W(#{config.root}/extras)
  20
+
  21
+    # Only load the plugins named here, in the order given (default is alphabetical).
  22
+    # :all can be used as a placeholder for all plugins not explicitly named.
  23
+    # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
  24
+
  25
+    # Activate observers that should always be running.
  26
+    # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
  27
+
  28
+    # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
  29
+    # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
  30
+    # config.time_zone = 'Central Time (US & Canada)'
  31
+
  32
+    # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
  33
+    # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
  34
+    # config.i18n.default_locale = :de
  35
+
  36
+    # Configure the default encoding used in templates for Ruby 1.9.
  37
+    config.encoding = "utf-8"
  38
+
  39
+    # Configure sensitive parameters which will be filtered from the log file.
  40
+    config.filter_parameters += [:password]
  41
+
  42
+    # Enable the asset pipeline
  43
+    config.assets.enabled = true
  44
+
  45
+    # Version of your assets, change this if you want to expire all your assets
  46
+    config.assets.version = '1.0'
  47
+  end
  48
+end
6  episode-290/zip_coder-after/config/boot.rb
... ...
@@ -0,0 +1,6 @@
  1
+require 'rubygems'
  2
+
  3
+# Set up gems listed in the Gemfile.
  4
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
  5
+
  6
+require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
25  episode-290/zip_coder-after/config/database.yml
... ...
@@ -0,0 +1,25 @@
  1
+# SQLite version 3.x
  2
+#   gem install sqlite3
  3
+#
  4
+#   Ensure the SQLite 3 gem is defined in your Gemfile
  5
+#   gem 'sqlite3'
  6
+development:
  7
+  adapter: sqlite3
  8
+  database: db/development.sqlite3
  9
+  pool: 5
  10
+  timeout: 5000
  11
+
  12
+# Warning: The database defined as "test" will be erased and
  13
+# re-generated from your development database when you run "rake".
  14
+# Do not set this db to the same as development or production.
  15
+test:
  16
+  adapter: sqlite3
  17
+  database: db/test.sqlite3
  18
+  pool: 5
  19
+  timeout: 5000
  20
+
  21
+production:
  22
+  adapter: sqlite3
  23
+  database: db/production.sqlite3
  24
+  pool: 5
  25
+  timeout: 5000
5  episode-290/zip_coder-after/config/environment.rb
... ...
@@ -0,0 +1,5 @@
  1
+# Load the rails application
  2
+require File.expand_path('../application', __FILE__)
  3
+
  4
+# Initialize the rails application
  5
+ZipCoder::Application.initialize!
30  episode-290/zip_coder-after/config/environments/development.rb
... ...
@@ -0,0 +1,30 @@
  1
+ZipCoder::Application.configure do
  2
+  # Settings specified here will take precedence over those in config/application.rb
  3
+
  4
+  # In the development environment your application's code is reloaded on
  5
+  # every request.  This slows down response time but is perfect for development
  6
+  # since you don't have to restart the web server when you make code changes.
  7
+  config.cache_classes = false
  8
+
  9
+  # Log error messages when you accidentally call methods on nil.
  10
+  config.whiny_nils = true
  11
+
  12
+  # Show full error reports and disable caching
  13
+  config.consider_all_requests_local       = true
  14
+  config.action_controller.perform_caching = false
  15
+
  16
+  # Don't care if the mailer can't send
  17
+  config.action_mailer.raise_delivery_errors = false
  18
+
  19
+  # Print deprecation notices to the Rails logger
  20
+  config.active_support.deprecation = :log
  21
+
  22
+  # Only use best-standards-support built into browsers
  23
+  config.action_dispatch.best_standards_support = :builtin
  24
+
  25
+  # Do not compress assets
  26
+  config.assets.compress = false
  27
+
  28
+  # Expands the lines which load the assets
  29
+  config.assets.debug = true
  30
+end
60  episode-290/zip_coder-after/config/environments/production.rb
... ...
@@ -0,0 +1,60 @@
  1
+ZipCoder::Application.configure do
  2
+  # Settings specified here will take precedence over those in config/application.rb
  3
+
  4
+  # Code is not reloaded between requests
  5
+  config.cache_classes = true
  6
+
  7
+  # Full error reports are disabled and caching is turned on
  8
+  config.consider_all_requests_local       = false
  9
+  config.action_controller.perform_caching = true
  10
+
  11
+  # Disable Rails's static asset server (Apache or nginx will already do this)
  12
+  config.serve_static_assets = false
  13
+
  14
+  # Compress JavaScripts and CSS
  15
+  config.assets.compress = true
  16
+
  17
+  # Don't fallback to assets pipeline if a precompiled asset is missed
  18
+  config.assets.compile = false
  19
+
  20
+  # Generate digests for assets URLs
  21
+  config.assets.digest = true
  22
+
  23
+  # Defaults to Rails.root.join("public/assets")
  24
+  # config.assets.manifest = YOUR_PATH
  25
+
  26
+  # Specifies the header that your server uses for sending files
  27
+  # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
  28
+  # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
  29
+
  30
+  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
  31
+  # config.force_ssl = true
  32
+
  33
+  # See everything in the log (default is :info)
  34
+  # config.log_level = :debug
  35
+
  36
+  # Use a different logger for distributed setups
  37
+  # config.logger = SyslogLogger.new
  38
+
  39
+  # Use a different cache store in production
  40
+  # config.cache_store = :mem_cache_store
  41
+
  42
+  # Enable serving of images, stylesheets, and JavaScripts from an asset server
  43
+  # config.action_controller.asset_host = "http://assets.example.com"
  44
+
  45
+  # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
  46
+  # config.assets.precompile += %w( search.js )
  47
+
  48
+  # Disable delivery errors, bad email addresses will be ignored
  49
+  # config.action_mailer.raise_delivery_errors = false
  50
+
  51
+  # Enable threaded mode
  52
+  # config.threadsafe!
  53
+
  54
+  # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
  55
+  # the I18n.default_locale when a translation can not be found)
  56
+  config.i18n.fallbacks = true
  57
+
  58
+  # Send deprecation notices to registered listeners
  59
+  config.active_support.deprecation = :notify
  60
+end
39  episode-290/zip_coder-after/config/environments/test.rb
... ...
@@ -0,0 +1,39 @@
  1
+ZipCoder::Application.configure do
  2
+  # Settings specified here will take precedence over those in config/application.rb
  3
+
  4
+  # The test environment is used exclusively to run your application's
  5
+  # test suite.  You never need to work with it otherwise.  Remember that
  6
+  # your test database is "scratch space" for the test suite and is wiped
  7
+  # and recreated between test runs.  Don't rely on the data there!
  8
+  config.cache_classes = true
  9
+
  10
+  # Configure static asset server for tests with Cache-Control for performance
  11
+  config.serve_static_assets = true
  12
+  config.static_cache_control = "public, max-age=3600"
  13
+
  14
+  # Log error messages when you accidentally call methods on nil
  15
+  config.whiny_nils = true
  16
+
  17
+  # Show full error reports and disable caching
  18
+  config.consider_all_requests_local       = true
  19
+  config.action_controller.perform_caching = false
  20
+
  21
+  # Raise exceptions instead of rendering exception templates
  22
+  config.action_dispatch.show_exceptions = false
  23
+
  24
+  # Disable request forgery protection in test environment
  25
+  config.action_controller.allow_forgery_protection    = false
  26
+
  27
+  # Tell Action Mailer not to deliver emails to the real world.
  28
+  # The :test delivery method accumulates sent emails in the
  29
+  # ActionMailer::Base.deliveries array.
  30
+  config.action_mailer.delivery_method = :test
  31
+
  32
+  # Use SQL instead of Active Record's schema dumper when creating the test database.
  33
+  # This is necessary if your schema can't be completely dumped by the schema dumper,
  34
+  # like if you have constraints or database-specific column types
  35
+  # config.active_record.schema_format = :sql
  36
+
  37
+  # Print deprecation notices to the stderr
  38
+  config.active_support.deprecation = :stderr
  39
+end
7  episode-290/zip_coder-after/config/initializers/backtrace_silencers.rb
... ...
@@ -0,0 +1,7 @@
  1
+# Be sure to restart your server when you modify this file.
  2
+
  3
+# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
  4
+# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
  5
+
  6
+# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
  7
+# Rails.backtrace_cleaner.remove_silencers!
10  episode-290/zip_coder-after/config/initializers/inflections.rb
... ...
@@ -0,0 +1,10 @@
  1
+# Be sure to restart your server when you modify this file.
  2
+
  3
+# Add new inflection rules using the following format
  4
+# (all these examples are active by default):
  5
+# ActiveSupport::Inflector.inflections do |inflect|
  6
+#   inflect.plural /^(ox)$/i, '\1en'
  7
+#   inflect.singular /^(ox)en/i, '\1'
  8
+#   inflect.irregular 'person', 'people'
  9
+#   inflect.uncountable %w( fish sheep )
  10
+# end
5  episode-290/zip_coder-after/config/initializers/mime_types.rb
... ...
@@ -0,0 +1,5 @@
  1
+# Be sure to restart your server when you modify this file.
  2
+
  3
+# Add new mime types for use in respond_to blocks:
  4
+# Mime::Type.register "text/richtext", :rtf
  5
+# Mime::Type.register_alias "text/html", :iphone
7  episode-290/zip_coder-after/config/initializers/secret_token.rb
... ...
@@ -0,0 +1,7 @@
  1
+# Be sure to restart your server when you modify this file.
  2
+
  3
+# Your secret key for verifying the integrity of signed cookies.
  4
+# If you change this key, all old signed cookies will become invalid!
  5
+# Make sure the secret is at least 30 characters and all random,
  6
+# no regular words or you'll be exposed to dictionary attacks.
  7
+ZipCoder::Application.config.secret_token = '5a264db2e47e6accc0a462e19646a70650acfc51040101a1b17e5dd28cfc3b31ede1039d561818b4f8c87d82187c6f9ac5ddbfb804817f24c20d5f9b510f44d6'
8  episode-290/zip_coder-after/config/initializers/session_store.rb
... ...
@@ -0,0 +1,8 @@
  1
+# Be sure to restart your server when you modify this file.
  2
+
  3
+ZipCoder::Application.config.session_store :cookie_store, key: '_zip_coder_session'
  4
+
  5
+# Use the database for sessions instead of the cookie-based default,
  6
+# which shouldn't be used to store highly confidential information
  7
+# (create the session table with "rails generate session_migration")
  8
+# ZipCoder::Application.config.session_store :active_record_store
14  episode-290/zip_coder-after/config/initializers/wrap_parameters.rb
... ...
@@ -0,0 +1,14 @@
  1
+# Be sure to restart your server when you modify this file.
  2
+#
  3
+# This file contains settings for ActionController::ParamsWrapper which
  4
+# is enabled by default.
  5
+
  6
+# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
  7
+ActiveSupport.on_load(:action_controller) do
  8
+  wrap_parameters format: [:json]
  9
+end
  10
+
  11
+# Disable root element in JSON by default.
  12
+ActiveSupport.on_load(:active_record) do
  13
+  self.include_root_in_json = false
  14
+end
5  episode-290/zip_coder-after/config/locales/en.yml
... ...
@@ -0,0 +1,5 @@
  1
+# Sample localization file for English. Add more files in this directory for other locales.
  2
+# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
  3
+
  4
+en:
  5
+  hello: "Hello world"
3  episode-290/zip_coder-after/config/routes.rb
... ...
@@ -0,0 +1,3 @@
  1
+ZipCoder::Application.routes.draw do
  2
+  root to: 'zip_code_lookup#index'
  3
+end
7  episode-290/zip_coder-after/db/seeds.rb
... ...
@@ -0,0 +1,7 @@
  1
+# This file should contain all the record creation needed to seed the database with its default values.
  2
+# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
  3
+#
  4
+# Examples:
  5
+#
  6
+#   cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
  7
+#   Mayor.create(name: 'Emanuel', city: cities.first)
2  episode-290/zip_coder-after/doc/README_FOR_APP
... ...
@@ -0,0 +1,2 @@
  1
+Use this README file to introduce your application and point to useful places in the API for learning more.
  2
+Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
0  episode-290/zip_coder-after/log/.gitkeep
No changes.
26  episode-290/zip_coder-after/public/404.html
... ...
@@ -0,0 +1,26 @@
  1
+<!DOCTYPE html>
  2
+<html>
  3
+<head>
  4
+  <title>The page you were looking for doesn't exist (404)</title>
  5
+  <style type="text/css">
  6
+    body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
  7
+    div.dialog {
  8
+      width: 25em;
  9
+      padding: 0 4em;
  10
+      margin: 4em auto 0 auto;
  11
+      border: 1px solid #ccc;
  12
+      border-right-color: #999;
  13
+      border-bottom-color: #999;
  14
+    }
  15
+    h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
  16
+  </style>
  17
+</head>
  18
+
  19
+<body>
  20
+  <!-- This file lives in public/404.html -->
  21
+  <div class="dialog">
  22
+    <h1>The page you were looking for doesn't exist.</h1>
  23
+    <p>You may have mistyped the address or the page may have moved.</p>
  24
+  </div>
  25
+</body>
  26
+</html>
26  episode-290/zip_coder-after/public/422.html
... ...
@@ -0,0 +1,26 @@
  1
+<!DOCTYPE html>
  2
+<html>
  3
+<head>
  4
+  <title>The change you wanted was rejected (422)</title>
  5
+  <style type="text/css">
  6
+    body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
  7
+    div.dialog {
  8
+      width: 25em;
  9
+      padding: 0 4em;
  10
+      margin: 4em auto 0 auto;
  11
+      border: 1px solid #ccc;
  12
+      border-right-color: #999;
  13
+      border-bottom-color: #999;
  14
+    }
  15
+    h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
  16
+  </style>
  17
+</head>
  18
+
  19
+<body>
  20
+  <!-- This file lives in public/422.html -->
  21
+  <div class="dialog">
  22
+    <h1>The change you wanted was rejected.</h1>
  23
+    <p>Maybe you tried to change something you didn't have access to.</p>
  24
+  </div>
  25
+</body>
  26
+</html>
26  episode-290/zip_coder-after/public/500.html
... ...
@@ -0,0 +1,26 @@
  1
+<!DOCTYPE html>
  2
+<html>
  3
+<head>
  4
+  <title>We're sorry, but something went wrong (500)</title>
  5
+  <style type="text/css">
  6
+    body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
  7
+    div.dialog {
  8
+      width: 25em;
  9
+      padding: 0 4em;
  10
+      margin: 4em auto 0 auto;
  11
+      border: 1px solid #ccc;
  12
+      border-right-color: #999;
  13
+      border-bottom-color: #999;
  14
+    }
  15
+    h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
  16
+  </style>
  17
+</head>
  18
+
  19
+<body>
  20
+  <!-- This file lives in public/500.html -->
  21
+  <div class="dialog">
  22
+    <h1>We're sorry, but something went wrong.</h1>
  23
+    <p>We've been notified about this issue and we'll take a look at it shortly.</p>
  24
+  </div>
  25
+</body>
  26
+</html>
0  episode-290/zip_coder-after/public/favicon.ico
No changes.
5  episode-290/zip_coder-after/public/robots.txt
... ...
@@ -0,0 +1,5 @@
  1
+# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
  2
+#
  3
+# To ban all spiders from the entire site uncomment the next two lines:
  4
+# User-Agent: *
  5
+# Disallow: /
6  episode-290/zip_coder-after/script/rails
... ...
@@ -0,0 +1,6 @@
  1
+#!/usr/bin/env ruby
  2
+# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
  3
+
  4
+APP_PATH = File.expand_path('../../config/application',  __FILE__)
  5
+require File.expand_path('../../config/boot',  __FILE__)
  6
+require 'rails/commands'
0  episode-290/zip_coder-after/test/fixtures/.gitkeep
No changes.
0  episode-290/zip_coder-after/test/functional/.gitkeep
No changes.
9  episode-290/zip_coder-after/test/functional/zip_code_lookup_controller_test.rb
... ...
@@ -0,0 +1,9 @@
  1
+require 'test_helper'
  2
+
  3
+class ZipCodeLookupControllerTest < ActionController::TestCase
  4
+  test "should get index" do
  5
+    get :index
  6
+    assert_response :success
  7
+  end
  8
+
  9
+end
0  episode-290/zip_coder-after/test/integration/.gitkeep
No changes.
12  episode-290/zip_coder-after/test/performance/browsing_test.rb
... ...
@@ -0,0 +1,12 @@
  1
+require 'test_helper'
  2
+require 'rails/performance_test_help'
  3
+
  4
+class BrowsingTest < ActionDispatch::PerformanceTest
  5
+  # Refer to the documentation for all available options
  6
+  # self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
  7
+  #                          :output => 'tmp/performance', :formats => [:flat] }
  8
+
  9
+  def test_homepage
  10
+    get '/'
  11
+  end
  12
+end
13  episode-290/zip_coder-after/test/test_helper.rb
... ...
@@ -0,0 +1,13 @@
  1
+ENV["RAILS_ENV"] = "test"
  2
+require File.expand_path('../../config/environment', __FILE__)
  3
+require 'rails/test_help'
  4
+
  5
+class ActiveSupport::TestCase
  6
+  # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
  7
+  #
  8
+  # Note: You'll currently still have to declare fixtures explicitly in integration tests
  9
+  # -- they do not yet inherit this setting
  10
+  fixtures :all
  11
+
  12
+  # Add more helper methods to be used by all tests here...
  13
+end
0  episode-290/zip_coder-after/test/unit/.gitkeep
No changes.
4  episode-290/zip_coder-after/test/unit/helpers/zip_code_lookup_helper_test.rb
... ...
@@ -0,0 +1,4 @@
  1
+require 'test_helper'
  2
+
  3
+class ZipCodeLookupHelperTest < ActionView::TestCase
  4
+end
0  episode-290/zip_coder-after/vendor/assets/stylesheets/.gitkeep
No changes.
0  episode-290/zip_coder-after/vendor/plugins/.gitkeep
No changes.
5  episode-290/zip_coder-before/.gitignore
... ...
@@ -0,0 +1,5 @@
  1
+.bundle
  2
+db/*.sqlite3
  3
+log/*.log
  4
+tmp/
  5
+.sass-cache/
16  episode-290/zip_coder-before/Gemfile
... ...
@@ -0,0 +1,16 @@
  1
+source 'http://rubygems.org'
  2
+
  3
+gem 'rails', '3.1.1'
  4
+gem 'sqlite3'
  5
+
  6
+
  7
+# Gems used only for assets and not required
  8
+# in production environments by default.
  9
+group :assets do
  10
+  gem 'sass-rails',   '~> 3.1.4'
  11
+  gem 'coffee-rails', '~> 3.1.1'
  12
+  gem 'uglifier', '>= 1.0.3'
  13
+end
  14
+
  15
+gem 'jquery-rails'
  16
+
119  episode-290/zip_coder-before/Gemfile.lock
... ...
@@ -0,0 +1,119 @@
  1
+GEM
  2
+  remote: http://rubygems.org/
  3
+  specs:
  4
+    actionmailer (3.1.1)
  5
+      actionpack (= 3.1.1)
  6
+      mail (~> 2.3.0)
  7
+    actionpack (3.1.1)
  8
+      activemodel (= 3.1.1)
  9
+      activesupport (= 3.1.1)
  10
+      builder (~> 3.0.0)
  11
+      erubis (~> 2.7.0)
  12
+      i18n (~> 0.6)
  13
+      rack (~> 1.3.2)
  14
+      rack-cache (~> 1.1)
  15
+      rack-mount (~> 0.8.2)
  16
+      rack-test (~> 0.6.1)
  17
+      sprockets (~> 2.0.2)
  18
+    activemodel (3.1.1)
  19
+      activesupport (= 3.1.1)
  20
+      builder (~> 3.0.0)
  21
+      i18n (~> 0.6)
  22
+    activerecord (3.1.1)
  23
+      activemodel (= 3.1.1)
  24
+      activesupport (= 3.1.1)
  25
+      arel (~> 2.2.1)
  26
+      tzinfo (~> 0.3.29)
  27
+    activeresource (3.1.1)
  28
+      activemodel (= 3.1.1)
  29
+      activesupport (= 3.1.1)
  30
+    activesupport (3.1.1)
  31
+      multi_json (~> 1.0)
  32
+    ansi (1.3.0)
  33
+    arel (2.2.1)
  34
+    builder (3.0.0)
  35
+    coffee-rails (3.1.1)
  36
+      coffee-script (>= 2.2.0)
  37
+      railties (~> 3.1.0)
  38
+    coffee-script (2.2.0)
  39