Permalink
Browse files

major redesign

  • Loading branch information...
1 parent d124319 commit 8668b8e2e0c59293b875bcda33952948a7e6dbc7 @ryanb committed Apr 15, 2011
Showing with 2,425 additions and 2,737 deletions.
  1. +2 −0 .gitignore
  2. +1 −1 .rvmrc
  3. +18 −7 Gemfile
  4. +139 −79 Gemfile.lock
  5. +17 −0 Guardfile
  6. +1 −1 LICENSE
  7. +2 −2 README.markdown
  8. +7 −0 Rakefile
  9. +2 −23 app/controllers/application_controller.rb
  10. +23 −51 app/controllers/comments_controller.rb
  11. +15 −34 app/controllers/episodes_controller.rb
  12. +15 −0 app/controllers/feedback_messages_controller.rb
  13. +0 −6 app/controllers/info_controller.rb
  14. +0 −39 app/controllers/spam_checks_controller.rb
  15. +0 −39 app/controllers/spam_questions_controller.rb
  16. +0 −34 app/controllers/spam_reports_controller.rb
  17. +0 −39 app/controllers/sponsors_controller.rb
  18. +0 −6 app/controllers/tags_controller.rb
  19. +11 −9 app/controllers/users_controller.rb
  20. +54 −1 app/helpers/application_helper.rb
  21. +12 −2 app/helpers/comments_helper.rb
  22. +0 −5 app/helpers/episodes_helper.rb
  23. +2 −0 app/helpers/feedback_messages_helper.rb
  24. +0 −3 app/helpers/sessions_helper.rb
  25. +0 −2 app/helpers/spam_checks_helper.rb
  26. +0 −2 app/helpers/spam_questions_helper.rb
  27. +0 −2 app/helpers/spam_reports_helper.rb
  28. +0 −2 app/helpers/sponsors_helper.rb
  29. +0 −3 app/helpers/tags_helper.rb
  30. +6 −0 app/mailers/mailer.rb
  31. +25 −0 app/models/ability.rb
  32. +2 −35 app/models/comment.rb
  33. +0 −3 app/models/download.rb
  34. +74 −44 app/models/episode.rb
  35. +4 −0 app/models/feedback_message.rb
  36. +0 −5 app/models/spam_check.rb
  37. +0 −7 app/models/spam_question.rb
  38. +0 −44 app/models/spam_report.rb
  39. +0 −11 app/models/sponsor.rb
  40. +4 −0 app/models/tag.rb
  41. +4 −0 app/models/user.rb
  42. +34 −35 app/views/comments/_comment.html.erb
  43. +17 −0 app/views/comments/_comment_headline.html.erb
  44. +69 −15 app/views/comments/_form.html.erb
  45. +10 −0 app/views/comments/create.js.erb
  46. +1 −1 app/views/comments/destroy.js.erb
  47. +1 −1 app/views/comments/edit.html.erb
  48. +2 −0 app/views/comments/edit.js.erb
  49. +0 −8 app/views/comments/index.html.erb
  50. +0 −19 app/views/comments/index.rss.builder
  51. +2 −12 app/views/comments/new.html.erb
  52. +2 −0 app/views/comments/new.js.erb
  53. +5 −0 app/views/comments/update.js.erb
  54. +4 −0 app/views/episodes/_comments.html.erb
  55. +10 −41 app/views/episodes/_episode.html.erb
  56. +22 −37 app/views/episodes/_form.html.erb
  57. +0 −5 app/views/episodes/_pagination.html.erb
  58. +14 −0 app/views/episodes/_show_notes.html.erb
  59. +5 −0 app/views/episodes/_similar.html.erb
  60. +0 −20 app/views/episodes/archive.html.erb
  61. +92 −28 app/views/episodes/index.html.erb
  62. +21 −25 app/views/episodes/index.rss.builder
  63. +52 −39 app/views/episodes/show.html.erb
  64. +1 −0 app/views/episodes/show.js.erb
  65. +0 −20 app/views/episodes/show.rss.builder
  66. +27 −0 app/views/feedback_messages/new.html.erb
  67. +12 −8 app/views/info/about.html.erb
  68. +0 −228 app/views/info/contest.html.erb
  69. +0 −24 app/views/info/feeds.html.erb
  70. +51 −28 app/views/layouts/application.html.erb
  71. +4 −0 app/views/mailer/feedback.text.erb
  72. +0 −24 app/views/shared/_navigation.html.erb
  73. +0 −44 app/views/shared/_side.html.erb
  74. +0 −12 app/views/spam_checks/_form.html.erb
  75. +0 −4 app/views/spam_checks/edit.html.erb
  76. +0 −22 app/views/spam_checks/index.html.erb
  77. +0 −5 app/views/spam_checks/new.html.erb
  78. +0 −12 app/views/spam_questions/_form.html.erb
  79. +0 −4 app/views/spam_questions/edit.html.erb
  80. +0 −22 app/views/spam_questions/index.html.erb
  81. +0 −5 app/views/spam_questions/new.html.erb
  82. +0 −1 app/views/spam_reports/create.js.erb
  83. +0 −27 app/views/spam_reports/index.html.erb
  84. +0 −36 app/views/spam_reports/show.html.erb
  85. +0 −26 app/views/sponsors/_form.html.erb
  86. +0 −3 app/views/sponsors/edit.html.erb
  87. +0 −16 app/views/sponsors/index.html.erb
  88. +0 −3 app/views/sponsors/new.html.erb
  89. +0 −7 app/views/tags/show.html.erb
  90. +1 −1 app/views/users/edit.html.erb
  91. +0 −2 autotest/discover.rb
  92. +1 −0 config/application.rb
  93. +0 −1 config/examples/app_config.yml
  94. +0 −1 config/initializers/load_enkoder.rb
  95. +3 −13 config/routes.rb
  96. +11 −0 db/migrate/20110416201115_add_ancestry_to_comments.rb
  97. +9 −0 db/migrate/20110416214833_add_legacy_to_episodes.rb
  98. +15 −0 db/migrate/20110416232852_create_feedback_messages.rb
  99. +59 −0 db/migrate/20110421060544_cleanup.rb
  100. +9 −0 db/migrate/20110423184218_add_legacy_to_comments.rb
  101. +9 −0 db/migrate/20110503025228_add_file_sizes_to_episodes.rb
  102. +9 −0 db/migrate/20110504180955_add_hidden_to_comments.rb
  103. +10 −42 db/schema.rb
  104. +57 −0 lib/code_formatter.rb
  105. +0 −144 lib/enkoder.rb
  106. +41 −0 lib/tasks/application.rake
  107. +0 −16 lib/textilizer.rb
  108. BIN public/favicon.ico
  109. BIN public/flash/clippy.swf
  110. BIN public/images/guest.png
  111. BIN public/images/icons/asciicasts.png
  112. BIN public/images/icons/comments.png
  113. BIN public/images/icons/facebook.png
  114. BIN public/images/icons/itunes.png
  115. BIN public/images/icons/new_comment.png
  116. BIN public/images/icons/rss.png
  117. BIN public/images/icons/show_notes.png
  118. BIN public/images/icons/twitter.png
  119. BIN public/images/progress_large.gif
  120. BIN public/images/railscasts_logo.png
  121. BIN public/images/ryan_bates.jpg
  122. BIN public/images/sublimevideo.png
  123. BIN public/images/views/full.png
  124. BIN public/images/views/grid.png
  125. BIN public/images/views/list.png
  126. +43 −10 public/javascripts/application.js
  127. +751 −195 public/stylesheets/application.css
  128. +3 −7 public/stylesheets/coderay.css
  129. +0 −94 spec/controllers/comments_controller_spec.rb
  130. +0 −126 spec/controllers/episodes_controller_spec.rb
  131. +0 −21 spec/controllers/info_controller_spec.rb
  132. +0 −63 spec/controllers/spam_checks_controller_spec.rb
  133. +0 −63 spec/controllers/spam_questions_controller_spec.rb
  134. +0 −60 spec/controllers/spam_reports_controller_spec.rb
  135. +0 −63 spec/controllers/sponsors_controller_spec.rb
  136. +0 −13 spec/controllers/tags_controller_spec.rb
  137. +0 −66 spec/controllers/users_controller_spec.rb
  138. +7 −7 spec/factories.rb
  139. +0 −19 spec/fixtures/comments.yml
  140. +0 −11 spec/fixtures/downloads.yml
  141. +0 −10 spec/fixtures/episodes.yml
  142. +0 −7 spec/fixtures/spam_checks.yml
  143. +0 −7 spec/fixtures/spam_questions.yml
  144. +0 −13 spec/fixtures/spam_reports.yml
  145. +0 −11 spec/fixtures/sponsors.yml
  146. +0 −7 spec/fixtures/taggings.yml
  147. +0 −5 spec/fixtures/tags.yml
  148. +0 −17 spec/fixtures/users.yml
  149. +11 −3 spec/helpers/comments_helper_spec.rb
  150. +42 −0 spec/lib/code_formatter_spec.rb
  151. +0 −31 spec/lib/textilizer_spec.rb
  152. +92 −0 spec/models/ability_spec.rb
  153. +5 −36 spec/models/comment_spec.rb
  154. +0 −4 spec/models/download_spec.rb
  155. +41 −17 spec/models/episode_spec.rb
  156. +10 −0 spec/models/feedback_message_spec.rb
  157. +0 −7 spec/models/spam_check_spec.rb
  158. +0 −7 spec/models/spam_question_spec.rb
  159. +0 −54 spec/models/spam_report_spec.rb
  160. +0 −16 spec/models/sponsor_spec.rb
  161. +1 −1 spec/models/tag_spec.rb
  162. +1 −1 spec/models/tagging_spec.rb
  163. +1 −1 spec/models/user_spec.rb
  164. +44 −0 spec/requests/comments_request_spec.rb
  165. +112 −0 spec/requests/episodes_request_spec.rb
  166. +15 −0 spec/requests/feedback_messages_request_spec.rb
  167. +8 −0 spec/requests/info_request_spec.rb
  168. +47 −0 spec/requests/users_request_spec.rb
  169. +53 −5 spec/spec_helper.rb
  170. +6 −0 spec/support/auth_macros.rb
  171. +0 −31 spec/support/controller_macros.rb
View
@@ -3,6 +3,8 @@ db/*.sqlite3
log/*.log
log/*.pid
tmp/**/*
+tmp/*
+coverage/*
config/database.yml
config/app_config.yml
config/*.sphinx.conf
View
2 .rvmrc
@@ -1 +1 @@
-rvm use 1.9.2-p0
+rvm use 1.9.2@railscasts
View
25 Gemfile
@@ -1,26 +1,37 @@
source 'http://rubygems.org'
-gem "rails", "3.0.3"
+gem "rails", "3.0.7"
gem "mysql2"
-gem "RedCloth"
+gem "redcarpet"
gem "coderay"
gem "acts_as_list"
gem "thinking-sphinx", ">= 2.0.1", :require => "thinking_sphinx"
gem "whenever", :require => false
gem "will_paginate", ">= 3.0.pre2"
gem "jquery-rails"
-gem "omniauth"
+gem "omniauth", ">= 0.2.2"
gem "exception_notification", :git => "git://github.com/rails/exception_notification.git", :require => "exception_notifier"
+gem "ancestry"
+gem "cancan", :git => "git://github.com/ryanb/cancan.git", :branch => "2.0"
group :development, :test do
- gem "mocha"
gem "rspec-rails"
+ gem "launchy"
+end
+
+group :test do
gem "factory_girl_rails"
- gem "webrat"
- gem "autotest"
- gem "autotest-rails"
+ gem "capybara", :git => "git://github.com/jnicklas/capybara.git"
+ gem "capybara-webkit"
+ gem "database_cleaner"
+ gem "guard"
+ gem "guard-rspec"
+ gem "rb-fsevent", :require => false if RUBY_PLATFORM.downcase.include?("darwin")
+ gem "fakeweb"
+ gem "simplecov", :require => false
end
group :development do
+ gem "thin"
gem "nifty-generators"
end
View
@@ -1,136 +1,177 @@
GIT
+ remote: git://github.com/jnicklas/capybara.git
+ revision: 4483061ccc32c34345e84685e8ed43870e7a8693
+ specs:
+ capybara (0.4.1.1)
+ mime-types (>= 1.16)
+ nokogiri (>= 1.3.3)
+ rack (>= 1.0.0)
+ rack-test (>= 0.5.4)
+ selenium-webdriver (>= 0.0.27)
+ xpath (~> 0.1.3)
+
+GIT
remote: git://github.com/rails/exception_notification.git
revision: 192a49a02d63d28b23ed41cebadfedd490929cf1
specs:
exception_notification (1.0.0)
+GIT
+ remote: git://github.com/ryanb/cancan.git
+ revision: 63865cc7d8df9ea080e7fb1adf6ca8eeb1719ee9
+ branch: 2.0
+ specs:
+ cancan (1.6.3)
+
GEM
remote: http://rubygems.org/
specs:
- RedCloth (4.2.3)
- ZenTest (4.4.0)
aaronh-chronic (0.3.9)
abstract (1.0.0)
- actionmailer (3.0.3)
- actionpack (= 3.0.3)
- mail (~> 2.2.9)
- actionpack (3.0.3)
- activemodel (= 3.0.3)
- activesupport (= 3.0.3)
+ actionmailer (3.0.7)
+ actionpack (= 3.0.7)
+ mail (~> 2.2.15)
+ actionpack (3.0.7)
+ activemodel (= 3.0.7)
+ activesupport (= 3.0.7)
builder (~> 2.1.2)
erubis (~> 2.6.6)
- i18n (~> 0.4)
+ i18n (~> 0.5.0)
rack (~> 1.2.1)
- rack-mount (~> 0.6.13)
- rack-test (~> 0.5.6)
+ rack-mount (~> 0.6.14)
+ rack-test (~> 0.5.7)
tzinfo (~> 0.3.23)
- activemodel (3.0.3)
- activesupport (= 3.0.3)
+ activemodel (3.0.7)
+ activesupport (= 3.0.7)
builder (~> 2.1.2)
- i18n (~> 0.4)
- activerecord (3.0.3)
- activemodel (= 3.0.3)
- activesupport (= 3.0.3)
+ i18n (~> 0.5.0)
+ activerecord (3.0.7)
+ activemodel (= 3.0.7)
+ activesupport (= 3.0.7)
arel (~> 2.0.2)
tzinfo (~> 0.3.23)
- activeresource (3.0.3)
- activemodel (= 3.0.3)
- activesupport (= 3.0.3)
- activesupport (3.0.3)
+ activeresource (3.0.7)
+ activemodel (= 3.0.7)
+ activesupport (= 3.0.7)
+ activesupport (3.0.7)
acts_as_list (0.1.2)
- addressable (2.2.2)
- arel (2.0.3)
- autotest (4.4.1)
- autotest-rails (4.1.0)
- ZenTest
+ addressable (2.2.5)
+ ancestry (1.2.3)
+ activerecord (>= 2.2.2)
+ arel (2.0.9)
builder (2.1.2)
+ capybara-webkit (0.2.0)
+ capybara (~> 0.4.1)
+ childprocess (0.1.8)
+ ffi (~> 1.0.6)
coderay (0.9.5)
+ configuration (1.2.0)
+ daemons (1.1.2)
+ database_cleaner (0.6.7)
diff-lcs (1.1.2)
erubis (2.6.6)
abstract (>= 1.0.0)
+ eventmachine (0.12.10)
factory_girl (1.3.2)
factory_girl_rails (1.0)
factory_girl (~> 1.3)
rails (>= 3.0.0.beta4)
- faraday (0.5.3)
- addressable (~> 2.2.2)
- multipart-post (~> 1.0.1)
+ fakeweb (1.3.0)
+ faraday (0.6.1)
+ addressable (~> 2.2.4)
+ multipart-post (~> 1.1.0)
rack (>= 1.1.0, < 2)
- i18n (0.4.2)
+ ffi (1.0.7)
+ rake (>= 0.8.7)
+ guard (0.3.4)
+ thor (~> 0.14.6)
+ guard-rspec (0.3.1)
+ guard (>= 0.2.2)
+ i18n (0.5.0)
jquery-rails (0.2.5)
rails (~> 3.0)
thor (~> 0.14.4)
- mail (2.2.10)
+ json_pure (1.5.1)
+ launchy (0.4.0)
+ configuration (>= 0.0.5)
+ rake (>= 0.8.1)
+ mail (2.2.19)
activesupport (>= 2.3.6)
- i18n (~> 0.4.1)
+ i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
- mocha (0.9.9)
- rake
multi_json (0.0.5)
- multipart-post (1.0.1)
+ multipart-post (1.1.0)
mysql2 (0.2.6)
net-ldap (0.1.1)
nifty-generators (0.4.2)
nokogiri (1.4.4)
- oa-basic (0.1.6)
+ oa-basic (0.2.2)
multi_json (~> 0.0.2)
nokogiri (~> 1.4.2)
- oa-core (= 0.1.6)
+ oa-core (= 0.2.2)
rest-client (~> 1.6.0)
- oa-core (0.1.6)
+ oa-core (0.2.2)
rack (~> 1.1)
- oa-enterprise (0.1.6)
+ oa-enterprise (0.2.2)
net-ldap (~> 0.1.1)
nokogiri (~> 1.4.2)
- oa-core (= 0.1.6)
+ oa-core (= 0.2.2)
pyu-ruby-sasl (~> 0.0.3.1)
rubyntlm (~> 0.1.1)
- oa-oauth (0.1.6)
+ oa-more (0.2.2)
+ multi_json (~> 0.0.2)
+ oa-core (= 0.2.2)
+ rest-client (~> 1.6.0)
+ oa-oauth (0.2.2)
+ faraday (~> 0.6.1)
multi_json (~> 0.0.2)
nokogiri (~> 1.4.2)
- oa-core (= 0.1.6)
+ oa-core (= 0.2.2)
oauth (~> 0.4.0)
- oauth2 (~> 0.1.0)
- oa-openid (0.1.6)
- oa-core (= 0.1.6)
+ oauth2 (~> 0.3.0)
+ oa-openid (0.2.2)
+ oa-core (= 0.2.2)
rack-openid (~> 1.2.0)
ruby-openid-apps-discovery
oauth (0.4.4)
- oauth2 (0.1.0)
- faraday (~> 0.5.0)
+ oauth2 (0.3.0)
+ faraday (~> 0.6.0)
multi_json (~> 0.0.4)
- omniauth (0.1.6)
- oa-basic (= 0.1.6)
- oa-core (= 0.1.6)
- oa-enterprise (= 0.1.6)
- oa-oauth (= 0.1.6)
- oa-openid (= 0.1.6)
+ omniauth (0.2.2)
+ oa-basic (= 0.2.2)
+ oa-core (= 0.2.2)
+ oa-enterprise (= 0.2.2)
+ oa-more (= 0.2.2)
+ oa-oauth (= 0.2.2)
+ oa-openid (= 0.2.2)
polyglot (0.3.1)
pyu-ruby-sasl (0.0.3.2)
- rack (1.2.1)
- rack-mount (0.6.13)
+ rack (1.2.2)
+ rack-mount (0.6.14)
rack (>= 1.0.0)
rack-openid (1.2.0)
rack (>= 1.1.0)
ruby-openid (>= 2.1.8)
- rack-test (0.5.6)
+ rack-test (0.5.7)
rack (>= 1.0)
- rails (3.0.3)
- actionmailer (= 3.0.3)
- actionpack (= 3.0.3)
- activerecord (= 3.0.3)
- activeresource (= 3.0.3)
- activesupport (= 3.0.3)
+ rails (3.0.7)
+ actionmailer (= 3.0.7)
+ actionpack (= 3.0.7)
+ activerecord (= 3.0.7)
+ activeresource (= 3.0.7)
+ activesupport (= 3.0.7)
bundler (~> 1.0)
- railties (= 3.0.3)
- railties (3.0.3)
- actionpack (= 3.0.3)
- activesupport (= 3.0.3)
+ railties (= 3.0.7)
+ railties (3.0.7)
+ actionpack (= 3.0.7)
+ activesupport (= 3.0.7)
rake (>= 0.8.7)
thor (~> 0.14.4)
rake (0.8.7)
+ rb-fsevent (0.4.0)
+ redcarpet (1.10.0)
rest-client (1.6.1)
mime-types (>= 1.16)
riddle (1.2.1)
@@ -148,41 +189,60 @@ GEM
ruby-openid-apps-discovery (1.2.0)
ruby-openid (>= 2.1.7)
rubyntlm (0.1.1)
+ rubyzip (0.9.4)
+ selenium-webdriver (0.1.4)
+ childprocess (>= 0.1.7)
+ ffi (>= 1.0.7)
+ json_pure
+ rubyzip
+ simplecov (0.4.2)
+ simplecov-html (~> 0.4.4)
+ simplecov-html (0.4.4)
+ thin (1.2.11)
+ daemons (>= 1.0.9)
+ eventmachine (>= 0.12.6)
+ rack (>= 1.0.0)
thinking-sphinx (2.0.1)
activerecord (>= 3.0.3)
riddle (>= 1.2.1)
- thor (0.14.4)
+ thor (0.14.6)
treetop (1.4.9)
polyglot (>= 0.3.1)
- tzinfo (0.3.23)
- webrat (0.7.2)
- nokogiri (>= 1.2.0)
- rack (>= 1.0)
- rack-test (>= 0.5.3)
+ tzinfo (0.3.27)
whenever (0.6.2)
aaronh-chronic (>= 0.3.9)
activesupport (>= 2.3.4)
will_paginate (3.0.pre2)
+ xpath (0.1.3)
+ nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
- RedCloth
acts_as_list
- autotest
- autotest-rails
+ ancestry
+ cancan!
+ capybara!
+ capybara-webkit
coderay
+ database_cleaner
exception_notification!
factory_girl_rails
+ fakeweb
+ guard
+ guard-rspec
jquery-rails
- mocha
+ launchy
mysql2
nifty-generators
- omniauth
- rails (= 3.0.3)
+ omniauth (>= 0.2.2)
+ rails (= 3.0.7)
+ rb-fsevent
+ redcarpet
rspec-rails
+ simplecov
+ thin
thinking-sphinx (>= 2.0.1)
- webrat
whenever
will_paginate (>= 3.0.pre2)
View
@@ -0,0 +1,17 @@
+# A sample Guardfile
+# More info at http://github.com/guard/guard#readme
+
+guard 'rspec', :version => 2 do
+ watch('^spec/(.*)_spec.rb')
+ watch('^lib/(.*)\.rb') { |m| "spec/lib/#{m[1]}_spec.rb" }
+ watch('^spec/spec_helper.rb') { "spec" }
+
+ # Rails example
+ watch('^app/views/(.*)/.*') { |m| "spec/requests/#{m[1]}_request_spec.rb" }
+ watch('^app/controllers/(.*)_controller\.rb') { |m| "spec/requests/#{m[1]}_request_spec.rb" }
+ watch('^app/(.*)\.rb') { |m| "spec/#{m[1]}_spec.rb" }
+ # watch('^lib/(.*)\.rb') { |m| "spec/lib/#{m[1]}_spec.rb" }
+ watch('^config/routes.rb') { "spec/routing" }
+ watch('^app/controllers/application_controller.rb') { "spec/controllers" }
+ watch('^spec/factories.rb') { "spec/models" }
+end
View
@@ -1,4 +1,4 @@
-Copyright (c) 2010 Ryan Bates, Railscasts
+Copyright (c) 2011 Ryan Bates, RailsCasts
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Oops, something went wrong.

0 comments on commit 8668b8e

Please sign in to comment.