community_engine 2.3.2 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (580) hide show
  1. checksums.yaml +13 -5
  2. data/.travis.yml +5 -4
  3. data/CHANGELOG +43 -5
  4. data/Gemfile +1 -16
  5. data/README.markdown +22 -19
  6. data/UPGRADING.markdown +10 -0
  7. data/about.yml +1 -1
  8. data/app/assets/javascripts/community_engine.js +187 -18
  9. data/app/assets/javascripts/cropper.js +86 -565
  10. data/app/assets/javascripts/forum.js +26 -71
  11. data/app/assets/javascripts/jquery.migrate.js +521 -0
  12. data/app/assets/stylesheets/_colors.css.scss +100 -0
  13. data/app/assets/stylesheets/_font.css.scss +17 -0
  14. data/app/assets/stylesheets/_forms.css.scss +20 -0
  15. data/app/assets/stylesheets/_forum.css.scss +0 -0
  16. data/app/assets/stylesheets/_grid.css.scss +7 -0
  17. data/app/assets/stylesheets/_layers.css.scss +7 -0
  18. data/app/assets/stylesheets/_layout.css.scss +28 -0
  19. data/app/assets/stylesheets/community_engine.css.scss +18 -0
  20. data/app/assets/stylesheets/cropper.css +6 -182
  21. data/app/controllers/activities_controller.rb +10 -10
  22. data/app/controllers/admin_controller.rb +23 -23
  23. data/app/controllers/ads_controller.rb +16 -5
  24. data/app/controllers/albums_controller.rb +11 -5
  25. data/app/controllers/base_controller.rb +5 -8
  26. data/app/controllers/categories_controller.rb +31 -31
  27. data/app/controllers/clippings_controller.rb +18 -12
  28. data/app/controllers/comments_controller.rb +17 -8
  29. data/app/controllers/events_controller.rb +25 -21
  30. data/app/controllers/favorites_controller.rb +12 -12
  31. data/app/controllers/forums_controller.rb +20 -9
  32. data/app/controllers/friendships_controller.rb +41 -48
  33. data/app/controllers/homepage_features_controller.rb +11 -5
  34. data/app/controllers/invitations_controller.rb +15 -9
  35. data/app/controllers/messages_controller.rb +25 -19
  36. data/app/controllers/metro_areas_controller.rb +9 -3
  37. data/app/controllers/moderators_controller.rb +1 -1
  38. data/app/controllers/monitorships_controller.rb +2 -2
  39. data/app/controllers/pages_controller.rb +16 -4
  40. data/app/controllers/password_resets_controller.rb +0 -1
  41. data/app/controllers/photos_controller.rb +32 -30
  42. data/app/controllers/posts_controller.rb +33 -17
  43. data/app/controllers/rsvps_controller.rb +8 -4
  44. data/app/controllers/sb_posts_controller.rb +22 -18
  45. data/app/controllers/sessions_controller.rb +2 -1
  46. data/app/controllers/sitemap_controller.rb +8 -8
  47. data/app/controllers/statistics_controller.rb +9 -8
  48. data/app/controllers/tags_controller.rb +26 -24
  49. data/app/controllers/topics_controller.rb +10 -6
  50. data/app/controllers/users_controller.rb +63 -34
  51. data/app/helpers/base_helper.rb +119 -29
  52. data/app/helpers/friendships_helper.rb +3 -3
  53. data/app/helpers/posts_helper.rb +5 -7
  54. data/app/models/acts_as_taggable_on/tag.rb +12 -13
  55. data/app/models/ad.rb +2 -5
  56. data/app/models/album.rb +0 -2
  57. data/app/models/category.rb +6 -7
  58. data/app/models/clipping.rb +2 -5
  59. data/app/models/clipping_image.rb +5 -5
  60. data/app/models/comment.rb +4 -5
  61. data/app/models/country.rb +2 -4
  62. data/app/models/event.rb +1 -2
  63. data/app/models/favorite.rb +5 -10
  64. data/app/models/forum.rb +0 -2
  65. data/app/models/friendship.rb +3 -5
  66. data/app/models/friendship_status.rb +0 -2
  67. data/app/models/homepage_feature.rb +4 -6
  68. data/app/models/invitation.rb +6 -8
  69. data/app/models/message.rb +25 -26
  70. data/app/models/message_thread.rb +1 -1
  71. data/app/models/metro_area.rb +0 -2
  72. data/app/models/page.rb +0 -2
  73. data/app/models/photo.rb +8 -8
  74. data/app/models/poll.rb +7 -9
  75. data/app/models/post.rb +11 -15
  76. data/app/models/role.rb +1 -2
  77. data/app/models/rsvp.rb +0 -3
  78. data/app/models/sb_post.rb +14 -9
  79. data/app/models/state.rb +0 -2
  80. data/app/models/topic.rb +5 -6
  81. data/app/models/user.rb +50 -63
  82. data/app/models/vote.rb +1 -1
  83. data/app/views/activities/_activity.html.haml +9 -9
  84. data/app/views/activities/destroy.js.erb +1 -0
  85. data/app/views/activities/index.html.haml +13 -13
  86. data/app/views/activities/network.html.haml +10 -13
  87. data/app/views/admin/comments.html.haml +48 -70
  88. data/app/views/admin/events.html.haml +20 -27
  89. data/app/views/admin/messages.html.haml +2 -3
  90. data/app/views/admin/update.js.erb +1 -0
  91. data/app/views/admin/users.html.haml +51 -66
  92. data/app/views/ads/_form.html.haml +21 -0
  93. data/app/views/ads/edit.html.haml +6 -46
  94. data/app/views/ads/index.html.haml +25 -39
  95. data/app/views/ads/new.html.haml +4 -43
  96. data/app/views/ads/show.html.haml +18 -35
  97. data/app/views/albums/_form.html.haml +17 -12
  98. data/app/views/albums/edit.html.haml +12 -14
  99. data/app/views/albums/new.html.haml +8 -13
  100. data/app/views/albums/show.html.haml +25 -32
  101. data/app/views/base/_homepage_banner_message.html.haml +5 -19
  102. data/app/views/base/advertise.html.haml +5 -8
  103. data/app/views/base/site_index.html.haml +25 -27
  104. data/app/views/categories/_form.html.haml +8 -0
  105. data/app/views/categories/_menu_item.html.haml +13 -0
  106. data/app/views/categories/_tips.html.haml +2 -2
  107. data/app/views/categories/edit.html.haml +3 -33
  108. data/app/views/categories/index.html.haml +18 -28
  109. data/app/views/categories/new.html.haml +3 -8
  110. data/app/views/categories/show.html.haml +33 -36
  111. data/app/views/clippings/_clipping.html.haml +10 -17
  112. data/app/views/clippings/_favorite.html.haml +14 -0
  113. data/app/views/clippings/_form.html.haml +15 -0
  114. data/app/views/clippings/_images.html.haml +1 -1
  115. data/app/views/clippings/_menu_item.html.haml +6 -0
  116. data/app/views/clippings/edit.html.haml +12 -23
  117. data/app/views/clippings/index.html.haml +29 -30
  118. data/app/views/clippings/load_images_from_uri.js.erb +1 -0
  119. data/app/views/clippings/new.html.haml +9 -26
  120. data/app/views/clippings/new_clipping.html.haml +30 -77
  121. data/app/views/clippings/show.html.haml +48 -53
  122. data/app/views/clippings/site_index.html.haml +19 -32
  123. data/app/views/comments/_comment.html.haml +40 -40
  124. data/app/views/comments/_comment_form.html.haml +22 -46
  125. data/app/views/comments/_edit_form.html.haml +13 -28
  126. data/app/views/comments/create.js.erb +25 -0
  127. data/app/views/comments/destroy.js.erb +3 -0
  128. data/app/views/comments/edit.js.erb +11 -0
  129. data/app/views/comments/index.html.haml +12 -22
  130. data/app/views/comments/update.js.erb +14 -0
  131. data/app/views/events/_event.html.haml +26 -24
  132. data/app/views/events/_form.html.haml +18 -0
  133. data/app/views/events/_menu_item.html.haml +6 -0
  134. data/app/views/events/_subscribe.html.haml +1 -1
  135. data/app/views/events/edit.html.haml +7 -32
  136. data/app/views/events/index.html.haml +11 -19
  137. data/app/views/events/new.html.haml +2 -31
  138. data/app/views/events/show.html.haml +54 -24
  139. data/app/views/favorites/create.js.erb +10 -0
  140. data/app/views/favorites/destroy.js.erb +6 -0
  141. data/app/views/favorites/index.html.haml +6 -8
  142. data/app/views/forums/_form.html.haml +10 -20
  143. data/app/views/forums/_menu_item.html.haml +6 -0
  144. data/app/views/forums/edit.html.haml +8 -10
  145. data/app/views/forums/index.html.haml +56 -64
  146. data/app/views/forums/new.html.haml +5 -8
  147. data/app/views/forums/show.html.haml +65 -72
  148. data/app/views/friendships/_friendship.html.haml +14 -16
  149. data/app/views/friendships/accepted.html.haml +7 -11
  150. data/app/views/friendships/create.js.haml +1 -0
  151. data/app/views/friendships/denied.html.haml +4 -8
  152. data/app/views/friendships/pending.html.haml +4 -6
  153. data/app/views/friendships/show.html.haml +10 -11
  154. data/app/views/homepage_features/_form.html.haml +6 -0
  155. data/app/views/homepage_features/edit.html.haml +5 -30
  156. data/app/views/homepage_features/index.html.haml +22 -28
  157. data/app/views/homepage_features/new.html.haml +2 -30
  158. data/app/views/homepage_features/show.html.haml +27 -29
  159. data/app/views/invitations/index.html.haml +8 -0
  160. data/app/views/invitations/new.html.haml +21 -30
  161. data/app/views/kaminari/bootstrap/_first_page.html.erb +13 -0
  162. data/app/views/kaminari/bootstrap/_gap.html.erb +8 -0
  163. data/app/views/kaminari/bootstrap/_last_page.html.erb +13 -0
  164. data/app/views/kaminari/bootstrap/_next_page.html.erb +13 -0
  165. data/app/views/kaminari/bootstrap/_page.html.erb +12 -0
  166. data/app/views/kaminari/bootstrap/_paginator.html.erb +25 -0
  167. data/app/views/kaminari/bootstrap/_prev_page.html.erb +13 -0
  168. data/app/views/layouts/application.html.haml +26 -37
  169. data/app/views/messages/_form.html.haml +6 -12
  170. data/app/views/messages/_inbox.html.haml +34 -39
  171. data/app/views/messages/_menu_item.html.haml +11 -0
  172. data/app/views/messages/_sent.html.haml +22 -33
  173. data/app/views/messages/_sidebar_nav.html.haml +12 -9
  174. data/app/views/messages/index.html.haml +2 -2
  175. data/app/views/messages/new.html.haml +2 -9
  176. data/app/views/messages/show.html.haml +28 -36
  177. data/app/views/metro_areas/_form.html.haml +6 -0
  178. data/app/views/metro_areas/edit.html.haml +6 -14
  179. data/app/views/metro_areas/index.html.haml +19 -26
  180. data/app/views/metro_areas/new.html.haml +4 -14
  181. data/app/views/metro_areas/show.html.haml +13 -21
  182. data/app/views/moderators/_toggle.html.haml +6 -0
  183. data/app/views/moderators/create.js.erb +5 -0
  184. data/app/views/moderators/destroy.js.erb +1 -0
  185. data/app/views/monitorships/create.js.erb +1 -0
  186. data/app/views/monitorships/destroy.js.erb +1 -0
  187. data/app/views/pages/_form.html.haml +16 -23
  188. data/app/views/pages/edit.html.haml +2 -14
  189. data/app/views/pages/index.html.haml +32 -32
  190. data/app/views/pages/new.html.haml +5 -12
  191. data/app/views/pages/show.html.haml +4 -8
  192. data/app/views/password_resets/edit.html.haml +6 -14
  193. data/app/views/password_resets/new.html.haml +7 -11
  194. data/app/views/photo_manager/index.html.haml +45 -43
  195. data/app/views/photos/_form.html.haml +24 -0
  196. data/app/views/photos/_manage_photos.html.haml +14 -6
  197. data/app/views/photos/_show_image_list.html.haml +2 -2
  198. data/app/views/photos/create.js.erb +1 -0
  199. data/app/views/photos/edit.html.haml +10 -38
  200. data/app/views/photos/index.html.haml +20 -20
  201. data/app/views/photos/manage_photos.js.erb +5 -0
  202. data/app/views/photos/new.html.haml +11 -49
  203. data/app/views/photos/recent.html.haml +6 -6
  204. data/app/views/photos/show.html.haml +48 -52
  205. data/app/views/polls/_edit.html.haml +6 -10
  206. data/app/views/polls/_excerpt.html.haml +3 -4
  207. data/app/views/polls/_new.html.haml +10 -9
  208. data/app/views/polls/_poll_ui.html.haml +30 -34
  209. data/app/views/posts/_author_profile.html.haml +12 -11
  210. data/app/views/posts/_favorited_post.html.haml +8 -10
  211. data/app/views/posts/_form.html.haml +40 -0
  212. data/app/views/posts/_menu_item.html.haml +6 -0
  213. data/app/views/posts/_post.html.haml +27 -24
  214. data/app/views/posts/_send_to_friend.html.haml +26 -0
  215. data/app/views/posts/edit.html.haml +11 -48
  216. data/app/views/posts/featured.html.haml +7 -12
  217. data/app/views/posts/index.html.haml +14 -18
  218. data/app/views/posts/manage.html.haml +44 -59
  219. data/app/views/posts/new.html.haml +9 -64
  220. data/app/views/posts/popular.html.haml +25 -30
  221. data/app/views/posts/preview.html.haml +27 -26
  222. data/app/views/posts/recent.html.haml +20 -27
  223. data/app/views/posts/send_to_friend.js.erb +3 -0
  224. data/app/views/posts/show.html.haml +67 -76
  225. data/app/views/rsvps/_form.html.haml +3 -0
  226. data/app/views/rsvps/edit.html.haml +3 -9
  227. data/app/views/rsvps/new.html.haml +3 -9
  228. data/app/views/sb_posts/_dummy_forum_post.html.haml +13 -0
  229. data/app/views/sb_posts/_edit.html.haml +6 -0
  230. data/app/views/sb_posts/_edit_script.js.erb +14 -0
  231. data/app/views/sb_posts/_reply_form.html.haml +14 -35
  232. data/app/views/sb_posts/_reply_script.js.erb +13 -0
  233. data/app/views/sb_posts/_sb_post.html.haml +31 -33
  234. data/app/views/sb_posts/create.js.erb +30 -0
  235. data/app/views/sb_posts/destroy.js.erb +2 -0
  236. data/app/views/sb_posts/edit.html.erb +4 -4
  237. data/app/views/sb_posts/edit.js.erb +14 -0
  238. data/app/views/sb_posts/index.html.haml +3 -16
  239. data/app/views/sb_posts/monitored.html.erb +3 -9
  240. data/app/views/sb_posts/update.js.erb +11 -0
  241. data/app/views/sessions/_menu_item.html.haml +28 -0
  242. data/app/views/sessions/new.html.haml +19 -24
  243. data/app/views/shared/_add_friend_link.html.haml +9 -0
  244. data/app/views/shared/_admin_nav.html.haml +6 -8
  245. data/app/views/shared/_contact.html.haml +1 -1
  246. data/app/views/shared/_end_javascript.html.haml +4 -4
  247. data/app/views/shared/_explore.html.haml +7 -6
  248. data/app/views/shared/_footer_content.html.haml +12 -10
  249. data/app/views/shared/_footer_links.html.haml +18 -0
  250. data/app/views/shared/_friend_link.html.haml +25 -0
  251. data/app/views/shared/_header.html.haml +22 -42
  252. data/app/views/shared/_jumbotron.html.haml +3 -0
  253. data/app/views/shared/_load_tinymce.js.erb +15 -0
  254. data/app/views/shared/_location_chooser.html.haml +26 -17
  255. data/app/views/shared/_login_sidebar.html.haml +6 -5
  256. data/app/views/shared/_messages.html.haml +6 -8
  257. data/app/views/shared/_scripts_and_styles.html.haml +1 -2
  258. data/app/views/shared/_sidebar.html.haml +1 -0
  259. data/app/views/shared/_tag_auto_complete.html.haml +19 -0
  260. data/app/views/shared/_widget.html.haml +3 -0
  261. data/app/views/sitemap/index.html.haml +15 -20
  262. data/app/views/statistics/index.html.haml +32 -40
  263. data/app/views/tags/edit.html.haml +12 -19
  264. data/app/views/tags/index.html.haml +16 -25
  265. data/app/views/tags/manage.html.haml +24 -33
  266. data/app/views/tags/show.html.haml +52 -58
  267. data/app/views/topics/_form.html.haml +23 -25
  268. data/app/views/topics/_recent_topics_sidebar.haml +1 -1
  269. data/app/views/topics/edit.html.haml +7 -9
  270. data/app/views/topics/new.html.haml +6 -21
  271. data/app/views/topics/show.html.haml +48 -106
  272. data/app/views/user_notifier/follow_up_comment_notice.text.erb +1 -1
  273. data/app/views/user_notifier/message_notification.text.erb +1 -1
  274. data/app/views/user_notifier/new_forum_post_notice.text.erb +1 -1
  275. data/app/views/users/_dashboard_nav.html.haml +36 -39
  276. data/app/views/users/_menu_item.html.haml +6 -0
  277. data/app/views/users/_omniauth_connect.html.haml +4 -4
  278. data/app/views/users/_profile_completeness.html.haml +3 -3
  279. data/app/views/users/_profile_user_info_sidebar.html.haml +40 -43
  280. data/app/views/users/_search_options.html.haml +9 -7
  281. data/app/views/users/_sidebar_user.html.haml +1 -1
  282. data/app/views/users/_user.html.haml +27 -28
  283. data/app/views/users/crop_profile_photo.html.haml +30 -37
  284. data/app/views/users/dashboard.html.haml +37 -41
  285. data/app/views/users/edit.html.haml +53 -71
  286. data/app/views/users/edit_account.html.haml +44 -64
  287. data/app/views/users/forgot_username.html.haml +6 -12
  288. data/app/views/users/index.html.haml +4 -14
  289. data/app/views/users/invite.html.haml +14 -25
  290. data/app/views/users/new.html.haml +27 -48
  291. data/app/views/users/resend_activation.html.haml +7 -12
  292. data/app/views/users/show.html.haml +88 -90
  293. data/app/views/users/signup_completed.html.haml +7 -7
  294. data/app/views/users/statistics.html.haml +17 -18
  295. data/app/views/users/update.js.erb +1 -0
  296. data/app/views/users/upload_profile_photo.html.haml +10 -15
  297. data/app/views/users/welcome_about.html.haml +54 -61
  298. data/app/views/users/welcome_invite.html.haml +16 -25
  299. data/app/views/users/welcome_photo.html.haml +18 -27
  300. data/app/views/votes/create.js.erb +5 -0
  301. data/community_engine.gemspec +49 -41
  302. data/config/application_config.rb +13 -16
  303. data/config/initializers/mce_options.rb +9 -32
  304. data/config/initializers/recaptcha_constants.rb +2 -2
  305. data/config/locales/de-DE.yml +1 -17
  306. data/config/locales/en.yml +18 -32
  307. data/config/locales/es-AR.yml +2 -14
  308. data/config/locales/es-ES.yml +0 -6
  309. data/config/locales/es-MX.yml +1 -9
  310. data/config/locales/fr-FR.yml +3 -17
  311. data/config/locales/ja-JP.yml +2 -18
  312. data/config/locales/ru-RU.yml +3 -21
  313. data/config/locales/sr-CP.yml +0 -4
  314. data/config/locales/sv-SE.yml +3 -20
  315. data/config/routes.rb +37 -42
  316. data/db/migrate/016_add_metro_areas.rb +2 -2
  317. data/db/migrate/039_create_activities_table.rb +2 -2
  318. data/db/migrate/056_create_roles.rb +8 -6
  319. data/db/migrate/069_create_pages.rb +3 -3
  320. data/db/migrate/081_upgrade_to_friendly_id_5x.rb +25 -0
  321. data/db/migrate/082_upgrade_to_acts_as_commentable_4x.rb +29 -0
  322. data/lib/activity_tracker.rb +3 -0
  323. data/{vendor/plugins/activity_tracker/lib → lib/activity_tracker}/activity.rb +6 -6
  324. data/{vendor/plugins/activity_tracker/lib → lib/activity_tracker}/activity_tracker.rb +0 -0
  325. data/{vendor/plugins/acts_as_publishable/init.rb → lib/acts_as_publishable.rb} +1 -1
  326. data/{vendor/plugins/acts_as_publishable/lib → lib/acts_as_publishable}/acts_as_publishable.rb +3 -3
  327. data/lib/community_engine.rb +31 -9
  328. data/lib/community_engine/engine.rb +17 -1
  329. data/lib/community_engine/engines_extensions.rb +1 -3
  330. data/lib/community_engine/version.rb +3 -3
  331. data/{config/initializers → lib/paperclip_processors}/cropper.rb +3 -3
  332. data/lib/resource_feeder.rb +3 -0
  333. data/{vendor/plugins/resource_feeder/lib → lib}/resource_feeder/atom.rb +0 -0
  334. data/{vendor/plugins/resource_feeder/lib → lib}/resource_feeder/rss.rb +0 -0
  335. data/{vendor/plugins/white_list/init.rb → lib/white_list.rb} +1 -1
  336. data/{vendor/plugins/white_list/lib → lib/white_list}/white_list_helper.rb +0 -0
  337. data/test/fixtures/messages.yml +2 -2
  338. data/test/functional/admin_controller_test.rb +11 -11
  339. data/test/functional/ads_controller_test.rb +11 -11
  340. data/test/functional/albums_controller_test.rb +4 -4
  341. data/test/functional/categories_controller_test.rb +4 -4
  342. data/test/functional/clippings_controller_test.rb +4 -4
  343. data/test/functional/comments_controller_test.rb +20 -16
  344. data/test/functional/events_controller_test.rb +6 -6
  345. data/test/functional/forums_controller_test.rb +8 -8
  346. data/test/functional/friendships_controller_test.rb +13 -18
  347. data/test/functional/homepage_features_controller_test.rb +5 -5
  348. data/test/functional/messages_controller_test.rb +6 -2
  349. data/test/functional/metro_areas_controller_test.rb +7 -7
  350. data/test/functional/moderators_controller_test.rb +1 -1
  351. data/test/functional/pages_controller_test.rb +2 -2
  352. data/test/functional/password_reset_controller_test.rb +2 -2
  353. data/test/functional/photos_controller_test.rb +16 -15
  354. data/test/functional/posts_controller_test.rb +4 -4
  355. data/test/functional/rsvps_controller_test.rb +6 -6
  356. data/test/functional/sb_posts_controller_test.rb +53 -50
  357. data/test/functional/sessions_controller_test.rb +4 -1
  358. data/test/functional/tags_controller_test.rb +1 -1
  359. data/test/functional/topics_controller_test.rb +10 -10
  360. data/test/functional/users_controller_test.rb +32 -19
  361. data/test/functional/votes_controller_test.rb +1 -1
  362. data/test/test_helper.rb +3 -1
  363. data/test/testapp/config/application.rb +1 -9
  364. data/test/testapp/config/environments/development.rb +1 -2
  365. data/test/testapp/config/environments/production.rb +2 -0
  366. data/test/testapp/config/environments/test.rb +1 -2
  367. data/test/testapp/config/initializers/omniauth.rb +3 -3
  368. data/test/testapp/config/initializers/secret_token.rb +1 -0
  369. data/test/testapp/db/schema.rb +143 -152
  370. data/test/unit/category_test.rb +2 -2
  371. data/test/unit/comment_test.rb +64 -53
  372. data/test/unit/event_test.rb +4 -4
  373. data/test/unit/forum_test.rb +1 -1
  374. data/test/unit/message_test.rb +7 -1
  375. data/test/unit/page_test.rb +2 -2
  376. data/test/unit/post_test.rb +47 -47
  377. data/test/unit/sb_post_test.rb +24 -20
  378. data/test/unit/topic_test.rb +7 -6
  379. data/test/unit/user_test.rb +75 -52
  380. data/vendor/assets/javascripts/.gitkeep +0 -0
  381. data/vendor/assets/javascripts/jcrop/jquery.Jcrop.js +1699 -0
  382. data/vendor/assets/javascripts/jcrop/jquery.color.js +661 -0
  383. data/vendor/assets/javascripts/tag-it/tag-it.js +597 -0
  384. data/vendor/assets/stylesheets/.gitkeep +0 -0
  385. data/vendor/assets/stylesheets/jcrop/Jcrop.gif +0 -0
  386. data/vendor/assets/stylesheets/jcrop/jquery.Jcrop.min.css +28 -0
  387. data/vendor/assets/stylesheets/tag-it/tag-it.css +69 -0
  388. data/vendor/assets/stylesheets/tag-it/tagit.ui-zendesk.css +107 -0
  389. data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/acts_as_publishable/README +0 -0
  390. data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/acts_as_publishable/Rakefile +0 -0
  391. data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/acts_as_publishable/generators/publishing/publishing_generator.rb +0 -0
  392. data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/acts_as_publishable/generators/publishing/templates/migration.rb +0 -0
  393. data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/acts_as_publishable/install.rb +0 -0
  394. data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/acts_as_publishable/test/acts_as_publishable_test.rb +0 -0
  395. data/vendor/{plugins/activity_tracker → converted2.3plugins_to_lib_leftovers/acts_as_publishable}/uninstall.rb +0 -0
  396. data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/resource_feeder/README +0 -0
  397. data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/resource_feeder/Rakefile +0 -0
  398. data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/resource_feeder/test/atom_feed_test.rb +0 -0
  399. data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/resource_feeder/test/rss_feed_test.rb +0 -0
  400. data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/resource_feeder/test/test_helper.rb +0 -0
  401. data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/white_list/README +0 -0
  402. data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/white_list/Rakefile +0 -0
  403. data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/white_list/test/white_list_test.rb +0 -0
  404. metadata +348 -302
  405. data/app/assets/images/bg_h6btn.gif +0 -0
  406. data/app/assets/images/bg_navbar.gif +0 -0
  407. data/app/assets/images/clearbits/bg_rounded.gif +0 -0
  408. data/app/assets/images/clearbits/comment.gif +0 -0
  409. data/app/assets/images/clearbits/lock.gif +0 -0
  410. data/app/assets/images/clearbits/smile.gif +0 -0
  411. data/app/assets/images/close.gif +0 -0
  412. data/app/assets/images/cropper/marqueeHoriz.gif +0 -0
  413. data/app/assets/images/cropper/marqueeVert.gif +0 -0
  414. data/app/assets/images/feed.png +0 -0
  415. data/app/assets/images/icons/31.png +0 -0
  416. data/app/assets/images/icons/52.png +0 -0
  417. data/app/assets/images/icons/accept.png +0 -0
  418. data/app/assets/images/icons/activity_default.png +0 -0
  419. data/app/assets/images/icons/add.png +0 -0
  420. data/app/assets/images/icons/book.png +0 -0
  421. data/app/assets/images/icons/bullet_arrow_down.png +0 -0
  422. data/app/assets/images/icons/bullet_arrow_down_50.png +0 -0
  423. data/app/assets/images/icons/clipping.png +0 -0
  424. data/app/assets/images/icons/comment.png +0 -0
  425. data/app/assets/images/icons/comments.png +0 -0
  426. data/app/assets/images/icons/date.png +0 -0
  427. data/app/assets/images/icons/delete.png +0 -0
  428. data/app/assets/images/icons/email.png +0 -0
  429. data/app/assets/images/icons/email_edit.png +0 -0
  430. data/app/assets/images/icons/email_go.png +0 -0
  431. data/app/assets/images/icons/email_open.png +0 -0
  432. data/app/assets/images/icons/group_go.png +0 -0
  433. data/app/assets/images/icons/heart.png +0 -0
  434. data/app/assets/images/icons/heart_add.png +0 -0
  435. data/app/assets/images/icons/heart_off.png +0 -0
  436. data/app/assets/images/icons/page_white.png +0 -0
  437. data/app/assets/images/icons/page_white_magnify.png +0 -0
  438. data/app/assets/images/icons/picture.png +0 -0
  439. data/app/assets/images/icons/poll.png +0 -0
  440. data/app/assets/images/icons/post.png +0 -0
  441. data/app/assets/images/icons/printer.png +0 -0
  442. data/app/assets/images/icons/rss.png +0 -0
  443. data/app/assets/images/icons/slides.png +0 -0
  444. data/app/assets/images/icons/tag_blue.png +0 -0
  445. data/app/assets/images/icons/user.png +0 -0
  446. data/app/assets/images/icons/user_add.png +0 -0
  447. data/app/assets/images/icons/user_edit.png +0 -0
  448. data/app/assets/images/icons/user_go.png +0 -0
  449. data/app/assets/images/icons/vote.png +0 -0
  450. data/app/assets/images/icons/world.png +0 -0
  451. data/app/assets/images/icons/wrench.png +0 -0
  452. data/app/assets/images/logo.gif +0 -0
  453. data/app/assets/images/reply_background.png +0 -0
  454. data/app/assets/images/search.gif +0 -0
  455. data/app/assets/images/thumb.gif +0 -0
  456. data/app/assets/javascripts/builder.js +0 -136
  457. data/app/assets/javascripts/calendarview.js +0 -839
  458. data/app/assets/javascripts/lightbox.js +0 -151
  459. data/app/assets/javascripts/prototip-min.js +0 -27
  460. data/app/assets/javascripts/rails.js +0 -202
  461. data/app/assets/javascripts/tinymce/plugins/curblyadvimage/css/advimage.css +0 -84
  462. data/app/assets/javascripts/tinymce/plugins/curblyadvimage/editor_plugin.js +0 -52
  463. data/app/assets/javascripts/tinymce/plugins/curblyadvimage/editor_plugin_src.js +0 -45
  464. data/app/assets/javascripts/tinymce/plugins/curblyadvimage/image.htm +0 -180
  465. data/app/assets/javascripts/tinymce/plugins/curblyadvimage/img/sample.gif +0 -0
  466. data/app/assets/javascripts/tinymce/plugins/curblyadvimage/js/functions.js +0 -508
  467. data/app/assets/javascripts/tinymce/plugins/curblyadvimage/langs/en.js +0 -3
  468. data/app/assets/javascripts/tinymce/plugins/curblyadvimage/langs/en_dlg.js +0 -43
  469. data/app/assets/javascripts/tinymce/plugins/tinyautosave/editor_plugin.js +0 -8
  470. data/app/assets/javascripts/tinymce/plugins/tinyautosave/editor_plugin_src.js +0 -1001
  471. data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/progress.gif +0 -0
  472. data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/progress10.gif +0 -0
  473. data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/progress11.gif +0 -0
  474. data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/progress12.gif +0 -0
  475. data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/progress2.gif +0 -0
  476. data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/progress3.gif +0 -0
  477. data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/progress4.gif +0 -0
  478. data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/progress5.gif +0 -0
  479. data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/progress6.gif +0 -0
  480. data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/progress7.gif +0 -0
  481. data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/progress8.gif +0 -0
  482. data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/progress9.gif +0 -0
  483. data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/restore.gif +0 -0
  484. data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/restore.png +0 -0
  485. data/app/assets/javascripts/tinymce/plugins/tinyautosave/langs/da.js +0 -5
  486. data/app/assets/javascripts/tinymce/plugins/tinyautosave/langs/en.js +0 -5
  487. data/app/assets/stylesheets/community_engine.css +0 -6
  488. data/app/assets/stylesheets/forum.css +0 -605
  489. data/app/assets/stylesheets/prototip.css +0 -73
  490. data/app/assets/stylesheets/reset-fonts-grids.css +0 -8
  491. data/app/assets/stylesheets/screen.css +0 -977
  492. data/app/helpers/monitorships_helper.rb +0 -2
  493. data/app/views/activities/_icon.html.haml +0 -14
  494. data/app/views/activities/destroy.js.rjs +0 -1
  495. data/app/views/clippings/_meta.html.haml +0 -26
  496. data/app/views/clippings/load_images_from_uri.js.rjs +0 -1
  497. data/app/views/comments/create.js.rjs +0 -20
  498. data/app/views/comments/edit.js.rjs +0 -7
  499. data/app/views/comments/update.js.rjs +0 -9
  500. data/app/views/favorites/create.js.rjs +0 -17
  501. data/app/views/favorites/destroy.js.rjs +0 -14
  502. data/app/views/favorites/show.html.haml +0 -13
  503. data/app/views/friendships/_friendships.html.erb +0 -14
  504. data/app/views/friendships/index.html.erb +0 -3
  505. data/app/views/friendships/index.xml.builder +0 -29
  506. data/app/views/invitations/index.html.erb +0 -16
  507. data/app/views/moderators/_toggle.html.erb +0 -14
  508. data/app/views/moderators/create.js.rjs +0 -5
  509. data/app/views/moderators/destroy.js.rjs +0 -1
  510. data/app/views/monitorships/create.js.rjs +0 -4
  511. data/app/views/monitorships/destroy.js.rjs +0 -4
  512. data/app/views/photos/manage_photos.js.rjs +0 -5
  513. data/app/views/polls/_polls_sidebar.html.haml +0 -8
  514. data/app/views/posts/_send_to_friend.html.erb +0 -29
  515. data/app/views/sb_posts/_dummy_forum_post.html.erb +0 -13
  516. data/app/views/sb_posts/_edit.html.erb +0 -31
  517. data/app/views/sb_posts/create.js.rjs +0 -16
  518. data/app/views/sb_posts/edit.js.rjs +0 -6
  519. data/app/views/sb_posts/update.js.rjs +0 -5
  520. data/app/views/shared/_user_menu.html.haml +0 -21
  521. data/app/views/votes/create.js.rjs +0 -6
  522. data/db/migrate/090_add_comment_role.rb +0 -15
  523. data/vendor/plugins/activity_tracker/README +0 -4
  524. data/vendor/plugins/activity_tracker/Rakefile +0 -22
  525. data/vendor/plugins/activity_tracker/generators/activity_migration/USAGE +0 -13
  526. data/vendor/plugins/activity_tracker/generators/activity_migration/activity_migration_generator.rb +0 -11
  527. data/vendor/plugins/activity_tracker/generators/activity_migration/templates/migration.rb +0 -17
  528. data/vendor/plugins/activity_tracker/init.rb +0 -1
  529. data/vendor/plugins/activity_tracker/install.rb +0 -1
  530. data/vendor/plugins/activity_tracker/tasks/activity_tracker_tasks.rake +0 -4
  531. data/vendor/plugins/activity_tracker/test/abstract_unit.rb +0 -47
  532. data/vendor/plugins/activity_tracker/test/activity_tracker_test.rb +0 -48
  533. data/vendor/plugins/activity_tracker/test/database.yml +0 -18
  534. data/vendor/plugins/activity_tracker/test/debug.log +0 -3329
  535. data/vendor/plugins/activity_tracker/test/fixtures/test_post.rb +0 -5
  536. data/vendor/plugins/activity_tracker/test/fixtures/test_posts.yml +0 -3
  537. data/vendor/plugins/activity_tracker/test/fixtures/test_user.rb +0 -4
  538. data/vendor/plugins/activity_tracker/test/fixtures/test_users.yml +0 -6
  539. data/vendor/plugins/activity_tracker/test/schema.rb +0 -21
  540. data/vendor/plugins/acts_as_list/README +0 -23
  541. data/vendor/plugins/acts_as_list/init.rb +0 -3
  542. data/vendor/plugins/acts_as_list/lib/active_record/acts/list.rb +0 -256
  543. data/vendor/plugins/acts_as_list/test/list_test.rb +0 -332
  544. data/vendor/plugins/acts_as_publishable/uninstall.rb +0 -1
  545. data/vendor/plugins/auto_complete/README +0 -23
  546. data/vendor/plugins/auto_complete/Rakefile +0 -22
  547. data/vendor/plugins/auto_complete/init.rb +0 -2
  548. data/vendor/plugins/auto_complete/lib/auto_complete.rb +0 -47
  549. data/vendor/plugins/auto_complete/lib/auto_complete_macros_helper.rb +0 -143
  550. data/vendor/plugins/auto_complete/test/auto_complete_test.rb +0 -67
  551. data/vendor/plugins/enumerations_mixin/.gitignore +0 -1
  552. data/vendor/plugins/enumerations_mixin/Gemfile +0 -1
  553. data/vendor/plugins/enumerations_mixin/LICENSE +0 -20
  554. data/vendor/plugins/enumerations_mixin/README.md +0 -120
  555. data/vendor/plugins/enumerations_mixin/README_ENUMERATIONS +0 -163
  556. data/vendor/plugins/enumerations_mixin/Rakefile +0 -14
  557. data/vendor/plugins/enumerations_mixin/VERSION +0 -1
  558. data/vendor/plugins/enumerations_mixin/enumerations_mixin.gemspec +0 -44
  559. data/vendor/plugins/enumerations_mixin/examples/virtual_enumerations_sample.rb +0 -76
  560. data/vendor/plugins/enumerations_mixin/init.rb +0 -21
  561. data/vendor/plugins/enumerations_mixin/lib/active_record/acts/enumerated.rb +0 -180
  562. data/vendor/plugins/enumerations_mixin/lib/active_record/aggregations/has_enumerated.rb +0 -60
  563. data/vendor/plugins/enumerations_mixin/lib/active_record/virtual_enumerations.rb +0 -68
  564. data/vendor/plugins/enumerations_mixin/lib/enumerations_mixin.rb +0 -12
  565. data/vendor/plugins/enumerations_mixin/virtual_enumerations_sample.rb +0 -76
  566. data/vendor/plugins/prototype_legacy_helper/README.markdown +0 -13
  567. data/vendor/plugins/prototype_legacy_helper/init.rb +0 -1
  568. data/vendor/plugins/prototype_legacy_helper/lib/prototype_legacy_helper.rb +0 -432
  569. data/vendor/plugins/prototype_legacy_helper/test/test_prototype_helper.rb +0 -297
  570. data/vendor/plugins/resource_feeder/init.rb +0 -2
  571. data/vendor/plugins/resource_feeder/lib/resource_feeder.rb +0 -2
  572. data/vendor/plugins/respond_to_parent/MIT-LICENSE +0 -20
  573. data/vendor/plugins/respond_to_parent/README +0 -47
  574. data/vendor/plugins/respond_to_parent/Rakefile +0 -22
  575. data/vendor/plugins/respond_to_parent/init.rb +0 -1
  576. data/vendor/plugins/respond_to_parent/install.rb +0 -1
  577. data/vendor/plugins/respond_to_parent/lib/responds_to_parent.rb +0 -70
  578. data/vendor/plugins/respond_to_parent/test/responds_to_parent_test.rb +0 -10
  579. data/vendor/plugins/respond_to_parent/test/test_helper.rb +0 -6
  580. data/vendor/plugins/respond_to_parent/uninstall.rb +0 -1
@@ -27,15 +27,15 @@ class UsersControllerTest < ActionController::TestCase
27
27
  def test_should_toggle_moderator
28
28
  login_as :admin
29
29
  assert !users(:quentin).moderator?
30
- put :toggle_moderator, :id => users(:quentin)
30
+ patch :toggle_moderator, :id => users(:quentin)
31
31
  assert users(:quentin).reload.moderator?
32
- put :toggle_moderator, :id => users(:quentin)
32
+ patch :toggle_moderator, :id => users(:quentin)
33
33
  assert !users(:quentin).reload.moderator?
34
34
  end
35
35
 
36
36
  def test_should_not_toggle_featured_writer_if_not_admin
37
37
  login_as :quentin
38
- put :toggle_moderator, :id => users(:quentin)
38
+ patch :toggle_moderator, :id => users(:quentin)
39
39
  assert_redirected_to :login_url
40
40
  assert !users(:quentin).reload.moderator?
41
41
  end
@@ -44,15 +44,15 @@ class UsersControllerTest < ActionController::TestCase
44
44
  def test_should_toggle_featured_writer
45
45
  login_as :admin
46
46
  assert !users(:quentin).featured_writer?
47
- put :toggle_featured, :id => users(:quentin)
47
+ patch :toggle_featured, :id => users(:quentin)
48
48
  assert users(:quentin).reload.featured_writer?
49
- put :toggle_featured, :id => users(:quentin)
49
+ patch :toggle_featured, :id => users(:quentin)
50
50
  assert !users(:quentin).reload.featured_writer?
51
51
  end
52
52
 
53
53
  def test_should_not_toggle_featured_writer_if_not_admin
54
54
  login_as :quentin
55
- put :toggle_featured, :id => users(:quentin)
55
+ patch :toggle_featured, :id => users(:quentin)
56
56
  assert_redirected_to login_url
57
57
  assert !users(:quentin).reload.featured_writer?
58
58
  end
@@ -134,7 +134,7 @@ class UsersControllerTest < ActionController::TestCase
134
134
  def test_should_deactivate_and_logout
135
135
  login_as :quentin
136
136
  assert users(:quentin).active?
137
- put :deactivate, :id => users(:quentin).id
137
+ patch :deactivate, :id => users(:quentin).id
138
138
  assert !users(:quentin).reload.active?
139
139
  assert_redirected_to login_path
140
140
  end
@@ -209,7 +209,7 @@ class UsersControllerTest < ActionController::TestCase
209
209
 
210
210
  def test_should_update_user
211
211
  login_as :quentin
212
- put :update, :id => users(:quentin), :user => {:email => "changed_email@email.com"}
212
+ patch :update, :id => users(:quentin), :user => {:email => "changed_email@email.com"}
213
213
  assert_redirected_to user_path(users(:quentin).reload)
214
214
  assert_equal assigns(:user).email, "changed_email@email.com"
215
215
  end
@@ -218,14 +218,14 @@ class UsersControllerTest < ActionController::TestCase
218
218
  login_as :quentin
219
219
  users(:quentin).tag_list = ''
220
220
  users(:quentin).save
221
- put :update, :id => users(:quentin), :tag_list => 'tag1, tag2', :user => {}
221
+ patch :update, :id => users(:quentin), :tag_list => 'tag1, tag2', :user => {}
222
222
  assert_redirected_to user_path(users(:quentin).reload)
223
223
  assert_equal users(:quentin).tag_list, ['tag1', 'tag2']
224
224
  end
225
225
 
226
226
  def test_should_not_update_user
227
227
  login_as :quentin
228
- put :update, :id => users(:aaron), :user => {:login => "changed_login", :email => "changed_email@email.com"}
228
+ patch :update, :id => users(:aaron), :user => {:login => "changed_login", :email => "changed_email@email.com"}
229
229
  assert_redirected_to login_path
230
230
  end
231
231
 
@@ -255,22 +255,22 @@ class UsersControllerTest < ActionController::TestCase
255
255
 
256
256
  def test_should_upload_avatar
257
257
  login_as :quentin
258
- put :update, :id => users(:quentin).id, :user => {:avatar_attributes => {:photo => fixture_file_upload('/files/library.jpg', 'image/jpg')}}
258
+ patch :update, :id => users(:quentin).id, :user => {:avatar_attributes => {:photo => fixture_file_upload('/files/library.jpg', 'image/jpg')}}
259
259
  assert_equal users(:quentin).reload.avatar.photo_file_name, "library.jpg"
260
260
  end
261
261
 
262
262
  def test_should_upload_avatar_from_url
263
263
  login_as :quentin
264
- put :update, :id => users(:quentin).id, :user => {:avatar_attributes => {:photo_remote_url => 'http://www.google.com/intl/en_ALL/images/logo.gif'}}
264
+ patch :update, :id => users(:quentin).id, :user => {:avatar_attributes => {:photo_remote_url => 'http://www.google.com/intl/en_ALL/images/logo.gif'}}
265
265
  assert_equal users(:quentin).reload.avatar.photo_file_name, "library.jpg" #UrlUpload is mocked in test helper
266
266
  end
267
267
 
268
268
  def test_should_not_delete_existing_avatar_if_file_field_is_blank
269
269
  login_as :quentin
270
- put :update, :id => users(:quentin).id, :user => {:avatar_attributes => {:photo => fixture_file_upload('/files/library.jpg', 'image/jpg')}}
270
+ patch :update, :id => users(:quentin).id, :user => {:avatar_attributes => {:photo => fixture_file_upload('/files/library.jpg', 'image/jpg')}}
271
271
  assert users(:quentin).reload.avatar.photo_file_name, "library.jpg"
272
272
 
273
- put :update, :id => users(:quentin).id, :user => {}
273
+ patch :update, :id => users(:quentin).id, :user => {}
274
274
  assert_equal users(:quentin).reload.avatar.photo_file_name, "library.jpg"
275
275
  end
276
276
 
@@ -283,17 +283,29 @@ class UsersControllerTest < ActionController::TestCase
283
283
  users(:quentin).avatar = avatar
284
284
  users(:quentin).save
285
285
 
286
- put :crop_profile_photo, :id => users(:quentin).id, :x1 => 0, :y1 => 0, :width => 290, :height => 320
286
+ # patch :crop_profile_photo, :id => users(:quentin).id, :x1 => 0, :y1 => 0, :width => 290, :height => 320
287
+ patch :crop_profile_photo, :id => users(:quentin).id, :crop_x => 0, :crop_y => 0, :crop_w => 290, :crop_h => 320
287
288
 
288
289
  assert_redirected_to user_path(users(:quentin))
289
290
  end
290
291
 
291
292
  def test_should_upload_profile_photo
292
293
  login_as :quentin
293
- put :upload_profile_photo, :id => users(:quentin), :avatar => {:photo => fixture_file_upload('/files/library.jpg', 'image/jpg')}
294
+ patch :upload_profile_photo, :id => users(:quentin).id, :avatar => {:photo => fixture_file_upload('/files/library.jpg', 'image/jpg')}
294
295
  assert_redirected_to crop_profile_photo_user_path(users(:quentin).reload)
295
296
  end
296
297
 
298
+ def test_should_change_profile_photo
299
+ login_as :quentin
300
+ users(:quentin).avatar = photos(:library_pic)
301
+ users(:quentin).save!
302
+
303
+ patch :change_profile_photo, :id => users(:quentin).id, :photo_id => photos(:another_pic).id
304
+ assert users(:quentin).reload.avatar.photo_file_name, photos(:another_pic).photo_file_name
305
+
306
+ assert_redirected_to user_photo_path(users(:quentin), photos(:another_pic))
307
+ end
308
+
297
309
  def test_create_friendship_with_invited_user
298
310
  assert_difference User, :count do
299
311
  assert_difference Friendship, :count, 2 do
@@ -305,7 +317,7 @@ class UsersControllerTest < ActionController::TestCase
305
317
 
306
318
  def test_should_update_account
307
319
  login_as :quentin
308
- put :update_account, :user => {:login => 'changed_login'}, :id => users(:quentin)
320
+ patch :update_account, :user => {:login => 'changed_login'}, :id => users(:quentin)
309
321
  assert_redirected_to user_path(users(:quentin).reload)
310
322
  assert_equal assigns(:user).login, 'changed_login'
311
323
  end
@@ -397,11 +409,12 @@ class UsersControllerTest < ActionController::TestCase
397
409
  end
398
410
 
399
411
  def test_should_increment_metro_area_count
400
- initial_count = metro_areas(:detroit).users_count
412
+ initial_count = metro_areas(:detroit).users.count
401
413
  aaron = users(:aaron)
402
414
  aaron.metro_area = metro_areas(:detroit)
403
415
  aaron.save!
404
- assert_equal metro_areas(:detroit).reload.users_count, initial_count + 1
416
+ n_users = metro_areas(:detroit).reload.users.count
417
+ assert_equal n_users, initial_count + 1
405
418
  assert_equal(metro_areas(:detroit).reload.users_count, metro_areas(:detroit).reload.users.size )
406
419
  end
407
420
 
@@ -17,7 +17,7 @@ class VotesControllerTest < ActionController::TestCase
17
17
 
18
18
  login_as :quentin
19
19
  assert_difference Vote, :count, 1 do
20
- post :create, :choice_id => Choice.find(:first).id, :format => 'js'
20
+ post :create, :choice_id => Choice.first.id, :format => 'js'
21
21
  end
22
22
  assert_response :success
23
23
 
@@ -15,13 +15,15 @@ require "community_engine/authenticated_test_helper"
15
15
  require "mocha/setup"
16
16
 
17
17
  ActiveSupport::TestCase.fixture_path = (Rails.root + "../fixtures").to_s #we want a string here, not a Pathname
18
- ActionController::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
18
+ ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
19
19
 
20
20
  class ActionController::TestCase
21
+ include Authlogic::TestCase
21
22
  setup :activate_authlogic
22
23
  end
23
24
 
24
25
  class ActiveSupport::TestCase
26
+ include Authlogic::TestCase
25
27
  setup :activate_authlogic
26
28
  include AuthenticatedTestHelper
27
29
  include ActionDispatch::TestProcess
@@ -2,11 +2,7 @@ require File.expand_path('../boot', __FILE__)
2
2
 
3
3
  require 'rails/all'
4
4
 
5
- #tired of the warnings, for now
6
- ActiveSupport::Deprecation.silenced = true
7
-
8
- Bundler.require
9
- require "community_engine"
5
+ Bundler.require(:default, Rails.env)
10
6
 
11
7
  module Dummy
12
8
  class Application < Rails::Application
@@ -41,9 +37,5 @@ module Dummy
41
37
 
42
38
  # Configure sensitive parameters which will be filtered from the log file.
43
39
  config.filter_parameters += [:password]
44
-
45
- # Raise exception on mass assignment protection for Active Record models
46
- config.active_record.mass_assignment_sanitizer = :strict
47
-
48
40
  end
49
41
  end
@@ -6,8 +6,7 @@ Dummy::Application.configure do
6
6
  # since you don't have to restart the webserver when you make code changes.
7
7
  config.cache_classes = false
8
8
 
9
- # Log error messages when you accidentally call methods on nil.
10
- config.whiny_nils = true
9
+ config.eager_load = false
11
10
 
12
11
  # Show full error reports and disable caching
13
12
  config.consider_all_requests_local = true
@@ -5,6 +5,8 @@ Dummy::Application.configure do
5
5
  # Code is not reloaded between requests
6
6
  config.cache_classes = true
7
7
 
8
+ config.eager_load = true
9
+
8
10
  # Full error reports are disabled and caching is turned on
9
11
  config.consider_all_requests_local = false
10
12
  config.action_controller.perform_caching = true
@@ -7,8 +7,7 @@ Dummy::Application.configure do
7
7
  # and recreated between test runs. Don't rely on the data there!
8
8
  config.cache_classes = true
9
9
 
10
- # Log error messages when you accidentally call methods on nil.
11
- config.whiny_nils = true
10
+ config.eager_load = false
12
11
 
13
12
  # Show full error reports and disable caching
14
13
  config.consider_all_requests_local = true
@@ -1,3 +1,3 @@
1
- Rails.application.config.middleware.use OmniAuth::Builder do
2
- provider :facebook, 'APP_ID', 'APP_SECRET'
3
- end
1
+ # Rails.application.config.middleware.use OmniAuth::Builder do
2
+ # provider :facebook, 'APP_ID', 'APP_SECRET'
3
+ # end
@@ -5,3 +5,4 @@
5
5
  # Make sure the secret is at least 30 characters and all random,
6
6
  # no regular words or you'll be exposed to dictionary attacks.
7
7
  Dummy::Application.config.secret_token = 'd3602686e46c4552c3da68af512580e4c99a1b0de01de0e8e5463247f1574d901036a03f71c499452492f20f85688243c21a9d5433d2027014c4c9b2dbea2041'
8
+ Dummy::Application.config.secret_key_base = 'd3602686e46c4552c3da68af512580e4c99a1b0de01de0e8e5463247f1574d901036a03f71c499452492f20f85688243c21a9d5433d2027014c4c9b2dbea2041'
@@ -9,22 +9,22 @@
9
9
  # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
10
  # you'll amass, the slower it'll run and the greater likelihood for issues).
11
11
  #
12
- # It's strongly recommended to check this file into your version control system.
12
+ # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(:version => 90) do
14
+ ActiveRecord::Schema.define(version: 82) do
15
15
 
16
- create_table "activities", :force => true do |t|
17
- t.integer "user_id", :limit => 10
18
- t.string "action", :limit => 50
19
- t.integer "item_id", :limit => 10
16
+ create_table "activities", force: true do |t|
17
+ t.integer "user_id"
18
+ t.string "action", limit: 50
19
+ t.integer "item_id"
20
20
  t.string "item_type"
21
21
  t.datetime "created_at"
22
22
  end
23
23
 
24
- add_index "activities", ["created_at"], :name => "index_activities_on_created_at"
25
- add_index "activities", ["user_id"], :name => "index_activities_on_user_id"
24
+ add_index "activities", ["created_at"], name: "index_activities_on_created_at"
25
+ add_index "activities", ["user_id"], name: "index_activities_on_user_id"
26
26
 
27
- create_table "ads", :force => true do |t|
27
+ create_table "ads", force: true do |t|
28
28
  t.string "name"
29
29
  t.text "html"
30
30
  t.integer "frequency"
@@ -33,21 +33,21 @@ ActiveRecord::Schema.define(:version => 90) do
33
33
  t.datetime "start_date"
34
34
  t.datetime "end_date"
35
35
  t.string "location"
36
- t.boolean "published", :default => false
37
- t.boolean "time_constrained", :default => false
38
- t.string "audience", :default => "all"
36
+ t.boolean "published", default: false
37
+ t.boolean "time_constrained", default: false
38
+ t.string "audience", default: "all"
39
39
  end
40
40
 
41
- create_table "albums", :force => true do |t|
41
+ create_table "albums", force: true do |t|
42
42
  t.string "title"
43
43
  t.text "description"
44
44
  t.integer "user_id"
45
- t.datetime "created_at", :null => false
46
- t.datetime "updated_at", :null => false
45
+ t.datetime "created_at"
46
+ t.datetime "updated_at"
47
47
  t.integer "view_count"
48
48
  end
49
49
 
50
- create_table "assets", :force => true do |t|
50
+ create_table "assets", force: true do |t|
51
51
  t.string "asset_file_name"
52
52
  t.integer "width"
53
53
  t.integer "height"
@@ -62,7 +62,7 @@ ActiveRecord::Schema.define(:version => 90) do
62
62
  t.datetime "asset_updated_at"
63
63
  end
64
64
 
65
- create_table "authorizations", :force => true do |t|
65
+ create_table "authorizations", force: true do |t|
66
66
  t.integer "user_id"
67
67
  t.string "provider"
68
68
  t.string "uid"
@@ -72,63 +72,66 @@ ActiveRecord::Schema.define(:version => 90) do
72
72
  t.string "picture_url"
73
73
  t.string "access_token"
74
74
  t.string "access_token_secret"
75
- t.datetime "created_at", :null => false
76
- t.datetime "updated_at", :null => false
75
+ t.datetime "created_at"
76
+ t.datetime "updated_at"
77
77
  end
78
78
 
79
- create_table "categories", :force => true do |t|
79
+ create_table "categories", force: true do |t|
80
80
  t.string "name"
81
81
  t.text "tips"
82
82
  t.string "new_post_text"
83
83
  t.string "nav_text"
84
+ t.string "slug"
84
85
  end
85
86
 
86
- create_table "choices", :force => true do |t|
87
+ add_index "categories", ["slug"], name: "index_categories_on_slug", unique: true
88
+
89
+ create_table "choices", force: true do |t|
87
90
  t.integer "poll_id"
88
91
  t.string "description"
89
- t.integer "votes_count", :default => 0
92
+ t.integer "votes_count", default: 0
90
93
  end
91
94
 
92
- create_table "clippings", :force => true do |t|
95
+ create_table "clippings", force: true do |t|
93
96
  t.string "url"
94
97
  t.integer "user_id"
95
98
  t.string "image_url"
96
99
  t.string "description"
97
100
  t.datetime "created_at"
98
101
  t.datetime "updated_at"
99
- t.integer "favorited_count", :default => 0
102
+ t.integer "favorited_count", default: 0
100
103
  end
101
104
 
102
- add_index "clippings", ["created_at"], :name => "index_clippings_on_created_at"
105
+ add_index "clippings", ["created_at"], name: "index_clippings_on_created_at"
103
106
 
104
- create_table "comments", :force => true do |t|
105
- t.string "title"
107
+ create_table "comments", force: true do |t|
106
108
  t.integer "commentable_id"
107
109
  t.string "commentable_type"
108
110
  t.integer "user_id"
109
111
  t.integer "recipient_id"
110
- t.datetime "created_at", :null => false
111
- t.datetime "updated_at", :null => false
112
- t.text "comment"
112
+ t.datetime "created_at"
113
+ t.datetime "updated_at"
113
114
  t.string "author_name"
114
115
  t.string "author_email"
115
116
  t.string "author_url"
116
117
  t.string "author_ip"
117
- t.boolean "notify_by_email", :default => true
118
- t.string "role", :default => "comments"
118
+ t.boolean "notify_by_email", default: true
119
+ t.string "title", limit: 50, default: ""
120
+ t.text "comment"
121
+ t.string "role", default: "comments"
119
122
  end
120
123
 
121
- add_index "comments", ["commentable_id"], :name => "index_comments_on_commentable_id"
122
- add_index "comments", ["commentable_type"], :name => "index_comments_on_commentable_type"
123
- add_index "comments", ["created_at"], :name => "index_comments_on_created_at"
124
- add_index "comments", ["recipient_id"], :name => "index_comments_on_recipient_id"
125
- add_index "comments", ["user_id"], :name => "fk_comments_user"
124
+ add_index "comments", ["commentable_id"], name: "index_comments_on_commentable_id"
125
+ add_index "comments", ["commentable_type"], name: "index_comments_on_commentable_type"
126
+ add_index "comments", ["created_at"], name: "index_comments_on_created_at"
127
+ add_index "comments", ["recipient_id"], name: "index_comments_on_recipient_id"
128
+ add_index "comments", ["user_id"], name: "fk_comments_user"
126
129
 
127
- create_table "countries", :force => true do |t|
130
+ create_table "countries", force: true do |t|
128
131
  t.string "name"
129
132
  end
130
133
 
131
- create_table "events", :force => true do |t|
134
+ create_table "events", force: true do |t|
132
135
  t.string "name"
133
136
  t.datetime "created_at"
134
137
  t.datetime "updated_at"
@@ -138,47 +141,47 @@ ActiveRecord::Schema.define(:version => 90) do
138
141
  t.text "description"
139
142
  t.integer "metro_area_id"
140
143
  t.string "location"
141
- t.boolean "allow_rsvp", :default => true
144
+ t.boolean "allow_rsvp", default: true
142
145
  end
143
146
 
144
- create_table "favorites", :force => true do |t|
147
+ create_table "favorites", force: true do |t|
145
148
  t.datetime "updated_at"
146
149
  t.datetime "created_at"
147
150
  t.string "favoritable_type"
148
151
  t.integer "favoritable_id"
149
152
  t.integer "user_id"
150
- t.string "ip_address", :default => ""
153
+ t.string "ip_address", default: ""
151
154
  end
152
155
 
153
- add_index "favorites", ["user_id"], :name => "fk_favorites_user"
156
+ add_index "favorites", ["user_id"], name: "fk_favorites_user"
154
157
 
155
- create_table "forums", :force => true do |t|
158
+ create_table "forums", force: true do |t|
156
159
  t.string "name"
157
160
  t.string "description"
158
- t.integer "topics_count", :default => 0
159
- t.integer "sb_posts_count", :default => 0
161
+ t.integer "topics_count", default: 0
162
+ t.integer "sb_posts_count", default: 0
160
163
  t.integer "position"
161
164
  t.text "description_html"
162
165
  t.string "owner_type"
163
166
  t.integer "owner_id"
164
167
  end
165
168
 
166
- create_table "friendship_statuses", :force => true do |t|
169
+ create_table "friendship_statuses", force: true do |t|
167
170
  t.string "name"
168
171
  end
169
172
 
170
- create_table "friendships", :force => true do |t|
173
+ create_table "friendships", force: true do |t|
171
174
  t.integer "friend_id"
172
175
  t.integer "user_id"
173
- t.boolean "initiator", :default => false
176
+ t.boolean "initiator", default: false
174
177
  t.datetime "created_at"
175
178
  t.integer "friendship_status_id"
176
179
  end
177
180
 
178
- add_index "friendships", ["friendship_status_id"], :name => "index_friendships_on_friendship_status_id"
179
- add_index "friendships", ["user_id"], :name => "index_friendships_on_user_id"
181
+ add_index "friendships", ["friendship_status_id"], name: "index_friendships_on_friendship_status_id"
182
+ add_index "friendships", ["user_id"], name: "index_friendships_on_user_id"
180
183
 
181
- create_table "homepage_features", :force => true do |t|
184
+ create_table "homepage_features", force: true do |t|
182
185
  t.datetime "created_at"
183
186
  t.string "url"
184
187
  t.string "title"
@@ -194,65 +197,65 @@ ActiveRecord::Schema.define(:version => 90) do
194
197
  t.datetime "image_updated_at"
195
198
  end
196
199
 
197
- create_table "invitations", :force => true do |t|
200
+ create_table "invitations", force: true do |t|
198
201
  t.string "email_addresses"
199
202
  t.string "message"
200
203
  t.integer "user_id"
201
204
  t.datetime "created_at"
202
205
  end
203
206
 
204
- create_table "message_threads", :force => true do |t|
207
+ create_table "message_threads", force: true do |t|
205
208
  t.integer "sender_id"
206
209
  t.integer "recipient_id"
207
210
  t.integer "message_id"
208
211
  t.integer "parent_message_id"
209
- t.datetime "created_at", :null => false
210
- t.datetime "updated_at", :null => false
212
+ t.datetime "created_at"
213
+ t.datetime "updated_at"
211
214
  end
212
215
 
213
- create_table "messages", :force => true do |t|
216
+ create_table "messages", force: true do |t|
214
217
  t.integer "sender_id"
215
218
  t.integer "recipient_id"
216
- t.boolean "sender_deleted", :default => false
217
- t.boolean "recipient_deleted", :default => false
219
+ t.boolean "sender_deleted", default: false
220
+ t.boolean "recipient_deleted", default: false
218
221
  t.string "subject"
219
222
  t.text "body"
220
223
  t.datetime "read_at"
221
- t.datetime "created_at", :null => false
222
- t.datetime "updated_at", :null => false
224
+ t.datetime "created_at"
225
+ t.datetime "updated_at"
223
226
  t.integer "parent_id"
224
227
  end
225
228
 
226
- create_table "metro_areas", :force => true do |t|
229
+ create_table "metro_areas", force: true do |t|
227
230
  t.string "name"
228
231
  t.integer "state_id"
229
232
  t.integer "country_id"
230
- t.integer "users_count", :default => 0
233
+ t.integer "users_count", default: 0
231
234
  end
232
235
 
233
- create_table "moderatorships", :force => true do |t|
236
+ create_table "moderatorships", force: true do |t|
234
237
  t.integer "forum_id"
235
238
  t.integer "user_id"
236
239
  end
237
240
 
238
- add_index "moderatorships", ["forum_id"], :name => "index_moderatorships_on_forum_id"
241
+ add_index "moderatorships", ["forum_id"], name: "index_moderatorships_on_forum_id"
239
242
 
240
- create_table "monitorships", :force => true do |t|
243
+ create_table "monitorships", force: true do |t|
241
244
  t.integer "topic_id"
242
245
  t.integer "user_id"
243
- t.boolean "active", :default => true
246
+ t.boolean "active", default: true
244
247
  end
245
248
 
246
- create_table "pages", :force => true do |t|
249
+ create_table "pages", force: true do |t|
247
250
  t.string "title"
248
251
  t.text "body"
249
- t.string "published_as", :limit => 16, :default => "draft"
250
- t.boolean "page_public", :default => true
251
- t.datetime "created_at", :null => false
252
- t.datetime "updated_at", :null => false
252
+ t.string "published_as", limit: 16, default: "draft"
253
+ t.boolean "page_public", default: true
254
+ t.datetime "created_at"
255
+ t.datetime "updated_at"
253
256
  end
254
257
 
255
- create_table "photos", :force => true do |t|
258
+ create_table "photos", force: true do |t|
256
259
  t.string "name"
257
260
  t.text "description"
258
261
  t.datetime "created_at"
@@ -270,21 +273,21 @@ ActiveRecord::Schema.define(:version => 90) do
270
273
  t.datetime "photo_updated_at"
271
274
  end
272
275
 
273
- add_index "photos", ["created_at"], :name => "index_photos_on_created_at"
274
- add_index "photos", ["parent_id"], :name => "index_photos_on_parent_id"
276
+ add_index "photos", ["created_at"], name: "index_photos_on_created_at"
277
+ add_index "photos", ["parent_id"], name: "index_photos_on_parent_id"
275
278
 
276
- create_table "polls", :force => true do |t|
279
+ create_table "polls", force: true do |t|
277
280
  t.string "question"
278
281
  t.datetime "created_at"
279
282
  t.datetime "updated_at"
280
283
  t.integer "post_id"
281
- t.integer "votes_count", :default => 0
284
+ t.integer "votes_count", default: 0
282
285
  end
283
286
 
284
- add_index "polls", ["created_at"], :name => "index_polls_on_created_at"
285
- add_index "polls", ["post_id"], :name => "index_polls_on_post_id"
287
+ add_index "polls", ["created_at"], name: "index_polls_on_created_at"
288
+ add_index "polls", ["post_id"], name: "index_polls_on_post_id"
286
289
 
287
- create_table "posts", :force => true do |t|
290
+ create_table "posts", force: true do |t|
288
291
  t.datetime "created_at"
289
292
  t.datetime "updated_at"
290
293
  t.text "raw_post"
@@ -292,32 +295,32 @@ ActiveRecord::Schema.define(:version => 90) do
292
295
  t.string "title"
293
296
  t.integer "category_id"
294
297
  t.integer "user_id"
295
- t.integer "view_count", :default => 0
296
- t.integer "emailed_count", :default => 0
297
- t.integer "favorited_count", :default => 0
298
- t.string "published_as", :limit => 16, :default => "draft"
298
+ t.integer "view_count", default: 0
299
+ t.integer "emailed_count", default: 0
300
+ t.integer "favorited_count", default: 0
301
+ t.string "published_as", limit: 16, default: "draft"
299
302
  t.datetime "published_at"
300
- t.boolean "send_comment_notifications", :default => true
303
+ t.boolean "send_comment_notifications", default: true
301
304
  end
302
305
 
303
- add_index "posts", ["category_id"], :name => "index_posts_on_category_id"
304
- add_index "posts", ["published_as"], :name => "index_posts_on_published_as"
305
- add_index "posts", ["published_at"], :name => "index_posts_on_published_at"
306
- add_index "posts", ["user_id"], :name => "index_posts_on_user_id"
306
+ add_index "posts", ["category_id"], name: "index_posts_on_category_id"
307
+ add_index "posts", ["published_as"], name: "index_posts_on_published_as"
308
+ add_index "posts", ["published_at"], name: "index_posts_on_published_at"
309
+ add_index "posts", ["user_id"], name: "index_posts_on_user_id"
307
310
 
308
- create_table "roles", :force => true do |t|
311
+ create_table "roles", force: true do |t|
309
312
  t.string "name"
310
313
  end
311
314
 
312
- create_table "rsvps", :force => true do |t|
315
+ create_table "rsvps", force: true do |t|
313
316
  t.integer "user_id"
314
317
  t.integer "event_id"
315
318
  t.integer "attendees_count"
316
- t.datetime "created_at", :null => false
317
- t.datetime "updated_at", :null => false
319
+ t.datetime "created_at"
320
+ t.datetime "updated_at"
318
321
  end
319
322
 
320
- create_table "sb_posts", :force => true do |t|
323
+ create_table "sb_posts", force: true do |t|
321
324
  t.integer "user_id"
322
325
  t.integer "topic_id"
323
326
  t.text "body"
@@ -331,77 +334,65 @@ ActiveRecord::Schema.define(:version => 90) do
331
334
  t.string "author_ip"
332
335
  end
333
336
 
334
- add_index "sb_posts", ["forum_id", "created_at"], :name => "index_sb_posts_on_forum_id"
335
- add_index "sb_posts", ["user_id", "created_at"], :name => "index_sb_posts_on_user_id"
337
+ add_index "sb_posts", ["forum_id", "created_at"], name: "index_sb_posts_on_forum_id"
338
+ add_index "sb_posts", ["user_id", "created_at"], name: "index_sb_posts_on_user_id"
336
339
 
337
- create_table "sessions", :force => true do |t|
340
+ create_table "sessions", force: true do |t|
338
341
  t.string "sessid"
339
342
  t.text "data"
340
343
  t.datetime "updated_at"
341
344
  t.datetime "created_at"
342
345
  end
343
346
 
344
- add_index "sessions", ["sessid"], :name => "index_sessions_on_sessid"
345
-
346
- create_table "slugs", :force => true do |t|
347
- t.string "name"
348
- t.integer "sluggable_id"
349
- t.integer "sequence", :default => 1, :null => false
350
- t.string "sluggable_type", :limit => 40
351
- t.string "scope"
352
- t.datetime "created_at"
353
- end
354
-
355
- add_index "slugs", ["name", "sluggable_type", "sequence", "scope"], :name => "index_slugs_on_n_s_s_and_s", :unique => true
356
- add_index "slugs", ["sluggable_id"], :name => "index_slugs_on_sluggable_id"
347
+ add_index "sessions", ["sessid"], name: "index_sessions_on_sessid"
357
348
 
358
- create_table "states", :force => true do |t|
349
+ create_table "states", force: true do |t|
359
350
  t.string "name"
360
351
  end
361
352
 
362
- create_table "taggings", :force => true do |t|
353
+ create_table "taggings", force: true do |t|
363
354
  t.integer "tag_id"
364
355
  t.integer "taggable_id"
365
356
  t.string "taggable_type"
366
357
  t.integer "tagger_id"
367
358
  t.string "tagger_type"
368
- t.string "context", :limit => 128
359
+ t.string "context", limit: 128
369
360
  t.datetime "created_at"
370
361
  end
371
362
 
372
- add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id"
373
- add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context"
374
- add_index "taggings", ["taggable_id", "taggable_type"], :name => "index_taggings_on_taggable_id_and_taggable_type"
375
- add_index "taggings", ["taggable_id"], :name => "index_taggings_on_taggable_id"
376
- add_index "taggings", ["taggable_type"], :name => "index_taggings_on_taggable_type"
363
+ add_index "taggings", ["tag_id"], name: "index_taggings_on_tag_id"
364
+ add_index "taggings", ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context"
365
+ add_index "taggings", ["taggable_id", "taggable_type"], name: "index_taggings_on_taggable_id_and_taggable_type"
366
+ add_index "taggings", ["taggable_id"], name: "index_taggings_on_taggable_id"
367
+ add_index "taggings", ["taggable_type"], name: "index_taggings_on_taggable_type"
377
368
 
378
- create_table "tags", :force => true do |t|
369
+ create_table "tags", force: true do |t|
379
370
  t.string "name"
380
- t.integer "taggings_count", :default => 0
371
+ t.integer "taggings_count", default: 0
381
372
  end
382
373
 
383
- add_index "tags", ["name"], :name => "index_tags_on_name"
374
+ add_index "tags", ["name"], name: "index_tags_on_name"
384
375
 
385
- create_table "topics", :force => true do |t|
376
+ create_table "topics", force: true do |t|
386
377
  t.integer "forum_id"
387
378
  t.integer "user_id"
388
379
  t.string "title"
389
380
  t.datetime "created_at"
390
381
  t.datetime "updated_at"
391
- t.integer "hits", :default => 0
392
- t.integer "sticky", :default => 0
393
- t.integer "sb_posts_count", :default => 0
382
+ t.integer "hits", default: 0
383
+ t.integer "sticky", default: 0
384
+ t.integer "sb_posts_count", default: 0
394
385
  t.datetime "replied_at"
395
- t.boolean "locked", :default => false
386
+ t.boolean "locked", default: false
396
387
  t.integer "replied_by"
397
388
  t.integer "last_post_id"
398
389
  end
399
390
 
400
- add_index "topics", ["forum_id", "replied_at"], :name => "index_topics_on_forum_id_and_replied_at"
401
- add_index "topics", ["forum_id", "sticky", "replied_at"], :name => "index_topics_on_sticky_and_replied_at"
402
- add_index "topics", ["forum_id"], :name => "index_topics_on_forum_id"
391
+ add_index "topics", ["forum_id", "replied_at"], name: "index_topics_on_forum_id_and_replied_at"
392
+ add_index "topics", ["forum_id", "sticky", "replied_at"], name: "index_topics_on_sticky_and_replied_at"
393
+ add_index "topics", ["forum_id"], name: "index_topics_on_forum_id"
403
394
 
404
- create_table "users", :force => true do |t|
395
+ create_table "users", force: true do |t|
405
396
  t.string "login"
406
397
  t.string "email"
407
398
  t.text "description"
@@ -412,48 +403,48 @@ ActiveRecord::Schema.define(:version => 90) do
412
403
  t.datetime "updated_at"
413
404
  t.string "persistence_token"
414
405
  t.text "stylesheet"
415
- t.integer "view_count", :default => 0
416
- t.boolean "vendor", :default => false
417
- t.string "activation_code", :limit => 40
406
+ t.integer "view_count", default: 0
407
+ t.boolean "vendor", default: false
408
+ t.string "activation_code", limit: 40
418
409
  t.datetime "activated_at"
419
410
  t.integer "state_id"
420
411
  t.integer "metro_area_id"
421
412
  t.string "login_slug"
422
- t.boolean "notify_comments", :default => true
423
- t.boolean "notify_friend_requests", :default => true
424
- t.boolean "notify_community_news", :default => true
413
+ t.boolean "notify_comments", default: true
414
+ t.boolean "notify_friend_requests", default: true
415
+ t.boolean "notify_community_news", default: true
425
416
  t.integer "country_id"
426
- t.boolean "featured_writer", :default => false
417
+ t.boolean "featured_writer", default: false
427
418
  t.datetime "last_login_at"
428
419
  t.string "zip"
429
420
  t.date "birthday"
430
421
  t.string "gender"
431
- t.boolean "profile_public", :default => true
432
- t.integer "activities_count", :default => 0
433
- t.integer "sb_posts_count", :default => 0
422
+ t.boolean "profile_public", default: true
423
+ t.integer "activities_count", default: 0
424
+ t.integer "sb_posts_count", default: 0
434
425
  t.datetime "sb_last_seen_at"
435
426
  t.integer "role_id"
436
427
  t.string "single_access_token"
437
428
  t.string "perishable_token"
438
- t.integer "login_count", :default => 0
439
- t.integer "failed_login_count", :default => 0
429
+ t.integer "login_count", default: 0
430
+ t.integer "failed_login_count", default: 0
440
431
  t.datetime "last_request_at"
441
432
  t.datetime "current_login_at"
442
433
  t.string "current_login_ip"
443
434
  t.string "last_login_ip"
444
435
  end
445
436
 
446
- add_index "users", ["activated_at"], :name => "index_users_on_activated_at"
447
- add_index "users", ["avatar_id"], :name => "index_users_on_avatar_id"
448
- add_index "users", ["created_at"], :name => "index_users_on_created_at"
449
- add_index "users", ["featured_writer"], :name => "index_users_on_featured_writer"
450
- add_index "users", ["last_request_at"], :name => "index_users_on_last_request_at"
451
- add_index "users", ["login"], :name => "index_users_on_login"
452
- add_index "users", ["login_slug"], :name => "index_users_on_login_slug"
453
- add_index "users", ["persistence_token"], :name => "index_users_on_persistence_token"
454
- add_index "users", ["vendor"], :name => "index_users_on_vendor"
437
+ add_index "users", ["activated_at"], name: "index_users_on_activated_at"
438
+ add_index "users", ["avatar_id"], name: "index_users_on_avatar_id"
439
+ add_index "users", ["created_at"], name: "index_users_on_created_at"
440
+ add_index "users", ["featured_writer"], name: "index_users_on_featured_writer"
441
+ add_index "users", ["last_request_at"], name: "index_users_on_last_request_at"
442
+ add_index "users", ["login"], name: "index_users_on_login"
443
+ add_index "users", ["login_slug"], name: "index_users_on_login_slug"
444
+ add_index "users", ["persistence_token"], name: "index_users_on_persistence_token"
445
+ add_index "users", ["vendor"], name: "index_users_on_vendor"
455
446
 
456
- create_table "votes", :force => true do |t|
447
+ create_table "votes", force: true do |t|
457
448
  t.integer "user_id"
458
449
  t.integer "poll_id"
459
450
  t.integer "choice_id"