Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adding episodes 334 and 335

  • Loading branch information...
commit 07c6edc3b09530a7e533f8675241813389a99d81 1 parent f72b83a
@ryanb authored
Showing with 4,619 additions and 0 deletions.
  1. +11 −0 episode-334/README.md
  2. +15 −0 episode-334/railscasts-after/.gitignore
  3. +40 −0 episode-334/railscasts-after/Gemfile
  4. +120 −0 episode-334/railscasts-after/Gemfile.lock
  5. +8 −0 episode-334/railscasts-after/README.rdoc
  6. +7 −0 episode-334/railscasts-after/Rakefile
  7. BIN  episode-334/railscasts-after/app/assets/images/icons-s1286bd1660.png
  8. BIN  episode-334/railscasts-after/app/assets/images/icons/facebook.png
  9. BIN  episode-334/railscasts-after/app/assets/images/icons/itunes.png
  10. BIN  episode-334/railscasts-after/app/assets/images/icons/rss.png
  11. BIN  episode-334/railscasts-after/app/assets/images/icons/twitter.png
  12. BIN  episode-334/railscasts-after/app/assets/images/railscasts_logo.png
  13. +15 −0 episode-334/railscasts-after/app/assets/javascripts/application.js
  14. +3 −0  episode-334/railscasts-after/app/assets/stylesheets/application.css.scss
  15. +99 −0 episode-334/railscasts-after/app/assets/stylesheets/layout.css.scss
  16. +3 −0  episode-334/railscasts-after/app/controllers/application_controller.rb
  17. +4 −0 episode-334/railscasts-after/app/controllers/home_controller.rb
  18. +2 −0  episode-334/railscasts-after/app/helpers/application_helper.rb
  19. +2 −0  episode-334/railscasts-after/app/helpers/home_helper.rb
  20. 0  episode-334/railscasts-after/app/mailers/.gitkeep
  21. 0  episode-334/railscasts-after/app/models/.gitkeep
  22. +2 −0  episode-334/railscasts-after/app/views/home/index.html.erb
  23. +49 −0 episode-334/railscasts-after/app/views/layouts/application.html.erb
  24. +4 −0 episode-334/railscasts-after/config.ru
  25. +59 −0 episode-334/railscasts-after/config/application.rb
  26. +6 −0 episode-334/railscasts-after/config/boot.rb
  27. +25 −0 episode-334/railscasts-after/config/database.yml
  28. +5 −0 episode-334/railscasts-after/config/environment.rb
  29. +37 −0 episode-334/railscasts-after/config/environments/development.rb
  30. +67 −0 episode-334/railscasts-after/config/environments/production.rb
  31. +37 −0 episode-334/railscasts-after/config/environments/test.rb
  32. +7 −0 episode-334/railscasts-after/config/initializers/backtrace_silencers.rb
  33. +15 −0 episode-334/railscasts-after/config/initializers/inflections.rb
  34. +5 −0 episode-334/railscasts-after/config/initializers/mime_types.rb
  35. +7 −0 episode-334/railscasts-after/config/initializers/secret_token.rb
  36. +8 −0 episode-334/railscasts-after/config/initializers/session_store.rb
  37. +14 −0 episode-334/railscasts-after/config/initializers/wrap_parameters.rb
  38. +5 −0 episode-334/railscasts-after/config/locales/en.yml
  39. +3 −0  episode-334/railscasts-after/config/routes.rb
  40. +16 −0 episode-334/railscasts-after/db/schema.rb
  41. +7 −0 episode-334/railscasts-after/db/seeds.rb
  42. +2 −0  episode-334/railscasts-after/doc/README_FOR_APP
  43. 0  episode-334/railscasts-after/lib/assets/.gitkeep
  44. 0  episode-334/railscasts-after/lib/tasks/.gitkeep
  45. 0  episode-334/railscasts-after/log/.gitkeep
  46. +26 −0 episode-334/railscasts-after/public/404.html
  47. +26 −0 episode-334/railscasts-after/public/422.html
  48. +25 −0 episode-334/railscasts-after/public/500.html
  49. 0  episode-334/railscasts-after/public/favicon.ico
  50. +5 −0 episode-334/railscasts-after/public/robots.txt
  51. +6 −0 episode-334/railscasts-after/script/rails
  52. 0  episode-334/railscasts-after/test/fixtures/.gitkeep
  53. 0  episode-334/railscasts-after/test/functional/.gitkeep
  54. +9 −0 episode-334/railscasts-after/test/functional/home_controller_test.rb
  55. 0  episode-334/railscasts-after/test/integration/.gitkeep
  56. +12 −0 episode-334/railscasts-after/test/performance/browsing_test.rb
  57. +13 −0 episode-334/railscasts-after/test/test_helper.rb
  58. 0  episode-334/railscasts-after/test/unit/.gitkeep
  59. +4 −0 episode-334/railscasts-after/test/unit/helpers/home_helper_test.rb
  60. 0  episode-334/railscasts-after/vendor/assets/javascripts/.gitkeep
  61. 0  episode-334/railscasts-after/vendor/assets/stylesheets/.gitkeep
  62. 0  episode-334/railscasts-after/vendor/plugins/.gitkeep
  63. +15 −0 episode-334/railscasts-before/.gitignore
  64. +38 −0 episode-334/railscasts-before/Gemfile
  65. +111 −0 episode-334/railscasts-before/Gemfile.lock
  66. +8 −0 episode-334/railscasts-before/README.rdoc
  67. +7 −0 episode-334/railscasts-before/Rakefile
  68. BIN  episode-334/railscasts-before/app/assets/images/icons/facebook.png
  69. BIN  episode-334/railscasts-before/app/assets/images/icons/itunes.png
  70. BIN  episode-334/railscasts-before/app/assets/images/icons/rss.png
  71. BIN  episode-334/railscasts-before/app/assets/images/icons/twitter.png
  72. BIN  episode-334/railscasts-before/app/assets/images/railscasts_logo.png
  73. +15 −0 episode-334/railscasts-before/app/assets/javascripts/application.js
  74. +13 −0 episode-334/railscasts-before/app/assets/stylesheets/application.css
  75. +105 −0 episode-334/railscasts-before/app/assets/stylesheets/layout.css.scss
  76. +3 −0  episode-334/railscasts-before/app/controllers/application_controller.rb
  77. +4 −0 episode-334/railscasts-before/app/controllers/home_controller.rb
  78. +2 −0  episode-334/railscasts-before/app/helpers/application_helper.rb
  79. +2 −0  episode-334/railscasts-before/app/helpers/home_helper.rb
  80. 0  episode-334/railscasts-before/app/mailers/.gitkeep
  81. 0  episode-334/railscasts-before/app/models/.gitkeep
  82. +2 −0  episode-334/railscasts-before/app/views/home/index.html.erb
  83. +49 −0 episode-334/railscasts-before/app/views/layouts/application.html.erb
  84. +4 −0 episode-334/railscasts-before/config.ru
  85. +59 −0 episode-334/railscasts-before/config/application.rb
  86. +6 −0 episode-334/railscasts-before/config/boot.rb
  87. +25 −0 episode-334/railscasts-before/config/database.yml
  88. +5 −0 episode-334/railscasts-before/config/environment.rb
  89. +37 −0 episode-334/railscasts-before/config/environments/development.rb
  90. +67 −0 episode-334/railscasts-before/config/environments/production.rb
  91. +37 −0 episode-334/railscasts-before/config/environments/test.rb
  92. +7 −0 episode-334/railscasts-before/config/initializers/backtrace_silencers.rb
  93. +15 −0 episode-334/railscasts-before/config/initializers/inflections.rb
  94. +5 −0 episode-334/railscasts-before/config/initializers/mime_types.rb
  95. +7 −0 episode-334/railscasts-before/config/initializers/secret_token.rb
  96. +8 −0 episode-334/railscasts-before/config/initializers/session_store.rb
  97. +14 −0 episode-334/railscasts-before/config/initializers/wrap_parameters.rb
  98. +5 −0 episode-334/railscasts-before/config/locales/en.yml
  99. +3 −0  episode-334/railscasts-before/config/routes.rb
  100. +16 −0 episode-334/railscasts-before/db/schema.rb
  101. +7 −0 episode-334/railscasts-before/db/seeds.rb
  102. +2 −0  episode-334/railscasts-before/doc/README_FOR_APP
  103. 0  episode-334/railscasts-before/lib/assets/.gitkeep
  104. 0  episode-334/railscasts-before/lib/tasks/.gitkeep
  105. 0  episode-334/railscasts-before/log/.gitkeep
  106. +26 −0 episode-334/railscasts-before/public/404.html
  107. +26 −0 episode-334/railscasts-before/public/422.html
  108. +25 −0 episode-334/railscasts-before/public/500.html
  109. 0  episode-334/railscasts-before/public/favicon.ico
  110. +5 −0 episode-334/railscasts-before/public/robots.txt
  111. +6 −0 episode-334/railscasts-before/script/rails
  112. 0  episode-334/railscasts-before/test/fixtures/.gitkeep
  113. 0  episode-334/railscasts-before/test/functional/.gitkeep
  114. +9 −0 episode-334/railscasts-before/test/functional/home_controller_test.rb
  115. 0  episode-334/railscasts-before/test/integration/.gitkeep
  116. +12 −0 episode-334/railscasts-before/test/performance/browsing_test.rb
  117. +13 −0 episode-334/railscasts-before/test/test_helper.rb
  118. 0  episode-334/railscasts-before/test/unit/.gitkeep
  119. +4 −0 episode-334/railscasts-before/test/unit/helpers/home_helper_test.rb
  120. 0  episode-334/railscasts-before/vendor/assets/javascripts/.gitkeep
  121. 0  episode-334/railscasts-before/vendor/assets/stylesheets/.gitkeep
  122. 0  episode-334/railscasts-before/vendor/plugins/.gitkeep
  123. +128 −0 episode-335/README.md
  124. +17 −0 episode-335/blog-apache/.gitignore
  125. +5 −0 episode-335/blog-apache/Capfile
  126. +38 −0 episode-335/blog-apache/Gemfile
  127. +126 −0 episode-335/blog-apache/Gemfile.lock
  128. +3 −0  episode-335/blog-apache/README.rdoc
  129. +7 −0 episode-335/blog-apache/Rakefile
  130. BIN  episode-335/blog-apache/app/assets/images/rails.png
  131. +15 −0 episode-335/blog-apache/app/assets/javascripts/application.js
  132. +3 −0  episode-335/blog-apache/app/assets/javascripts/articles.js.coffee
  133. +13 −0 episode-335/blog-apache/app/assets/stylesheets/application.css
  134. +3 −0  episode-335/blog-apache/app/assets/stylesheets/articles.css.scss
  135. +56 −0 episode-335/blog-apache/app/assets/stylesheets/scaffolds.css.scss
  136. +3 −0  episode-335/blog-apache/app/controllers/application_controller.rb
  137. +83 −0 episode-335/blog-apache/app/controllers/articles_controller.rb
  138. +2 −0  episode-335/blog-apache/app/helpers/application_helper.rb
  139. +2 −0  episode-335/blog-apache/app/helpers/articles_helper.rb
  140. 0  episode-335/blog-apache/app/mailers/.gitkeep
  141. 0  episode-335/blog-apache/app/models/.gitkeep
  142. +2 −0  episode-335/blog-apache/app/models/article.rb
  143. +25 −0 episode-335/blog-apache/app/views/articles/_form.html.erb
  144. +6 −0 episode-335/blog-apache/app/views/articles/edit.html.erb
  145. +25 −0 episode-335/blog-apache/app/views/articles/index.html.erb
  146. +5 −0 episode-335/blog-apache/app/views/articles/new.html.erb
  147. +15 −0 episode-335/blog-apache/app/views/articles/show.html.erb
  148. +14 −0 episode-335/blog-apache/app/views/layouts/application.html.erb
  149. +4 −0 episode-335/blog-apache/config.ru
  150. +11 −0 episode-335/blog-apache/config/apache.conf
  151. +59 −0 episode-335/blog-apache/config/application.rb
  152. +6 −0 episode-335/blog-apache/config/boot.rb
  153. +42 −0 episode-335/blog-apache/config/database.example.yml
  154. +49 −0 episode-335/blog-apache/config/deploy.rb
  155. +5 −0 episode-335/blog-apache/config/environment.rb
  156. +37 −0 episode-335/blog-apache/config/environments/development.rb
  157. +67 −0 episode-335/blog-apache/config/environments/production.rb
  158. +37 −0 episode-335/blog-apache/config/environments/test.rb
  159. +7 −0 episode-335/blog-apache/config/initializers/backtrace_silencers.rb
  160. +15 −0 episode-335/blog-apache/config/initializers/inflections.rb
  161. +5 −0 episode-335/blog-apache/config/initializers/mime_types.rb
  162. +7 −0 episode-335/blog-apache/config/initializers/secret_token.rb
  163. +8 −0 episode-335/blog-apache/config/initializers/session_store.rb
  164. +14 −0 episode-335/blog-apache/config/initializers/wrap_parameters.rb
  165. +5 −0 episode-335/blog-apache/config/locales/en.yml
  166. +60 −0 episode-335/blog-apache/config/routes.rb
  167. +10 −0 episode-335/blog-apache/db/migrate/20120321050636_create_articles.rb
  168. +7 −0 episode-335/blog-apache/db/seeds.rb
  169. +2 −0  episode-335/blog-apache/doc/README_FOR_APP
  170. 0  episode-335/blog-apache/lib/assets/.gitkeep
  171. 0  episode-335/blog-apache/lib/tasks/.gitkeep
  172. 0  episode-335/blog-apache/log/.gitkeep
  173. +26 −0 episode-335/blog-apache/public/404.html
  174. +26 −0 episode-335/blog-apache/public/422.html
  175. +25 −0 episode-335/blog-apache/public/500.html
  176. 0  episode-335/blog-apache/public/favicon.ico
  177. +241 −0 episode-335/blog-apache/public/index.html
  178. +5 −0 episode-335/blog-apache/public/robots.txt
  179. +6 −0 episode-335/blog-apache/script/rails
  180. 0  episode-335/blog-apache/test/fixtures/.gitkeep
  181. +9 −0 episode-335/blog-apache/test/fixtures/articles.yml
  182. 0  episode-335/blog-apache/test/functional/.gitkeep
  183. +49 −0 episode-335/blog-apache/test/functional/articles_controller_test.rb
  184. 0  episode-335/blog-apache/test/integration/.gitkeep
  185. +12 −0 episode-335/blog-apache/test/performance/browsing_test.rb
  186. +13 −0 episode-335/blog-apache/test/test_helper.rb
  187. 0  episode-335/blog-apache/test/unit/.gitkeep
  188. +7 −0 episode-335/blog-apache/test/unit/article_test.rb
  189. +4 −0 episode-335/blog-apache/test/unit/helpers/articles_helper_test.rb
  190. 0  episode-335/blog-apache/vendor/assets/javascripts/.gitkeep
  191. 0  episode-335/blog-apache/vendor/assets/stylesheets/.gitkeep
  192. 0  episode-335/blog-apache/vendor/plugins/.gitkeep
  193. +17 −0 episode-335/blog-nginx/.gitignore
  194. +5 −0 episode-335/blog-nginx/Capfile
  195. +38 −0 episode-335/blog-nginx/Gemfile
  196. +133 −0 episode-335/blog-nginx/Gemfile.lock
  197. +3 −0  episode-335/blog-nginx/README.rdoc
  198. +7 −0 episode-335/blog-nginx/Rakefile
  199. BIN  episode-335/blog-nginx/app/assets/images/rails.png
  200. +15 −0 episode-335/blog-nginx/app/assets/javascripts/application.js
  201. +3 −0  episode-335/blog-nginx/app/assets/javascripts/articles.js.coffee
  202. +13 −0 episode-335/blog-nginx/app/assets/stylesheets/application.css
  203. +3 −0  episode-335/blog-nginx/app/assets/stylesheets/articles.css.scss
  204. +56 −0 episode-335/blog-nginx/app/assets/stylesheets/scaffolds.css.scss
  205. +3 −0  episode-335/blog-nginx/app/controllers/application_controller.rb
  206. +83 −0 episode-335/blog-nginx/app/controllers/articles_controller.rb
  207. +2 −0  episode-335/blog-nginx/app/helpers/application_helper.rb
  208. +2 −0  episode-335/blog-nginx/app/helpers/articles_helper.rb
  209. 0  episode-335/blog-nginx/app/mailers/.gitkeep
  210. 0  episode-335/blog-nginx/app/models/.gitkeep
  211. +2 −0  episode-335/blog-nginx/app/models/article.rb
  212. +25 −0 episode-335/blog-nginx/app/views/articles/_form.html.erb
  213. +6 −0 episode-335/blog-nginx/app/views/articles/edit.html.erb
  214. +25 −0 episode-335/blog-nginx/app/views/articles/index.html.erb
  215. +5 −0 episode-335/blog-nginx/app/views/articles/new.html.erb
  216. +15 −0 episode-335/blog-nginx/app/views/articles/show.html.erb
  217. +14 −0 episode-335/blog-nginx/app/views/layouts/application.html.erb
  218. +4 −0 episode-335/blog-nginx/config.ru
  219. +59 −0 episode-335/blog-nginx/config/application.rb
  220. +6 −0 episode-335/blog-nginx/config/boot.rb
  221. +55 −0 episode-335/blog-nginx/config/database.example.yml
  222. +51 −0 episode-335/blog-nginx/config/deploy.rb
  223. +5 −0 episode-335/blog-nginx/config/environment.rb
  224. +37 −0 episode-335/blog-nginx/config/environments/development.rb
  225. +67 −0 episode-335/blog-nginx/config/environments/production.rb
  226. +37 −0 episode-335/blog-nginx/config/environments/test.rb
  227. +7 −0 episode-335/blog-nginx/config/initializers/backtrace_silencers.rb
  228. +15 −0 episode-335/blog-nginx/config/initializers/inflections.rb
  229. +5 −0 episode-335/blog-nginx/config/initializers/mime_types.rb
  230. +7 −0 episode-335/blog-nginx/config/initializers/secret_token.rb
  231. +8 −0 episode-335/blog-nginx/config/initializers/session_store.rb
  232. +14 −0 episode-335/blog-nginx/config/initializers/wrap_parameters.rb
  233. +5 −0 episode-335/blog-nginx/config/locales/en.yml
  234. +27 −0 episode-335/blog-nginx/config/nginx.conf
  235. +60 −0 episode-335/blog-nginx/config/routes.rb
  236. +9 −0 episode-335/blog-nginx/config/unicorn.rb
  237. +84 −0 episode-335/blog-nginx/config/unicorn_init.sh
  238. +10 −0 episode-335/blog-nginx/db/migrate/20120321050636_create_articles.rb
  239. +7 −0 episode-335/blog-nginx/db/seeds.rb
  240. +2 −0  episode-335/blog-nginx/doc/README_FOR_APP
  241. 0  episode-335/blog-nginx/lib/assets/.gitkeep
  242. 0  episode-335/blog-nginx/lib/tasks/.gitkeep
  243. 0  episode-335/blog-nginx/log/.gitkeep
  244. +26 −0 episode-335/blog-nginx/public/404.html
  245. +26 −0 episode-335/blog-nginx/public/422.html
  246. +25 −0 episode-335/blog-nginx/public/500.html
  247. 0  episode-335/blog-nginx/public/favicon.ico
  248. +241 −0 episode-335/blog-nginx/public/index.html
  249. +5 −0 episode-335/blog-nginx/public/robots.txt
  250. +6 −0 episode-335/blog-nginx/script/rails
  251. 0  episode-335/blog-nginx/test/fixtures/.gitkeep
  252. +9 −0 episode-335/blog-nginx/test/fixtures/articles.yml
  253. 0  episode-335/blog-nginx/test/functional/.gitkeep
  254. +49 −0 episode-335/blog-nginx/test/functional/articles_controller_test.rb
  255. 0  episode-335/blog-nginx/test/integration/.gitkeep
  256. +12 −0 episode-335/blog-nginx/test/performance/browsing_test.rb
  257. +13 −0 episode-335/blog-nginx/test/test_helper.rb
  258. 0  episode-335/blog-nginx/test/unit/.gitkeep
  259. +7 −0 episode-335/blog-nginx/test/unit/article_test.rb
  260. +4 −0 episode-335/blog-nginx/test/unit/helpers/articles_helper_test.rb
  261. 0  episode-335/blog-nginx/vendor/assets/javascripts/.gitkeep
  262. 0  episode-335/blog-nginx/vendor/assets/stylesheets/.gitkeep
  263. 0  episode-335/blog-nginx/vendor/plugins/.gitkeep
View
11 episode-334/README.md
@@ -0,0 +1,11 @@
+# RailsCasts Episode #334: Compass & CSS Sprites
+
+http://railscasts.com/episodes/334-compass-css-sprites
+
+Requires Ruby 1.9.2 or higher.
+
+Commands used in episode:
+
+```
+
+```
View
15 episode-334/railscasts-after/.gitignore
@@ -0,0 +1,15 @@
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+#
+# If you find yourself ignoring temporary files generated by your text editor
+# or operating system, you probably want to add a global ignore instead:
+# git config --global core.excludesfile ~/.gitignore_global
+
+# Ignore bundler config
+/.bundle
+
+# Ignore the default SQLite database.
+/db/*.sqlite3
+
+# Ignore all logfiles and tempfiles.
+/log/*.log
+/tmp
View
40 episode-334/railscasts-after/Gemfile
@@ -0,0 +1,40 @@
+source 'https://rubygems.org'
+
+gem 'rails', '3.2.2'
+
+# Bundle edge Rails instead:
+# gem 'rails', :git => 'git://github.com/rails/rails.git'
+
+gem 'sqlite3'
+
+
+# Gems used only for assets and not required
+# in production environments by default.
+group :assets do
+ gem 'sass-rails', '~> 3.2.3'
+ gem 'coffee-rails', '~> 3.2.1'
+
+ # See https://github.com/sstephenson/execjs#readme for more supported runtimes
+ # gem 'therubyracer'
+
+ gem 'uglifier', '>= 1.0.3'
+
+ gem 'compass-rails'
+end
+
+gem 'jquery-rails'
+
+# To use ActiveModel has_secure_password
+# gem 'bcrypt-ruby', '~> 3.0.0'
+
+# To use Jbuilder templates for JSON
+# gem 'jbuilder'
+
+# Use unicorn as the app server
+# gem 'unicorn'
+
+# Deploy with Capistrano
+# gem 'capistrano'
+
+# To use debugger
+# gem 'ruby-debug19', :require => 'ruby-debug'
View
120 episode-334/railscasts-after/Gemfile.lock
@@ -0,0 +1,120 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ actionmailer (3.2.2)
+ actionpack (= 3.2.2)
+ mail (~> 2.4.0)
+ actionpack (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ journey (~> 1.0.1)
+ rack (~> 1.4.0)
+ rack-cache (~> 1.1)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.1.2)
+ activemodel (3.2.2)
+ activesupport (= 3.2.2)
+ builder (~> 3.0.0)
+ activerecord (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
+ arel (~> 3.0.2)
+ tzinfo (~> 0.3.29)
+ activeresource (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
+ activesupport (3.2.2)
+ i18n (~> 0.6)
+ multi_json (~> 1.0)
+ arel (3.0.2)
+ builder (3.0.0)
+ chunky_png (1.2.5)
+ coffee-rails (3.2.2)
+ coffee-script (>= 2.2.0)
+ railties (~> 3.2.0)
+ coffee-script (2.2.0)
+ coffee-script-source
+ execjs
+ coffee-script-source (1.2.0)
+ compass (0.12.1)
+ chunky_png (~> 1.2)
+ fssm (>= 0.2.7)
+ sass (~> 3.1)
+ compass-rails (1.0.1)
+ compass (~> 0.12.0)
+ erubis (2.7.0)
+ execjs (1.3.0)
+ multi_json (~> 1.0)
+ fssm (0.2.8.1)
+ hike (1.2.1)
+ i18n (0.6.0)
+ journey (1.0.3)
+ jquery-rails (2.0.1)
+ railties (>= 3.2.0, < 5.0)
+ thor (~> 0.14)
+ json (1.6.5)
+ mail (2.4.4)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.17.2)
+ multi_json (1.1.0)
+ polyglot (0.3.3)
+ rack (1.4.1)
+ rack-cache (1.2)
+ rack (>= 0.4)
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.1)
+ rack (>= 1.0)
+ rails (3.2.2)
+ actionmailer (= 3.2.2)
+ actionpack (= 3.2.2)
+ activerecord (= 3.2.2)
+ activeresource (= 3.2.2)
+ activesupport (= 3.2.2)
+ bundler (~> 1.0)
+ railties (= 3.2.2)
+ railties (3.2.2)
+ actionpack (= 3.2.2)
+ activesupport (= 3.2.2)
+ rack-ssl (~> 1.3.2)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (~> 0.14.6)
+ rake (0.9.2.2)
+ rdoc (3.12)
+ json (~> 1.4)
+ sass (3.1.15)
+ sass-rails (3.2.5)
+ railties (~> 3.2.0)
+ sass (>= 3.1.10)
+ tilt (~> 1.3)
+ sprockets (2.1.2)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ sqlite3 (1.3.5)
+ thor (0.14.6)
+ tilt (1.3.3)
+ treetop (1.4.10)
+ polyglot
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.32)
+ uglifier (1.2.3)
+ execjs (>= 0.3.0)
+ multi_json (>= 1.0.2)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ coffee-rails (~> 3.2.1)
+ compass-rails
+ jquery-rails
+ rails (= 3.2.2)
+ sass-rails (~> 3.2.3)
+ sqlite3
+ uglifier (>= 1.0.3)
View
8 episode-334/railscasts-after/README.rdoc
@@ -0,0 +1,8 @@
+= RailsCasts Example Application
+
+Run these commands to try it out.
+
+ bundle
+ rails s
+
+Requires Ruby 1.9.2 or higher.
View
7 episode-334/railscasts-after/Rakefile
@@ -0,0 +1,7 @@
+#!/usr/bin/env rake
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require File.expand_path('../config/application', __FILE__)
+
+Railscasts::Application.load_tasks
View
BIN  episode-334/railscasts-after/app/assets/images/icons-s1286bd1660.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  episode-334/railscasts-after/app/assets/images/icons/facebook.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  episode-334/railscasts-after/app/assets/images/icons/itunes.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  episode-334/railscasts-after/app/assets/images/icons/rss.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  episode-334/railscasts-after/app/assets/images/icons/twitter.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  episode-334/railscasts-after/app/assets/images/railscasts_logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
15 episode-334/railscasts-after/app/assets/javascripts/application.js
@@ -0,0 +1,15 @@
+// This is a manifest file that'll be compiled into application.js, which will include all the files
+// listed below.
+//
+// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
+// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
+//
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// the compiled file.
+//
+// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
+// GO AFTER THE REQUIRES BELOW.
+//
+//= require jquery
+//= require jquery_ujs
+//= require_tree .
View
3  episode-334/railscasts-after/app/assets/stylesheets/application.css.scss
@@ -0,0 +1,3 @@
+@import "compass";
+@import "compass/reset";
+@import "layout";
View
99 episode-334/railscasts-after/app/assets/stylesheets/layout.css.scss
@@ -0,0 +1,99 @@
+body {
+ background-color: #FFF;
+ font-family: Verdana, Geneva, sans-serif;
+ font-size: 14px;
+ margin: 0;
+ line-height: 1.2em;
+}
+
+h1 {
+ font-size: 28px;
+ font-weight: bold;
+ margin: 18px 0;
+}
+
+a {
+ color: #1B97F2;
+ text-decoration: none;
+ &:hover { text-decoration: underline; }
+}
+
+ul.horizontal {
+ @include horizontal-list;
+}
+
+#top {
+ position: relative;
+ padding-top: 1px;
+ .logo {
+ margin-top: 50px;
+ margin-left: 100px;
+ padding-bottom: 10px;
+ }
+ .user_nav {
+ color: #777;
+ font-size: 12px;
+ position: absolute;
+ top: 15px;
+ right: 100px;
+ a {
+ color: #777;
+ text-decoration: underline;
+ }
+ }
+}
+
+@import "icons/*.png";
+@include all-icons-sprites;
+
+#subscribe {
+ position: absolute;
+ bottom: 10px;
+ right: 100px;
+ li {
+ position: relative;
+ margin-left: 8px;
+ font-size: 12px;
+ }
+ a {
+ display: block;
+ width: 34px;
+ height: 34px;
+ }
+}
+
+
+#nav_bar {
+ position: relative;
+ padding: 8px 100px;
+ margin-bottom: 15px;
+ border-top: solid 1px #FFF;
+ border-bottom: solid 3px #DE9F00;
+ background-color: #333;
+ @include background-image(linear-gradient(#5c5c5c, #111111));
+
+ .nav {
+ float: right;
+ padding-top: 2px;
+ li {
+ padding-left: 25px;
+ font-size: 14px;
+ color: #BBB;
+ a { color: #FFF; }
+ }
+ }
+}
+
+#main {
+ max-width: 1500px;
+ margin: 0 100px;
+ margin-top: 35px;
+}
+
+#footer {
+ clear: both;
+ font-size: 11px;
+ text-align: center;
+ padding: 25px 0;
+ color: #555;
+}
View
3  episode-334/railscasts-after/app/controllers/application_controller.rb
@@ -0,0 +1,3 @@
+class ApplicationController < ActionController::Base
+ protect_from_forgery
+end
View
4 episode-334/railscasts-after/app/controllers/home_controller.rb
@@ -0,0 +1,4 @@
+class HomeController < ApplicationController
+ def index
+ end
+end
View
2  episode-334/railscasts-after/app/helpers/application_helper.rb
@@ -0,0 +1,2 @@
+module ApplicationHelper
+end
View
2  episode-334/railscasts-after/app/helpers/home_helper.rb
@@ -0,0 +1,2 @@
+module HomeHelper
+end
View
0  episode-334/railscasts-after/app/mailers/.gitkeep
No changes.
View
0  episode-334/railscasts-after/app/models/.gitkeep
No changes.
View
2  episode-334/railscasts-after/app/views/home/index.html.erb
@@ -0,0 +1,2 @@
+<h1>Welcome</h1>
+<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
View
49 episode-334/railscasts-after/app/views/layouts/application.html.erb
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Ruby on Rails Screencasts - RailsCasts</title>
+ <%= stylesheet_link_tag "application", media: "all" %>
+ <%= javascript_include_tag "application" %>
+ <%= csrf_meta_tags %>
+ </head>
+ <body>
+ <div id="top">
+ <div class="logo"><%= link_to image_tag("railscasts_logo.png", alt: "RailsCasts"), root_path %></div>
+ <div class="user_nav">
+ <%= link_to "Sign in through GitHub" %>
+ </div>
+ <ul id="subscribe" class="horizontal">
+ <li><a class="icons-itunes" href="/itunes"></a></li>
+ <li><a class="icons-twitter" href="/twitter"></a></li>
+ <li><a class="icons-facebook" href="/facebook"></a></li>
+ <li><a class="icons-rss" href="/rss"></a></li>
+ </ul>
+ </div>
+
+ <div id="nav_bar">
+ <ul class="nav horizontal">
+ <li><%= link_to "Browse Episodes" %></li>
+ <li><%= link_to "RailsCasts Pro" %></li>
+ <li><%= link_to "About" %></li>
+ <li><%= link_to "Feedback" %></li>
+ </ul>
+ <%= form_tag "/episodes", method: "get" do %>
+ <%= text_field_tag :search, params[:search], :size => 35 %>
+ <%= submit_tag "Search Episodes", :name => nil %>
+ <% end %>
+ </div>
+
+ <% flash.each do |name, msg| %>
+ <%= content_tag(:div, raw(msg), id: "flash_#{name}") %>
+ <% end %>
+
+ <div id="main">
+ <%= yield %>
+ </div>
+ <div id="footer">
+ <div class="inner">
+ &copy;<%= Date.today.year %> RailsCasts
+ </div>
+ </div>
+ </body>
+</html>
View
4 episode-334/railscasts-after/config.ru
@@ -0,0 +1,4 @@
+# This file is used by Rack-based servers to start the application.
+
+require ::File.expand_path('../config/environment', __FILE__)
+run Railscasts::Application
View
59 episode-334/railscasts-after/config/application.rb
@@ -0,0 +1,59 @@
+require File.expand_path('../boot', __FILE__)
+
+require 'rails/all'
+
+if defined?(Bundler)
+ # If you precompile assets before deploying to production, use this line
+ Bundler.require(*Rails.groups(:assets => %w(development test)))
+ # If you want your assets lazily compiled in production, use this line
+ # Bundler.require(:default, :assets, Rails.env)
+end
+
+module Railscasts
+ class Application < Rails::Application
+ # Settings in config/environments/* take precedence over those specified here.
+ # Application configuration should go into files in config/initializers
+ # -- all .rb files in that directory are automatically loaded.
+
+ # Custom directories with classes and modules you want to be autoloadable.
+ # config.autoload_paths += %W(#{config.root}/extras)
+
+ # Only load the plugins named here, in the order given (default is alphabetical).
+ # :all can be used as a placeholder for all plugins not explicitly named.
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
+
+ # Activate observers that should always be running.
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
+
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
+ # config.time_zone = 'Central Time (US & Canada)'
+
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
+ # config.i18n.default_locale = :de
+
+ # Configure the default encoding used in templates for Ruby 1.9.
+ config.encoding = "utf-8"
+
+ # Configure sensitive parameters which will be filtered from the log file.
+ config.filter_parameters += [:password]
+
+ # Use SQL instead of Active Record's schema dumper when creating the database.
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
+ # like if you have constraints or database-specific column types
+ # config.active_record.schema_format = :sql
+
+ # Enforce whitelist mode for mass assignment.
+ # This will create an empty whitelist of attributes available for mass-assignment for all models
+ # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
+ # parameters by using an attr_accessible or attr_protected declaration.
+ # config.active_record.whitelist_attributes = true
+
+ # Enable the asset pipeline
+ config.assets.enabled = true
+
+ # Version of your assets, change this if you want to expire all your assets
+ config.assets.version = '1.0'
+ end
+end
View
6 episode-334/railscasts-after/config/boot.rb
@@ -0,0 +1,6 @@
+require 'rubygems'
+
+# Set up gems listed in the Gemfile.
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
+
+require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
View
25 episode-334/railscasts-after/config/database.yml
@@ -0,0 +1,25 @@
+# SQLite version 3.x
+# gem install sqlite3
+#
+# Ensure the SQLite 3 gem is defined in your Gemfile
+# gem 'sqlite3'
+development:
+ adapter: sqlite3
+ database: db/development.sqlite3
+ pool: 5
+ timeout: 5000
+
+# Warning: The database defined as "test" will be erased and
+# re-generated from your development database when you run "rake".
+# Do not set this db to the same as development or production.
+test:
+ adapter: sqlite3
+ database: db/test.sqlite3
+ pool: 5
+ timeout: 5000
+
+production:
+ adapter: sqlite3
+ database: db/production.sqlite3
+ pool: 5
+ timeout: 5000
View
5 episode-334/railscasts-after/config/environment.rb
@@ -0,0 +1,5 @@
+# Load the rails application
+require File.expand_path('../application', __FILE__)
+
+# Initialize the rails application
+Railscasts::Application.initialize!
View
37 episode-334/railscasts-after/config/environments/development.rb
@@ -0,0 +1,37 @@
+Railscasts::Application.configure do
+ # Settings specified here will take precedence over those in config/application.rb
+
+ # In the development environment your application's code is reloaded on
+ # every request. This slows down response time but is perfect for development
+ # since you don't have to restart the web server when you make code changes.
+ config.cache_classes = false
+
+ # Log error messages when you accidentally call methods on nil.
+ config.whiny_nils = true
+
+ # Show full error reports and disable caching
+ config.consider_all_requests_local = true
+ config.action_controller.perform_caching = false
+
+ # Don't care if the mailer can't send
+ config.action_mailer.raise_delivery_errors = false
+
+ # Print deprecation notices to the Rails logger
+ config.active_support.deprecation = :log
+
+ # Only use best-standards-support built into browsers
+ config.action_dispatch.best_standards_support = :builtin
+
+ # Raise exception on mass assignment protection for Active Record models
+ config.active_record.mass_assignment_sanitizer = :strict
+
+ # Log the query plan for queries taking more than this (works
+ # with SQLite, MySQL, and PostgreSQL)
+ config.active_record.auto_explain_threshold_in_seconds = 0.5
+
+ # Do not compress assets
+ config.assets.compress = false
+
+ # Expands the lines which load the assets
+ config.assets.debug = true
+end
View
67 episode-334/railscasts-after/config/environments/production.rb
@@ -0,0 +1,67 @@
+Railscasts::Application.configure do
+ # Settings specified here will take precedence over those in config/application.rb
+
+ # Code is not reloaded between requests
+ config.cache_classes = true
+
+ # Full error reports are disabled and caching is turned on
+ config.consider_all_requests_local = false
+ config.action_controller.perform_caching = true
+
+ # Disable Rails's static asset server (Apache or nginx will already do this)
+ config.serve_static_assets = false
+
+ # Compress JavaScripts and CSS
+ config.assets.compress = true
+
+ # Don't fallback to assets pipeline if a precompiled asset is missed
+ config.assets.compile = false
+
+ # Generate digests for assets URLs
+ config.assets.digest = true
+
+ # Defaults to Rails.root.join("public/assets")
+ # config.assets.manifest = YOUR_PATH
+
+ # Specifies the header that your server uses for sending files
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
+
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
+ # config.force_ssl = true
+
+ # See everything in the log (default is :info)
+ # config.log_level = :debug
+
+ # Prepend all log lines with the following tags
+ # config.log_tags = [ :subdomain, :uuid ]
+
+ # Use a different logger for distributed setups
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
+
+ # Use a different cache store in production
+ # config.cache_store = :mem_cache_store
+
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server
+ # config.action_controller.asset_host = "http://assets.example.com"
+
+ # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
+ # config.assets.precompile += %w( search.js )
+
+ # Disable delivery errors, bad email addresses will be ignored
+ # config.action_mailer.raise_delivery_errors = false
+
+ # Enable threaded mode
+ # config.threadsafe!
+
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
+ # the I18n.default_locale when a translation can not be found)
+ config.i18n.fallbacks = true
+
+ # Send deprecation notices to registered listeners
+ config.active_support.deprecation = :notify
+
+ # Log the query plan for queries taking more than this (works
+ # with SQLite, MySQL, and PostgreSQL)
+ # config.active_record.auto_explain_threshold_in_seconds = 0.5
+end
View
37 episode-334/railscasts-after/config/environments/test.rb
@@ -0,0 +1,37 @@
+Railscasts::Application.configure do
+ # Settings specified here will take precedence over those in config/application.rb
+
+ # The test environment is used exclusively to run your application's
+ # test suite. You never need to work with it otherwise. Remember that
+ # your test database is "scratch space" for the test suite and is wiped
+ # and recreated between test runs. Don't rely on the data there!
+ config.cache_classes = true
+
+ # Configure static asset server for tests with Cache-Control for performance
+ config.serve_static_assets = true
+ config.static_cache_control = "public, max-age=3600"
+
+ # Log error messages when you accidentally call methods on nil
+ config.whiny_nils = true
+
+ # Show full error reports and disable caching
+ config.consider_all_requests_local = true
+ config.action_controller.perform_caching = false
+
+ # Raise exceptions instead of rendering exception templates
+ config.action_dispatch.show_exceptions = false
+
+ # Disable request forgery protection in test environment
+ config.action_controller.allow_forgery_protection = false
+
+ # Tell Action Mailer not to deliver emails to the real world.
+ # The :test delivery method accumulates sent emails in the
+ # ActionMailer::Base.deliveries array.
+ config.action_mailer.delivery_method = :test
+
+ # Raise exception on mass assignment protection for Active Record models
+ config.active_record.mass_assignment_sanitizer = :strict
+
+ # Print deprecation notices to the stderr
+ config.active_support.deprecation = :stderr
+end
View
7 episode-334/railscasts-after/config/initializers/backtrace_silencers.rb
@@ -0,0 +1,7 @@
+# Be sure to restart your server when you modify this file.
+
+# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
+# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
+
+# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
+# Rails.backtrace_cleaner.remove_silencers!
View
15 episode-334/railscasts-after/config/initializers/inflections.rb
@@ -0,0 +1,15 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new inflection rules using the following format
+# (all these examples are active by default):
+# ActiveSupport::Inflector.inflections do |inflect|
+# inflect.plural /^(ox)$/i, '\1en'
+# inflect.singular /^(ox)en/i, '\1'
+# inflect.irregular 'person', 'people'
+# inflect.uncountable %w( fish sheep )
+# end
+#
+# These inflection rules are supported but not enabled by default:
+# ActiveSupport::Inflector.inflections do |inflect|
+# inflect.acronym 'RESTful'
+# end
View
5 episode-334/railscasts-after/config/initializers/mime_types.rb
@@ -0,0 +1,5 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new mime types for use in respond_to blocks:
+# Mime::Type.register "text/richtext", :rtf
+# Mime::Type.register_alias "text/html", :iphone
View
7 episode-334/railscasts-after/config/initializers/secret_token.rb
@@ -0,0 +1,7 @@
+# Be sure to restart your server when you modify this file.
+
+# Your secret key for verifying the integrity of signed cookies.
+# If you change this key, all old signed cookies will become invalid!
+# Make sure the secret is at least 30 characters and all random,
+# no regular words or you'll be exposed to dictionary attacks.
+Railscasts::Application.config.secret_token = '0218d691c12ff4b345a1891525d819b06bac167c00c1193fd796151a32aa7ecd93b0e691f5deda5763f7de290079b18acd0552ab0bf84a97a80f28ec5525e742'
View
8 episode-334/railscasts-after/config/initializers/session_store.rb
@@ -0,0 +1,8 @@
+# Be sure to restart your server when you modify this file.
+
+Railscasts::Application.config.session_store :cookie_store, key: '_railscasts_session'
+
+# Use the database for sessions instead of the cookie-based default,
+# which shouldn't be used to store highly confidential information
+# (create the session table with "rails generate session_migration")
+# Railscasts::Application.config.session_store :active_record_store
View
14 episode-334/railscasts-after/config/initializers/wrap_parameters.rb
@@ -0,0 +1,14 @@
+# Be sure to restart your server when you modify this file.
+#
+# This file contains settings for ActionController::ParamsWrapper which
+# is enabled by default.
+
+# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
+ActiveSupport.on_load(:action_controller) do
+ wrap_parameters format: [:json]
+end
+
+# Disable root element in JSON by default.
+ActiveSupport.on_load(:active_record) do
+ self.include_root_in_json = false
+end
View
5 episode-334/railscasts-after/config/locales/en.yml
@@ -0,0 +1,5 @@
+# Sample localization file for English. Add more files in this directory for other locales.
+# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
+
+en:
+ hello: "Hello world"
View
3  episode-334/railscasts-after/config/routes.rb
@@ -0,0 +1,3 @@
+Railscasts::Application.routes.draw do
+ root to: 'home#index'
+end
View
16 episode-334/railscasts-after/db/schema.rb
@@ -0,0 +1,16 @@
+# encoding: UTF-8
+# This file is auto-generated from the current state of the database. Instead
+# of editing this file, please use the migrations feature of Active Record to
+# incrementally modify your database, and then regenerate this schema definition.
+#
+# Note that this schema.rb definition is the authoritative source for your
+# database schema. If you need to create the application database on another
+# system, you should be using db:schema:load, not running all the migrations
+# from scratch. The latter is a flawed and unsustainable approach (the more migrations
+# you'll amass, the slower it'll run and the greater likelihood for issues).
+#
+# It's strongly recommended to check this file into your version control system.
+
+ActiveRecord::Schema.define(:version => 0) do
+
+end
View
7 episode-334/railscasts-after/db/seeds.rb
@@ -0,0 +1,7 @@
+# This file should contain all the record creation needed to seed the database with its default values.
+# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
+#
+# Examples:
+#
+# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
+# Mayor.create(name: 'Emanuel', city: cities.first)
View
2  episode-334/railscasts-after/doc/README_FOR_APP
@@ -0,0 +1,2 @@
+Use this README file to introduce your application and point to useful places in the API for learning more.
+Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
View
0  episode-334/railscasts-after/lib/assets/.gitkeep
No changes.
View
0  episode-334/railscasts-after/lib/tasks/.gitkeep
No changes.
View
0  episode-334/railscasts-after/log/.gitkeep
No changes.
View
26 episode-334/railscasts-after/public/404.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>The page you were looking for doesn't exist (404)</title>
+ <style type="text/css">
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
+ div.dialog {
+ width: 25em;
+ padding: 0 4em;
+ margin: 4em auto 0 auto;
+ border: 1px solid #ccc;
+ border-right-color: #999;
+ border-bottom-color: #999;
+ }
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
+ </style>
+</head>
+
+<body>
+ <!-- This file lives in public/404.html -->
+ <div class="dialog">
+ <h1>The page you were looking for doesn't exist.</h1>
+ <p>You may have mistyped the address or the page may have moved.</p>
+ </div>
+</body>
+</html>
View
26 episode-334/railscasts-after/public/422.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>The change you wanted was rejected (422)</title>
+ <style type="text/css">
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
+ div.dialog {
+ width: 25em;
+ padding: 0 4em;
+ margin: 4em auto 0 auto;
+ border: 1px solid #ccc;
+ border-right-color: #999;
+ border-bottom-color: #999;
+ }
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
+ </style>
+</head>
+
+<body>
+ <!-- This file lives in public/422.html -->
+ <div class="dialog">
+ <h1>The change you wanted was rejected.</h1>
+ <p>Maybe you tried to change something you didn't have access to.</p>
+ </div>
+</body>
+</html>
View
25 episode-334/railscasts-after/public/500.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>We're sorry, but something went wrong (500)</title>
+ <style type="text/css">
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
+ div.dialog {
+ width: 25em;
+ padding: 0 4em;
+ margin: 4em auto 0 auto;
+ border: 1px solid #ccc;
+ border-right-color: #999;
+ border-bottom-color: #999;
+ }
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
+ </style>
+</head>
+
+<body>
+ <!-- This file lives in public/500.html -->
+ <div class="dialog">
+ <h1>We're sorry, but something went wrong.</h1>
+ </div>
+</body>
+</html>
View
0  episode-334/railscasts-after/public/favicon.ico
No changes.
View
5 episode-334/railscasts-after/public/robots.txt
@@ -0,0 +1,5 @@
+# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
+#
+# To ban all spiders from the entire site uncomment the next two lines:
+# User-Agent: *
+# Disallow: /
View
6 episode-334/railscasts-after/script/rails
@@ -0,0 +1,6 @@
+#!/usr/bin/env ruby
+# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
+
+APP_PATH = File.expand_path('../../config/application', __FILE__)
+require File.expand_path('../../config/boot', __FILE__)
+require 'rails/commands'
View
0  episode-334/railscasts-after/test/fixtures/.gitkeep
No changes.
View
0  episode-334/railscasts-after/test/functional/.gitkeep
No changes.
View
9 episode-334/railscasts-after/test/functional/home_controller_test.rb
@@ -0,0 +1,9 @@
+require 'test_helper'
+
+class HomeControllerTest < ActionController::TestCase
+ test "should get index" do
+ get :index
+ assert_response :success
+ end
+
+end
View
0  episode-334/railscasts-after/test/integration/.gitkeep
No changes.
View
12 episode-334/railscasts-after/test/performance/browsing_test.rb
@@ -0,0 +1,12 @@
+require 'test_helper'
+require 'rails/performance_test_help'
+
+class BrowsingTest < ActionDispatch::PerformanceTest
+ # Refer to the documentation for all available options
+ # self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
+ # :output => 'tmp/performance', :formats => [:flat] }
+
+ def test_homepage
+ get '/'
+ end
+end
View
13 episode-334/railscasts-after/test/test_helper.rb
@@ -0,0 +1,13 @@
+ENV["RAILS_ENV"] = "test"
+require File.expand_path('../../config/environment', __FILE__)
+require 'rails/test_help'
+
+class ActiveSupport::TestCase
+ # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
+ #
+ # Note: You'll currently still have to declare fixtures explicitly in integration tests
+ # -- they do not yet inherit this setting
+ fixtures :all
+
+ # Add more helper methods to be used by all tests here...
+end
View
0  episode-334/railscasts-after/test/unit/.gitkeep
No changes.
View
4 episode-334/railscasts-after/test/unit/helpers/home_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class HomeHelperTest < ActionView::TestCase
+end
View
0  episode-334/railscasts-after/vendor/assets/javascripts/.gitkeep
No changes.
View
0  episode-334/railscasts-after/vendor/assets/stylesheets/.gitkeep
No changes.
View
0  episode-334/railscasts-after/vendor/plugins/.gitkeep
No changes.
View
15 episode-334/railscasts-before/.gitignore
@@ -0,0 +1,15 @@
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+#
+# If you find yourself ignoring temporary files generated by your text editor
+# or operating system, you probably want to add a global ignore instead:
+# git config --global core.excludesfile ~/.gitignore_global
+
+# Ignore bundler config
+/.bundle
+
+# Ignore the default SQLite database.
+/db/*.sqlite3
+
+# Ignore all logfiles and tempfiles.
+/log/*.log
+/tmp
View
38 episode-334/railscasts-before/Gemfile
@@ -0,0 +1,38 @@
+source 'https://rubygems.org'
+
+gem 'rails', '3.2.2'
+
+# Bundle edge Rails instead:
+# gem 'rails', :git => 'git://github.com/rails/rails.git'
+
+gem 'sqlite3'
+
+
+# Gems used only for assets and not required
+# in production environments by default.
+group :assets do
+ gem 'sass-rails', '~> 3.2.3'
+ gem 'coffee-rails', '~> 3.2.1'
+
+ # See https://github.com/sstephenson/execjs#readme for more supported runtimes
+ # gem 'therubyracer'
+
+ gem 'uglifier', '>= 1.0.3'
+end
+
+gem 'jquery-rails'
+
+# To use ActiveModel has_secure_password
+# gem 'bcrypt-ruby', '~> 3.0.0'
+
+# To use Jbuilder templates for JSON
+# gem 'jbuilder'
+
+# Use unicorn as the app server
+# gem 'unicorn'
+
+# Deploy with Capistrano
+# gem 'capistrano'
+
+# To use debugger
+# gem 'ruby-debug19', :require => 'ruby-debug'
View
111 episode-334/railscasts-before/Gemfile.lock
@@ -0,0 +1,111 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ actionmailer (3.2.2)
+ actionpack (= 3.2.2)
+ mail (~> 2.4.0)
+ actionpack (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ journey (~> 1.0.1)
+ rack (~> 1.4.0)
+ rack-cache (~> 1.1)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.1.2)
+ activemodel (3.2.2)
+ activesupport (= 3.2.2)
+ builder (~> 3.0.0)
+ activerecord (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
+ arel (~> 3.0.2)
+ tzinfo (~> 0.3.29)
+ activeresource (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
+ activesupport (3.2.2)
+ i18n (~> 0.6)
+ multi_json (~> 1.0)
+ arel (3.0.2)
+ builder (3.0.0)
+ coffee-rails (3.2.2)
+ coffee-script (>= 2.2.0)
+ railties (~> 3.2.0)
+ coffee-script (2.2.0)
+ coffee-script-source
+ execjs
+ coffee-script-source (1.2.0)
+ erubis (2.7.0)
+ execjs (1.3.0)
+ multi_json (~> 1.0)
+ hike (1.2.1)
+ i18n (0.6.0)
+ journey (1.0.3)
+ jquery-rails (2.0.1)
+ railties (>= 3.2.0, < 5.0)
+ thor (~> 0.14)
+ json (1.6.5)
+ mail (2.4.4)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.17.2)
+ multi_json (1.1.0)
+ polyglot (0.3.3)
+ rack (1.4.1)
+ rack-cache (1.2)
+ rack (>= 0.4)
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.1)
+ rack (>= 1.0)
+ rails (3.2.2)
+ actionmailer (= 3.2.2)
+ actionpack (= 3.2.2)
+ activerecord (= 3.2.2)
+ activeresource (= 3.2.2)
+ activesupport (= 3.2.2)
+ bundler (~> 1.0)
+ railties (= 3.2.2)
+ railties (3.2.2)
+ actionpack (= 3.2.2)
+ activesupport (= 3.2.2)
+ rack-ssl (~> 1.3.2)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (~> 0.14.6)
+ rake (0.9.2.2)
+ rdoc (3.12)
+ json (~> 1.4)
+ sass (3.1.15)
+ sass-rails (3.2.5)
+ railties (~> 3.2.0)
+ sass (>= 3.1.10)
+ tilt (~> 1.3)
+ sprockets (2.1.2)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ sqlite3 (1.3.5)
+ thor (0.14.6)
+ tilt (1.3.3)
+ treetop (1.4.10)
+ polyglot
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.32)
+ uglifier (1.2.3)
+ execjs (>= 0.3.0)
+ multi_json (>= 1.0.2)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ coffee-rails (~> 3.2.1)
+ jquery-rails
+ rails (= 3.2.2)
+ sass-rails (~> 3.2.3)
+ sqlite3
+ uglifier (>= 1.0.3)
View
8 episode-334/railscasts-before/README.rdoc
@@ -0,0 +1,8 @@
+= RailsCasts Example Application
+
+Run these commands to try it out.
+
+ bundle
+ rails s
+
+Requires Ruby 1.9.2 or higher.
View
7 episode-334/railscasts-before/Rakefile
@@ -0,0 +1,7 @@
+#!/usr/bin/env rake
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require File.expand_path('../config/application', __FILE__)
+
+Railscasts::Application.load_tasks
View
BIN  episode-334/railscasts-before/app/assets/images/icons/facebook.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  episode-334/railscasts-before/app/assets/images/icons/itunes.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  episode-334/railscasts-before/app/assets/images/icons/rss.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  episode-334/railscasts-before/app/assets/images/icons/twitter.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  episode-334/railscasts-before/app/assets/images/railscasts_logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
15 episode-334/railscasts-before/app/assets/javascripts/application.js
@@ -0,0 +1,15 @@
+// This is a manifest file that'll be compiled into application.js, which will include all the files
+// listed below.
+//
+// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
+// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
+//
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// the compiled file.
+//
+// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
+// GO AFTER THE REQUIRES BELOW.
+//
+//= require jquery
+//= require jquery_ujs
+//= require_tree .
View
13 episode-334/railscasts-before/app/assets/stylesheets/application.css
@@ -0,0 +1,13 @@
+/*
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
+ * listed below.
+ *
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
+ *
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
+ * compiled file, but it's generally better to create a new file per style scope.
+ *
+ *= require_self
+ *= require_tree .
+*/
View
105 episode-334/railscasts-before/app/assets/stylesheets/layout.css.scss
@@ -0,0 +1,105 @@
+body {
+ background-color: #FFF;
+ font-family: Verdana, Geneva, sans-serif;
+ font-size: 14px;
+ margin: 0;
+ line-height: 1.2em;
+}
+
+a {
+ color: #1B97F2;
+ text-decoration: none;
+ &:hover { text-decoration: underline; }
+}
+
+ul.horizontal {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+ li {
+ margin: 0;
+ padding: 0;
+ float: left;
+ }
+}
+
+#top {
+ position: relative;
+ padding-top: 1px;
+ .logo {
+ margin-top: 50px;
+ margin-left: 100px;
+ padding-bottom: 10px;
+ }
+ .user_nav {
+ color: #777;
+ font-size: 12px;
+ position: absolute;
+ top: 15px;
+ right: 100px;
+ a {
+ color: #777;
+ text-decoration: underline;
+ }
+ }
+}
+
+
+#subscribe {
+ position: absolute;
+ bottom: 10px;
+ right: 100px;
+ li {
+ position: relative;
+ margin-left: 8px;
+ font-size: 12px;
+ }
+ a {
+ display: block;
+ width: 34px;
+ height: 34px;
+ }
+ .itunes { background-image: image-url("icons/itunes.png"); }
+ .twitter { background-image: image-url("icons/twitter.png"); }
+ .facebook { background-image: image-url("icons/facebook.png"); }
+ .rss { background-image: image-url("icons/rss.png"); }
+}
+
+
+#nav_bar {
+ position: relative;
+ padding: 8px 100px;
+ margin-bottom: 15px;
+ border-top: solid 1px #FFF;
+ border-bottom: solid 3px #DE9F00;
+ background-color: #333;
+ background-image: -webkit-linear-gradient(#5c5c5c, #111111);
+ background-image: -moz-linear-gradient(#5c5c5c, #111111);
+ background-image: -ms-linear-gradient(#5c5c5c, #111111);
+ background-image: linear-gradient(#5c5c5c, #111111);
+
+ .nav {
+ float: right;
+ padding-top: 2px;
+ li {
+ padding-left: 25px;
+ font-size: 14px;
+ color: #BBB;
+ a { color: #FFF; }
+ }
+ }
+}
+
+#main {
+ max-width: 1500px;
+ margin: 0 100px;
+ margin-top: 35px;
+}
+
+#footer {
+ clear: both;
+ font-size: 11px;
+ text-align: center;
+ padding: 25px 0;
+ color: #555;
+}
View
3  episode-334/railscasts-before/app/controllers/application_controller.rb
@@ -0,0 +1,3 @@
+class ApplicationController < ActionController::Base
+ protect_from_forgery
+end
View
4 episode-334/railscasts-before/app/controllers/home_controller.rb
@@ -0,0 +1,4 @@
+class HomeController < ApplicationController
+ def index
+ end
+end
View
2  episode-334/railscasts-before/app/helpers/application_helper.rb
@@ -0,0 +1,2 @@
+module ApplicationHelper
+end
View
2  episode-334/railscasts-before/app/helpers/home_helper.rb
@@ -0,0 +1,2 @@
+module HomeHelper
+end
View
0  episode-334/railscasts-before/app/mailers/.gitkeep
No changes.
View
0  episode-334/railscasts-before/app/models/.gitkeep
No changes.
View
2  episode-334/railscasts-before/app/views/home/index.html.erb
@@ -0,0 +1,2 @@
+<h1>Welcome</h1>
+<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
View
49 episode-334/railscasts-before/app/views/layouts/application.html.erb
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Ruby on Rails Screencasts - RailsCasts</title>
+ <%= stylesheet_link_tag "application", media: "all" %>
+ <%= javascript_include_tag "application" %>
+ <%= csrf_meta_tags %>
+ </head>
+ <body>
+ <div id="top">
+ <div class="logo"><%= link_to image_tag("railscasts_logo.png", alt: "RailsCasts"), root_path %></div>
+ <div class="user_nav">
+ <%= link_to "Sign in through GitHub" %>
+ </div>
+ <ul id="subscribe" class="horizontal">
+ <li><a class="itunes" href="/itunes"></a></li>
+ <li><a class="twitter" href="/twitter"></a></li>
+ <li><a class="facebook" href="/facebook"></a></li>
+ <li><a class="rss" href="/rss"></a></li>
+ </ul>
+ </div>
+
+ <div id="nav_bar">
+ <ul class="nav horizontal">
+ <li><%= link_to "Browse Episodes" %></li>
+ <li><%= link_to "RailsCasts Pro" %></li>
+ <li><%= link_to "About" %></li>
+ <li><%= link_to "Feedback" %></li>
+ </ul>
+ <%= form_tag "/episodes", method: "get" do %>
+ <%= text_field_tag :search, params[:search], :size => 35 %>
+ <%= submit_tag "Search Episodes", :name => nil %>
+ <% end %>
+ </div>
+
+ <% flash.each do |name, msg| %>
+ <%= content_tag(:div, raw(msg), id: "flash_#{name}") %>
+ <% end %>
+
+ <div id="main">
+ <%= yield %>
+ </div>
+ <div id="footer">
+ <div class="inner">
+ &copy;<%= Date.today.year %> RailsCasts
+ </div>
+ </div>
+ </body>
+</html>
View
4 episode-334/railscasts-before/config.ru
@@ -0,0 +1,4 @@
+# This file is used by Rack-based servers to start the application.
+
+require ::File.expand_path('../config/environment', __FILE__)
+run Railscasts::Application
View
59 episode-334/railscasts-before/config/application.rb
@@ -0,0 +1,59 @@
+require File.expand_path('../boot', __FILE__)
+
+require 'rails/all'
+
+if defined?(Bundler)
+ # If you precompile assets before deploying to production, use this line
+ Bundler.require(*Rails.groups(:assets => %w(development test)))
+ # If you want your assets lazily compiled in production, use this line
+ # Bundler.require(:default, :assets, Rails.env)
+end
+
+module Railscasts
+ class Application < Rails::Application
+ # Settings in config/environments/* take precedence over those specified here.
+ # Application configuration should go into files in config/initializers
+ # -- all .rb files in that directory are automatically loaded.
+
+ # Custom directories with classes and modules you want to be autoloadable.
+ # config.autoload_paths += %W(#{config.root}/extras)
+
+ # Only load the plugins named here, in the order given (default is alphabetical).
+ # :all can be used as a placeholder for all plugins not explicitly named.
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
+
+ # Activate observers that should always be running.
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
+
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
+ # config.time_zone = 'Central Time (US & Canada)'
+
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
+ # config.i18n.default_locale = :de
+
+ # Configure the default encoding used in templates for Ruby 1.9.
+ config.encoding = "utf-8"
+
+ # Configure sensitive parameters which will be filtered from the log file.
+ config.filter_parameters += [:password]
+
+ # Use SQL instead of Active Record's schema dumper when creating the database.
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
+ # like if you have constraints or database-specific column types
+ # config.active_record.schema_format = :sql
+
+ # Enforce whitelist mode for mass assignment.
+ # This will create an empty whitelist of attributes available for mass-assignment for all models
+ # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
+ # parameters by using an attr_accessible or attr_protected declaration.
+ # config.active_record.whitelist_attributes = true
+
+ # Enable the asset pipeline
+ config.assets.enabled = true
+
+ # Version of your assets, change this if you want to expire all your assets
+ config.assets.version = '1.0'
+ end
+end
View
6 episode-334/railscasts-before/config/boot.rb
@@ -0,0 +1,6 @@
+require 'rubygems'
+
+# Set up gems listed in the Gemfile.
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
+
+require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
View
25 episode-334/railscasts-before/config/database.yml
@@ -0,0 +1,25 @@
+# SQLite version 3.x
+# gem install sqlite3
+#
+# Ensure the SQLite 3 gem is defined in your Gemfile
+# gem 'sqlite3'
+development:
+ adapter: sqlite3
+ database: db/development.sqlite3
+ pool: 5
+ timeout: 5000
+
+# Warning: The database defined as "test" will be erased and
+# re-generated from your development database when you run "rake".
+# Do not set this db to the same as development or production.
+test:
+ adapter: sqlite3
+ database: db/test.sqlite3
+ pool: 5
+ timeout: 5000
+
+production:
+ adapter: sqlite3
+ database: db/production.sqlite3
+ pool: 5
+ timeout: 5000
View
5 episode-334/railscasts-before/config/environment.rb
@@ -0,0 +1,5 @@
+# Load the rails application
+require File.expand_path('../application', __FILE__)
+
+# Initialize the rails application
+Railscasts::Application.initialize!
View
37 episode-334/railscasts-before/config/environments/development.rb
@@ -0,0 +1,37 @@
+Railscasts::Application.configure do
+ # Settings specified here will take precedence over those in config/application.rb
+
+ # In the development environment your application's code is reloaded on
+ # every request. This slows down response time but is perfect for development
+ # since you don't have to restart the web server when you make code changes.
+ config.cache_classes = false
+
+ # Log error messages when you accidentally call methods on nil.
+ config.whiny_nils = true
+
+ # Show full error reports and disable caching
+ config.consider_all_requests_local = true
+ config.action_controller.perform_caching = false
+
+ # Don't care if the mailer can't send
+ config.action_mailer.raise_delivery_errors = false
+
+ # Print deprecation notices to the Rails logger
+ config.active_support.deprecation = :log
+
+ # Only use best-standards-support built into browsers
+ config.action_dispatch.best_standards_support = :builtin
+
+ # Raise exception on mass assignment protection for Active Record models
+ config.active_record.mass_assignment_sanitizer = :strict
+
+ # Log the query plan for queries taking more than this (works
+ # with SQLite, MySQL, and PostgreSQL)
+ config.active_record.auto_explain_threshold_in_seconds = 0.5
+
+ # Do not compress assets
+ config.assets.compress = false
+
+ # Expands the lines which load the assets
+ config.assets.debug = true
+end
View
67 episode-334/railscasts-before/config/environments/production.rb
@@ -0,0 +1,67 @@
+Railscasts::Application.configure do
+ # Settings specified here will take precedence over those in config/application.rb
+
+ # Code is not reloaded between requests
+ config.cache_classes = true
+
+ # Full error reports are disabled and caching is turned on
+ config.consider_all_requests_local = false
+ config.action_controller.perform_caching = true
+
+ # Disable Rails's static asset server (Apache or nginx will already do this)
+ config.serve_static_assets = false
+
+ # Compress JavaScripts and CSS
+ config.assets.compress = true
+
+ # Don't fallback to assets pipeline if a precompiled asset is missed
+ config.assets.compile = false
+
+ # Generate digests for assets URLs
+ config.assets.digest = true
+
+ # Defaults to Rails.root.join("public/assets")
+ # config.assets.manifest = YOUR_PATH
+
+ # Specifies the header that your server uses for sending files
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
+
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
+ # config.force_ssl = true
+
+ # See everything in the log (default is :info)
+ # config.log_level = :debug
+
+ # Prepend all log lines with the following tags
+ # config.log_tags = [ :subdomain, :uuid ]
+
+ # Use a different logger for distributed setups
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
+
+ # Use a different cache store in production
+ # config.cache_store = :mem_cache_store
+
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server
+ # config.action_controller.asset_host = "http://assets.example.com"
+
+ # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
+ # config.assets.precompile += %w( search.js )
+
+ # Disable delivery errors, bad email addresses will be ignored
+ # config.action_mailer.raise_delivery_errors = false
+
+ # Enable threaded mode
+ # config.threadsafe!
+
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
+ # the I18n.default_locale when a translation can not be found)
+ config.i18n.fallbacks = true
+
+ # Send deprecation notices to registered listeners
+ config.active_support.deprecation = :notify
+
+ # Log the query plan for queries taking more than this (works
+ # with SQLite, MySQL, and PostgreSQL)
+ # config.active_record.auto_explain_threshold_in_seconds = 0.5
+end
View
37 episode-334/railscasts-before/config/environments/test.rb
@@ -0,0 +1,37 @@
+Railscasts::Application.configure do
+ # Settings specified here will take precedence over those in config/application.rb
+
+ # The test environment is used exclusively to run your application's
+ # test suite. You never need to work with it otherwise. Remember that
+ # your test database is "scratch space" for the test suite and is wiped
+ # and recreated between test runs. Don't rely on the data there!
+ config.cache_classes = true
+
+ # Configure static asset server for tests with Cache-Control for performance
+ config.serve_static_assets = true
+ config.static_cache_control = "public, max-age=3600"
+
+ # Log error messages when you accidentally call methods on nil
+ config.whiny_nils = true
+
+ # Show full error reports and disable caching
+ config.consider_all_requests_local = true
+ config.action_controller.perform_caching = false
+
+ # Raise exceptions instead of rendering exception templates
+ config.action_dispatch.show_exceptions = false
+
+ # Disable request forgery protection in test environment
+ config.action_controller.allow_forgery_protection = false
+
+ # Tell Action Mailer not to deliver emails to the real world.
+ # The :test delivery method accumulates sent emails in the
+ # ActionMailer::Base.deliveries array.
+ config.action_mailer.delivery_method = :test
+
+ # Raise exception on mass assignment protection for Active Record models
+ config.active_record.mass_assignment_sanitizer = :strict
+
+ # Print deprecation notices to the stderr
+ config.active_support.deprecation = :stderr
+end
View
7 episode-334/railscasts-before/config/initializers/backtrace_silencers.rb
@@ -0,0 +1,7 @@
+# Be sure to restart your server when you modify this file.
+
+# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
+# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
+
+# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
+# Rails.backtrace_cleaner.remove_silencers!
View
15 episode-334/railscasts-before/config/initializers/inflections.rb
@@ -0,0 +1,15 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new inflection rules using the following format
+# (all these examples are active by default):
+# ActiveSupport::Inflector.inflections do |inflect|
+# inflect.plural /^(ox)$/i, '\1en'
+# inflect.singular /^(ox)en/i, '\1'
+# inflect.irregular 'person', 'people'
+# inflect.uncountable %w( fish sheep )
+# end
+#
+# These inflection rules are supported but not enabled by default:
+# ActiveSupport::Inflector.inflections do |inflect|
+# inflect.acronym 'RESTful'
+# end
View
5 episode-334/railscasts-before/config/initializers/mime_types.rb
@@ -0,0 +1,5 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new mime types for use in respond_to blocks:
+# Mime::Type.register "text/richtext", :rtf
+# Mime::Type.register_alias "text/html", :iphone
View
7 episode-334/railscasts-before/config/initializers/secret_token.rb
@@ -0,0 +1,7 @@
+# Be sure to restart your server when you modify this file.
+
+# Your secret key for verifying the integrity of signed cookies.
+# If you change this key, all old signed cookies will become invalid!
+# Make sure the secret is at least 30 characters and all random,
+# no regular words or you'll be exposed to dictionary attacks.
+Railscasts::Application.config.secret_token = '0218d691c12ff4b345a1891525d819b06bac167c00c1193fd796151a32aa7ecd93b0e691f5deda5763f7de290079b18acd0552ab0bf84a97a80f28ec5525e742'
View
8 episode-334/railscasts-before/config/initializers/session_store.rb
@@ -0,0 +1,8 @@
+# Be sure to restart your server when you modify this file.
+
+Railscasts::Application.config.session_store :cookie_store, key: '_railscasts_session'
+
+# Use the database for sessions instead of the cookie-based default,
+# which shouldn't be used to store highly confidential information
+# (create the session table with "rails generate session_migration")
+# Railscasts::Application.config.session_store :active_record_store
View
14 episode-334/railscasts-before/config/initializers/wrap_parameters.rb
@@ -0,0 +1,14 @@
+# Be sure to restart your server when you modify this file.
+#
+# This file contains settings for ActionController::ParamsWrapper which
+# is enabled by default.
+
+# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
+ActiveSupport.on_load(:action_controller) do
+ wrap_parameters format: [:json]
+end
+
+# Disable root element in JSON by default.
+ActiveSupport.on_load(:active_record) do
+ self.include_root_in_json = false
+end
View
5 episode-334/railscasts-before/config/locales/en.yml
@@ -0,0 +1,5 @@
+# Sample localization file for English. Add more files in this directory for other locales.
+# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
+
+en:
+ hello: "Hello world"
View
3 