commontator 4.11.0 → 4.11.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (200) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -5
  3. data/config/initializers/commontator.rb +3 -4
  4. data/lib/commontator/version.rb +1 -1
  5. data/lib/tasks/commontator_tasks.rake +5 -5
  6. data/spec/dummy/db/test.sqlite3 +0 -0
  7. data/spec/dummy/log/test.log +1825 -117831
  8. metadata +49 -407
  9. data/app/assets/javascripts/commontator/application.js~ +0 -3
  10. data/app/assets/javascripts/commontator/mentions.js~ +0 -31
  11. data/app/assets/stylesheets/commontator/application.css~ +0 -14
  12. data/app/assets/stylesheets/commontator/threads.css~ +0 -71
  13. data/app/controllers/commontator/comments_controller.rb~ +0 -160
  14. data/app/controllers/commontator/threads_controller.rb~ +0 -75
  15. data/app/mailers/commontator/subscriptions_mailer.rb~ +0 -65
  16. data/app/models/commontator/comment.rb~ +0 -124
  17. data/app/models/commontator/subscription.rb~ +0 -23
  18. data/app/views/commontator/shared/_thread.html.erb~ +0 -21
  19. data/app/views/commontator/subscriptions_mailer/comment_created.html.erb~ +0 -10
  20. data/app/views/commontator/threads/_hide_show.js.erb~ +0 -21
  21. data/app/views/commontator/threads/_hide_show_links.js.erb~ +0 -17
  22. data/app/views/commontator/threads/_show.html.erb~ +0 -118
  23. data/app/views/commontator/threads/_show.js.erb~ +0 -18
  24. data/config/initializers/commontator.rb~ +0 -290
  25. data/config/locales/en.yml~ +0 -101
  26. data/config/locales/ru.yml~ +0 -79
  27. data/config/locales/zh.yml~ +0 -79
  28. data/config/routes.rb~ +0 -25
  29. data/db/migrate/0_install_commontator.rb~ +0 -52
  30. data/db/migrate/1_add_parent_comment_id_to_commontator_comments.rb~ +0 -9
  31. data/lib/commontator.rb~ +0 -145
  32. data/lib/commontator/shared_helper.rb~ +0 -26
  33. data/lib/commontator/version.rb~ +0 -3
  34. data/spec/controllers/commontator/comments_controller_spec.rb~ +0 -612
  35. data/spec/controllers/commontator/subscriptions_controller_spec.rb~ +0 -101
  36. data/spec/controllers/commontator/threads_controller_spec.rb~ +0 -218
  37. data/spec/dummy/README.md~ +0 -3
  38. data/spec/dummy/Rakefile~ +0 -6
  39. data/spec/dummy/app/assets/javascripts/application.js~ +0 -16
  40. data/spec/dummy/app/assets/stylesheets/application.css~ +0 -14
  41. data/spec/dummy/app/controllers/application_controller.rb~ +0 -4
  42. data/spec/dummy/app/controllers/dummy_models_controller.rb~ +0 -23
  43. data/spec/dummy/app/helpers/application_helper.rb~ +0 -15
  44. data/spec/dummy/app/models/dummy_model.rb~ +0 -3
  45. data/spec/dummy/app/models/dummy_user.rb~ +0 -13
  46. data/spec/dummy/app/views/dummy_models/index.html.erb~ +0 -6
  47. data/spec/dummy/app/views/dummy_models/show.html.erb~ +0 -2
  48. data/spec/dummy/app/views/layouts/application.html.erb~ +0 -14
  49. data/spec/dummy/config.ru~ +0 -4
  50. data/spec/dummy/config/application.rb~ +0 -26
  51. data/spec/dummy/config/boot.rb~ +0 -5
  52. data/spec/dummy/config/database.yml~ +0 -25
  53. data/spec/dummy/config/environment.rb~ +0 -8
  54. data/spec/dummy/config/environments/development.rb~ +0 -31
  55. data/spec/dummy/config/environments/production.rb~ +0 -82
  56. data/spec/dummy/config/environments/test.rb~ +0 -40
  57. data/spec/dummy/config/initializers/backtrace_silencers.rb~ +0 -7
  58. data/spec/dummy/config/initializers/commontator.rb~ +0 -21
  59. data/spec/dummy/config/initializers/filter_parameter_logging.rb~ +0 -4
  60. data/spec/dummy/config/initializers/inflections.rb~ +0 -16
  61. data/spec/dummy/config/initializers/mime_types.rb~ +0 -5
  62. data/spec/dummy/config/initializers/secret_token.rb~ +0 -12
  63. data/spec/dummy/config/initializers/session_store.rb~ +0 -3
  64. data/spec/dummy/config/initializers/wrap_parameters.rb~ +0 -14
  65. data/spec/dummy/config/routes.rb~ +0 -10
  66. data/spec/dummy/db/development.sqlite3 +0 -0
  67. data/spec/dummy/db/migrate/1_create_dummy_models.rb~ +0 -7
  68. data/spec/dummy/db/migrate/2_create_dummy_users.rb~ +0 -7
  69. data/spec/dummy/db/migrate/3_acts_as_votable_migration.rb~ +0 -27
  70. data/spec/dummy/lib/controllers.rb~ +0 -10
  71. data/spec/dummy/log/development.log +0 -5969
  72. data/spec/dummy/public/404.html~ +0 -26
  73. data/spec/dummy/public/422.html~ +0 -26
  74. data/spec/dummy/public/500.html~ +0 -25
  75. data/spec/dummy/script/rails~ +0 -6
  76. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/-RolHYhJdGiLoPkoWZXQdI9AIWUjMMCa2yFJezCE_Bo.cache +0 -2
  77. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/-STzK7UuGeY3gSvnmTELWLvtRMKpmSAQCEw4ao3b1r8.cache +0 -1
  78. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/3NH8nN7uktAXgA3NqaqXTXDVic3BxBvqCxoLpGGbib4.cache +0 -0
  79. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/4_iT7KM6P2IT75Rssrk9p4crTBwM8DQWR41gmsxczL0.cache +0 -0
  80. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/58TLCXvf5bFFYY-mIUXrQNOVWlGsq7qPAoSX2OIIB8Y.cache +0 -0
  81. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/6OQdyrATvNatvWu8Mp1qbuvRx-HLmzCZ5XBGYca-rZU.cache +0 -0
  82. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/6UKCUV-ZLaWCoPMfMB6a2W0RCFPQzPJ6Mz-y67sH7zk.cache +0 -2
  83. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/6wKNjFdNd4OHjIpLC0nq1kBWcbYg1aEYrp7ZhWoJlvY.cache +0 -1
  84. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/7Xxb5iYP5elo40JRlhNQB1gLbv3ueELK2rTinYt5xdc.cache +0 -1
  85. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/7twIKlS6VYCyLlwhsQg2vu4wLSUJsT2REHR4DjZf1oE.cache +0 -2
  86. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/87m-4EcbQnkbo2HYkQp4V9I2U3AYQO1mPeReieduolA.cache +0 -1
  87. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/8B331vt8qC4iXTcVzkx3j-ET8i1oaQskj5LyqGq8mPQ.cache +0 -0
  88. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/8KWvIOgvo7BVJYtdTpFuiSQQFFwZhLWYtwacZv52y48.cache +0 -0
  89. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/9yQa5M2ObK2-qDu231zMoarjVbhKUUg-ND3r2iXqB_Q.cache +0 -0
  90. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/A-ffuUI2juZT6qFpTUwUR1P8OPWcyFFN26WSUZe60Ko.cache +0 -1
  91. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/BbO4diS6uacx69Hn_bCabYlXEbWWdjHShRlfzlWSOMI.cache +0 -0
  92. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/CXhqxaQQAQ8b0Y8y0jTQyiqsZ6Oe4fZn0YiacpJ9IoI.cache +0 -1
  93. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/E1zaNOh68xzPxdtdOwRtOaMCoKivN2dxVwCP65WEi5I.cache +0 -2
  94. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/EmPkV3H8p2Snv9WyPjWran_kOMQ0MqQ1a9CVdGDd8l4.cache +0 -1
  95. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/Hc12Nxe7cw2e0u2pzNsAe8D3ncQpcqLuI2NVL7aAXgw.cache +0 -1
  96. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/HdWuQr9W2mZvggsAxVjDgLYUNfg3rbI-T8KhaDIsvQk.cache +0 -0
  97. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/I7lsrHTKpbfLWqIqdDIx2RN_12yFL2PyLRyYsMxg1IU.cache +0 -1
  98. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/JOCzfBjMjX3D5BUUGh5lJ7fjzMuJrHLxAginRA2_hZQ.cache +0 -0
  99. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/JusxTSXt06IqBm9jeCMM2nTmM3Wvbl3i3L1IwEvW5YA.cache +0 -2
  100. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/KAY1_IaTONtGr0KK8ihOdoA-RDXybqBMNSZLIDRHx68.cache +0 -1
  101. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/KBHIDNfa4ryw9LAkYqK8GgPWne7HkX6mNYgrJajGm94.cache +0 -1
  102. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/L_lv02y00MmIFiFhg5c9zhl7CDHLSahehzLyi_mRZeY.cache +0 -0
  103. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/MOT2X4iikR8v89A4N1bxDTeS1-xV8c9036TNFXmwXCM.cache +0 -1
  104. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/MiX2Z4Vbha1riozZWw1U3_PGttRiZ1iQ_o4wSZJnKCs.cache +0 -3
  105. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/MntKfwol0ud4LuvrX3MVPthTlfNlJZRYbQXpQBxhRrs.cache +0 -1
  106. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/MrqmgPGNYJV1capJKIKJOVEQ4NiO-Z_2YhpjNteJ8B8.cache +0 -2
  107. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/NVMnAwylzGp5bjl_o9dwMAQxVAPDzc4ygddNQSD1fiw.cache +0 -0
  108. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/O2sKqGxNuCYhjzuEZVC9hX_FeemOfRn_1-CCuHBQYyg.cache +0 -1
  109. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/Qy3TykLFmAt5jhSluMTaZaefcA5c_vfBRhQ7tin-gsk.cache +0 -0
  110. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/R3DpUgZ_hja1dQTIzumiP9AD_r8mlOaqv0U9QqnGQqo.cache +0 -0
  111. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/RF07mgb06A30OcDWtCaDlM5tEc1yp0uAsk986Gqs5w8.cache +0 -1
  112. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/S-6Iq5YOEpVnd_vQ0RSSfrmyIwB1dk0op35alFgJ9xA.cache +0 -2
  113. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/TKV8dUTo88gdFY-z2I7Xa5vDC1Z3LY6Paa18385MJsI.cache +0 -1
  114. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/UI4zPmWfZA2d_5ZZIXqK9KmkjOKSDg6JoM7qcOIxm0Q.cache +0 -1
  115. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/UP29vrIQbCkfghZGSCFxpW5gjlsgCxlVrncjjopvRqM.cache +0 -2
  116. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/UoU16f4V7haEXM5GY5j4QFuNMP7PJZaAMEvVNNtNLBA.cache +0 -1
  117. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/VqPqYNG07yqcjbd7FA05Mu-jr5hzsZPaHFf8X0FFbXk.cache +0 -2
  118. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/WkN1QFvcuzXSsyNmfaK02ojXPk-8zmdEegzNPfdAEL4.cache +0 -0
  119. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/WkQX7Wiz41OKx2aGF7uffOmS04hIVZeGCondBAvwum8.cache +0 -2
  120. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/XMeYF1vwAg53eVjXVkw_IKQH2W3-9tWvtuCdqUCbPBM.cache +0 -2
  121. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/XX0Z7OM0xZKfQaAvHARpyeQNZCstNyu9MlsnwThSkg8.cache +0 -1
  122. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/Y-pGNFTA6bAKxSvqZvmMVs3b4Els1aByxZVFxtJR71c.cache +0 -1
  123. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/Y3p3m5V5NOm7yq56apKmF5KZUUsTfnhT_SG3fqbEJgo.cache +0 -1
  124. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/YLZuRWklL6q-csC-7A7CiOTTTYEQcA9PCdWEOm9MpNU.cache +0 -1
  125. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/Yo7V5YXukEBm6z37l-TIRCJx3HZExEUBu3MUMhAzkMU.cache +0 -1
  126. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/bK6QttR8pGmMAMJO0avCBLwH0za8_bAC-yWqkU3Yj24.cache +0 -1
  127. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/cLncjrqpQXzsVBp7K0W7iG1STLrnzfGpbJXxNE7aIUk.cache +0 -2
  128. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/dBcAd64EZFdhHZNXKGXPIR7EtPGf03bzqkci2W12T8g.cache +0 -2
  129. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/d_bbPiareJHKkzFZFCl3pcwfQOFzsB1KHn4A2xxhR20.cache +0 -1
  130. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/eaHZBuJRcawVlkGZVyyRr5_4xYKVOXbCqnTcmaNXzL0.cache +0 -0
  131. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gWnmfJty3jBn53qsJfOXKrWv4e8i3Dp80wVel-f1L1E.cache +0 -1
  132. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gumo32Bd3W_q7MYEt9JIZEiQdHF93tLSsGfmXIm2MqU.cache +0 -1
  133. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/jKTlG9KP0iaCGHwg8kQ1amz9SHJ1OAWeCRRn9wc5w7c.cache +0 -1
  134. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/kPJfTiWbmX-q6i2rjM9MAMdEf2silSihU0_lxlTGVA8.cache +0 -1
  135. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/lrt1SWPj4qWUZUMH9xg3n9KLYUqJZxRn-XI-NTU6oTI.cache +0 -1
  136. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/mcCP5u08nlCL6TgWdzzrem9uE2rbsbG3KyIXxvWvlJE.cache +0 -3
  137. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/pC4exGjkQLXXPE0O9hjX_2AJ4DASTFeB6RGjXagxEac.cache +0 -0
  138. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/pIRh_Lq-ZhYC_XdRcqIsCtUkTnwVET0Wrrpw1EltHd8.cache +0 -2
  139. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/qfXc71sDbi1cE9f327D6ABPURPU6lLguGiJqH2fqM0w.cache +0 -1
  140. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/rBcrkzXcMaiCjwvWl8tO0eARzKZS69I3i-lfsTAFzcc.cache +0 -1
  141. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/sfl8l1_1AGn-4llkmb91Q0wHJ-A-x5gAGkIUWe1zLqo.cache +0 -1
  142. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/tFQc0MOeWpJ7t7cNP2GOzo7o9Z6YBgLEpdS0tGLvUSw.cache +0 -0
  143. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/tb9v5OemP-ADEwYnETLLi1r088kZm_TMb9ZVeTV5JxI.cache +0 -1
  144. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/uKmWfbgaNZ8FTsVK1VNuUv15rmtTHzSdJ7TQRGr0Rck.cache +0 -2
  145. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/ul0QEoovfr_12YOpyWx8BJs8fvz5Ay3AZG8-lsLr-a4.cache +0 -1
  146. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/vY6eUgBIXKHqfU2ZroS-GugKPg5_fo2QBs-vS5gBN2o.cache +0 -0
  147. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/vrRc4DPAbHIJHJqsXfBYdyKUPFv8f8YYKJUrk-1zdVw.cache +0 -0
  148. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/wTET4PQq7wlxzrgvNivPJad-CACkoQS4BNxAP0FQaR4.cache +0 -0
  149. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/wcvE87iLx7cDjMDs_Yu1jKYvep-VyLEyj1eXL79KLp4.cache +0 -0
  150. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/xQeZ92qbm2t9FaRck5xUakvNP-MJ2cs0RroN-fm0Tf8.cache +0 -1
  151. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/xQz9WPf67Mu5uV4rNuOfU-y6_KWSlWcnTWrTvQPonKM.cache +0 -0
  152. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/xhYTRUOS8cIvyRp2Jn6FKnXlGOSsIM2z3HAGOJoJs7w.cache +0 -1
  153. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/yLxMFI0ARh2OKSOQLF2xEfM7sbst2vUbOBXoOuI6iTE.cache +0 -1
  154. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/ynnYZxuxqerlFUytw54dl_CwP94g0U4HmGjyILWnhfQ.cache +0 -1
  155. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/zCivVPbSRpKF_X-P5OJeld32YhymG-bkjQwzqe2o6zg.cache +0 -2
  156. data/spec/dummy/tmp/cache/assets/test/sprockets/02d4b791eb831cf2057bf4703a1218d1 +0 -0
  157. data/spec/dummy/tmp/cache/assets/test/sprockets/0f196a1a50363b0a076ec6e1ee5417f6 +0 -0
  158. data/spec/dummy/tmp/cache/assets/test/sprockets/a3fb9025f90ff05a6fd4afc7ded2692c +0 -0
  159. data/spec/dummy/tmp/cache/assets/test/sprockets/a41c8be5379abec3c0d0d98e2f0d5609 +0 -0
  160. data/spec/dummy/tmp/cache/assets/test/sprockets/c69ee3cc5796188d873574179290a6ef +0 -0
  161. data/spec/dummy/tmp/cache/assets/test/sprockets/e1f674c11941d62aac1764ef3a7134e4 +0 -0
  162. data/spec/dummy/tmp/cache/assets/test/sprockets/e85565206c3e5fdf9dfeb367c85557b1 +0 -0
  163. data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/-gXoYfEJ-e9QQUbNRpNa-pwMCnTc7Eqvkq6Bosde6W8.cache +0 -0
  164. data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/6iNAIrMKxHltOChiHQQf9VNsLQuj2rVKz6oqWnK7aSM.cache +0 -1
  165. data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/E1zaNOh68xzPxdtdOwRtOaMCoKivN2dxVwCP65WEi5I.cache +0 -2
  166. data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/HsNbq1o4RbrEWNL4zXVqFfUVnXXLK_y0F0BvddDre6g.cache +0 -0
  167. data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/JusxTSXt06IqBm9jeCMM2nTmM3Wvbl3i3L1IwEvW5YA.cache +0 -2
  168. data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/L5DjABL_iOtoxSOLn3X7_YlxECU5EhnrVIKxJFAysgc.cache +0 -1
  169. data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/PNc9TJUmRdGTSwgZvGlxKaIiJIkyoWtTPiGGWBqpHAE.cache +0 -0
  170. data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/QkgTHa6nNs7XP6RPoV3yBbWWV-uo1u2-qxLuvLCFe_0.cache +0 -0
  171. data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/S-6Iq5YOEpVnd_vQ0RSSfrmyIwB1dk0op35alFgJ9xA.cache +0 -2
  172. data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/Vuc93A9yywiFxc9CAdxrzdsAQw4jxiCa6JRzRjNxOYs.cache +0 -1
  173. data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/YAPBll4U0cgs6cz-WyMRKoakK_gVOOcl9n0CvGyxPjY.cache +0 -1
  174. data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/bDNeZfPBQaef5z0YajZc4jFE54nNy9gc06mPNKvvPFk.cache +0 -1
  175. data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/c5Wa2loowFYFRBaMoTn1IWYXo4BGMbEy7NIi0vbvfRU.cache +0 -1
  176. data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/dkn8MYu2ve_AJW6u0jjTlKrj1KBRqorOHQR0Obx2elU.cache +0 -0
  177. data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/fZuAzt_-48u9C7ZXmsPgTraGDYtNC9B9zN-9-EnxJG4.cache +0 -1
  178. data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/gumo32Bd3W_q7MYEt9JIZEiQdHF93tLSsGfmXIm2MqU.cache +0 -1
  179. data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/ige85jXyj8X7XYr7HpA0gSTThqfPUm71HjhSJXtTbUY.cache +0 -1
  180. data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/kuYeE5bV6FdXmfB_o-xhflhSDWoQhYYaaupAXODZ9dQ.cache +0 -1
  181. data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/qhZbbNIRUaAOtGano94zLHjeBKUhKr4qbh2tTCi0Bnk.cache +0 -2
  182. data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/wJJbzdHJHP6tchng3HhfTwmjc5LursgX8yZkAjpO5UA.cache +0 -0
  183. data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/xNL1WW-qU3EvV2iTSW6F4hAFRBsCYmFKJhLjgCZkOV8.cache +0 -2
  184. data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/ytHkF2DwUE6oaiLyrK6tL-0INpeNhjN6ctD7J0LNY6I.cache +0 -2
  185. data/spec/helpers/commontator/application_helper_spec.rb~ +0 -9
  186. data/spec/lib/commontator/acts_as_commontable_spec.rb~ +0 -25
  187. data/spec/lib/commontator/acts_as_commontator_spec.rb~ +0 -52
  188. data/spec/lib/commontator/commontable_config_spec.rb~ +0 -29
  189. data/spec/lib/commontator/commontator_config_spec.rb~ +0 -29
  190. data/spec/lib/commontator/controller_includes_spec.rb~ +0 -18
  191. data/spec/lib/commontator/controllers_spec.rb~ +0 -18
  192. data/spec/lib/commontator/shared_helper_spec.rb~ +0 -22
  193. data/spec/lib/commontator_spec.rb~ +0 -26
  194. data/spec/mailers/commontator/subscriptions_mailer_spec.rb~ +0 -30
  195. data/spec/models/commontator/comment_spec.rb~ +0 -82
  196. data/spec/models/commontator/subscription_spec.rb~ +0 -38
  197. data/spec/models/commontator/thread_spec.rb~ +0 -122
  198. data/spec/rails_helper.rb~ +0 -74
  199. data/spec/spec_helper.rb~ +0 -93
  200. data/vendor/assets/javascripts/mentionsInput/index.js~ +0 -3
@@ -1,3 +0,0 @@
1
- //= require underscore/underscore
2
- //= require jquery.mentionsInput
3
- //= require commontator/mentions
@@ -1,31 +0,0 @@
1
- window.Commontator = {};
2
- Commontator._ = window._.noConflict();
3
- Commontator.initMentions = function() {
4
- $('.comment_form_field textarea:not(.mentions-added)').each(function(_index, textarea){
5
- $textarea = $(textarea);
6
- $form = $textarea.parents('form');
7
- threadId = $textarea.parents('.thread').attr('id').match(/[\d]+/)[0];
8
- $textarea.addClass('mentions-added');
9
- currentValue = $textarea.val();
10
- $textarea.mentionsInput({
11
- elastic: false,
12
- showAvatars: false,
13
- allowRepeat: true,
14
- onDataRequest:function (mode, query, callback) {
15
- $.getJSON('commontator/threads/'+threadId+'/mentions.json', {q: query}, function(responseData) {
16
- callback.call(this, responseData.mentions);
17
- });
18
- }
19
- });
20
- $textarea.val(currentValue);
21
- $textarea.on('focusout', function(){
22
- $textarea.mentionsInput('getMentions', function(mentions){
23
- $form.find('input[name="mentioned_ids[]"]').remove();
24
- $(mentions).each(function(_index, mention){
25
- $input = $('<input>', { type: 'hidden', name: 'mentioned_ids[]', value: mention.id });
26
- $form.append($input)
27
- });
28
- });
29
- });
30
- });
31
- };
@@ -1,14 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the top of the
9
- * compiled file, but it's generally better to create a new file per style scope.
10
- *
11
- *= require_self
12
- *= require mentionsInput/jquery.mentionsInput
13
- *= require_tree .
14
- */
@@ -1,71 +0,0 @@
1
- .thread {
2
- display: block !important;
3
- }
4
-
5
- .thread .commontator_hidden {
6
- display: none;
7
- }
8
-
9
- .thread_actions {
10
- float: right;
11
- }
12
-
13
- .thread_header {
14
- font-size: 16px;
15
- font-weight: bold;
16
- font-style: normal;
17
- margin-top: 5px;
18
- margin-bottom: 5px;
19
- display: block;
20
- }
21
-
22
- /* Modified from:
23
- http://www.strangerstudios.com/sandbox/pagination/diggstyle.php */
24
- .thread_page_entries_info {
25
- margin-top: 10px;
26
- margin-bottom: 10px;
27
- }
28
-
29
- .thread_will_paginate {
30
- margin-top: 10px;
31
- margin-bottom: 10px;
32
- }
33
-
34
- .thread_pagination a {
35
- padding: 2px 5px 2px 5px;
36
- margin-right: 4px;
37
- border: 1px solid #999;
38
-
39
- text-decoration: none;
40
- color: #666;
41
- }
42
-
43
- .thread_pagination a:hover,
44
- .thread_pagination a:active {
45
- border: 1px solid #555;
46
-
47
- color: #000;
48
- }
49
-
50
- .thread_pagination em {
51
- padding: 2px 5px 2px 5px;
52
- margin-right: 4px;
53
- border: 1px solid #555;
54
-
55
- font-weight: bold;
56
- background-color: #555;
57
- color: #FFF;
58
- }
59
-
60
- .thread_pagination span {
61
- padding: 2px 5px 2px 5px;
62
- margin-right: 4px;
63
- border: 1px solid #EEE;
64
-
65
- color: #DDD;
66
- }
67
-
68
- .thread .mentions-input-box .mentions {
69
- left: -2px !important;
70
- top: -2px !important;
71
- }
@@ -1,160 +0,0 @@
1
- module Commontator
2
- class CommentsController < Commontator::ApplicationController
3
- before_filter :set_thread, :only => [:new, :create]
4
- before_filter :set_comment_and_thread, :except => [:new, :create]
5
-
6
- # GET /threads/1/comments/new
7
- def new
8
- @comment = Comment.new
9
- @comment.thread = @thread
10
- @comment.creator = @user
11
- security_transgression_unless @comment.can_be_created_by?(@user)
12
-
13
- @per_page = params[:per_page] || @thread.config.comments_per_page
14
-
15
- respond_to do |format|
16
- format.html { redirect_to @thread }
17
- format.js
18
- end
19
-
20
- end
21
-
22
- # POST /threads/1/comments
23
- def create
24
- @comment = Comment.new
25
- @comment.thread = @thread
26
- @comment.creator = @user
27
- @comment.body = params[:comment].nil? ? nil : params[:comment][:body]
28
- security_transgression_unless @comment.can_be_created_by?(@user)
29
- subscribe_mentioned if Commontator.mentions_enabled
30
-
31
- respond_to do |format|
32
- if !params[:cancel].nil?
33
- format.html { redirect_to @thread }
34
- format.js { render :cancel }
35
- elsif @comment.save
36
- sub = @thread.config.thread_subscription.to_sym
37
- @thread.subscribe(@user) if sub == :a || sub == :b
38
- Subscription.comment_created(@comment)
39
-
40
- @per_page = params[:per_page] || @thread.config.comments_per_page
41
-
42
- format.html { redirect_to @thread }
43
- format.js
44
- else
45
- format.html { redirect_to @thread }
46
- format.js { render :new }
47
- end
48
- end
49
- end
50
-
51
- # GET /comments/1/edit
52
- def edit
53
- security_transgression_unless @comment.can_be_edited_by?(@user)
54
-
55
- respond_to do |format|
56
- format.html { redirect_to @thread }
57
- format.js
58
- end
59
- end
60
-
61
- # PUT /comments/1
62
- def update
63
- security_transgression_unless @comment.can_be_edited_by?(@user)
64
- @comment.body = params[:comment].nil? ? nil : params[:comment][:body]
65
- @comment.editor = @user
66
- subscribe_mentioned if Commontator.mentions_enabled
67
-
68
- respond_to do |format|
69
- if !params[:cancel].nil?
70
- format.html { redirect_to @thread }
71
- format.js { render :cancel }
72
- elsif @comment.save
73
- format.html { redirect_to @thread }
74
- format.js
75
- else
76
- format.html { redirect_to @thread }
77
- format.js { render :edit }
78
- end
79
- end
80
- end
81
-
82
- # PUT /comments/1/delete
83
- def delete
84
- security_transgression_unless @comment.can_be_deleted_by?(@user)
85
-
86
- @comment.errors.add(:base, t('commontator.comment.errors.already_deleted')) \
87
- unless @comment.delete_by(@user)
88
-
89
- respond_to do |format|
90
- format.html { redirect_to @thread }
91
- format.js { render :delete }
92
- end
93
- end
94
-
95
- # PUT /comments/1/undelete
96
- def undelete
97
- security_transgression_unless @comment.can_be_deleted_by?(@user)
98
-
99
- @comment.errors.add(:base, t('commontator.comment.errors.not_deleted')) \
100
- unless @comment.undelete_by(@user)
101
-
102
- respond_to do |format|
103
- format.html { redirect_to @thread }
104
- format.js { render :delete }
105
- end
106
- end
107
-
108
- # PUT /comments/1/upvote
109
- def upvote
110
- security_transgression_unless @comment.can_be_voted_on_by?(@user)
111
-
112
- @comment.upvote_from @user
113
-
114
- respond_to do |format|
115
- format.html { redirect_to @thread }
116
- format.js { render :vote }
117
- end
118
- end
119
-
120
- # PUT /comments/1/downvote
121
- def downvote
122
- security_transgression_unless @comment.can_be_voted_on_by?(@user) &&\
123
- @comment.thread.config.comment_voting.to_sym == :ld
124
-
125
- @comment.downvote_from @user
126
-
127
- respond_to do |format|
128
- format.html { redirect_to @thread }
129
- format.js { render :vote }
130
- end
131
- end
132
-
133
- # PUT /comments/1/unvote
134
- def unvote
135
- security_transgression_unless @comment.can_be_voted_on_by?(@user)
136
-
137
- @comment.unvote :voter => @user
138
-
139
- respond_to do |format|
140
- format.html { redirect_to @thread }
141
- format.js { render :vote }
142
- end
143
- end
144
-
145
- protected
146
-
147
- def set_comment_and_thread
148
- @comment = Comment.find(params[:id])
149
- @thread = @comment.thread
150
- commontator_set_new_comment(@thread, @user)
151
- end
152
-
153
- def subscribe_mentioned
154
- debugger
155
- Commontator.commontator_mentions(@user, '').where(id: params[:mentioned_ids]).each do |user|
156
- @thread.subscribe(user)
157
- end
158
- end
159
- end
160
- end
@@ -1,75 +0,0 @@
1
- module Commontator
2
- class ThreadsController < Commontator::ApplicationController
3
- skip_before_filter :ensure_user, :only => :show
4
- before_filter :set_thread
5
-
6
- # GET /threads/1
7
- def show
8
- commontator_thread_show(@thread.commontable)
9
- @show_all = params[:show_all] && @thread.can_be_edited_by?(@user)
10
-
11
- respond_to do |format|
12
- format.html { redirect_to main_app.polymorphic_path(@thread.commontable) }
13
- format.js
14
- end
15
- end
16
-
17
- # GET /threads/1/hide
18
- def hide
19
- respond_to do |format|
20
- format.js
21
- end
22
- end
23
-
24
- # PUT /threads/1/close
25
- def close
26
- security_transgression_unless @thread.can_be_edited_by?(@user)
27
-
28
- @thread.errors.add(:base, t('commontator.thread.errors.already_closed')) \
29
- unless @thread.close(@user)
30
-
31
- @show_all = true
32
-
33
- respond_to do |format|
34
- format.html { redirect_to @thread }
35
- format.js { render :show }
36
- end
37
- end
38
-
39
- # PUT /threads/1/reopen
40
- def reopen
41
- security_transgression_unless @thread.can_be_edited_by?(@user)
42
-
43
- @thread.errors.add(:base, t('commontator.thread.errors.not_closed')) \
44
- unless @thread.reopen
45
-
46
- @show_all = true
47
-
48
- respond_to do |format|
49
- format.html { redirect_to @thread }
50
- format.js { render :show }
51
- end
52
- end
53
-
54
- # GET /threads/1/mentions.json
55
- def mentions
56
- security_transgression_unless @thread.can_be_read_by?(@user) && Commontator.mentions_enabled
57
- query = params[:q].to_s
58
-
59
- if query.size < 3
60
- render json: { errors: ['Query string is too short (minimum 3 characters)'] },
61
- status: :unprocessable_entity
62
- else
63
- render json: serialized_mentions(query)
64
- end
65
- end
66
-
67
- protected
68
-
69
- def serialized_mentions(query)
70
- { mentions: Commontator.commontator_mentions(@user, query).map do |user|
71
- { id: user.id, name: Commontator.commontator_name(user), type: 'user' }
72
- end }
73
- end
74
- end
75
- end
@@ -1,65 +0,0 @@
1
- module Commontator
2
- class SubscriptionsMailer < ActionMailer::Base
3
- def comment_created(comment, recipients)
4
- setup_variables(comment, recipients)
5
- message = mail :to => @to,
6
- :bcc => @bcc,
7
- :from => @from,
8
- :subject => t('commontator.email.comment_created.subject',
9
- :creator_name => @creator_name,
10
- :commontable_name => @commontable_name,
11
- :comment_url => @comment_url)
12
-
13
- message.mailgun_recipient_variables = mailgun_recipient_variables(recipients) if uses_mailgun?
14
- end
15
-
16
- protected
17
-
18
- def setup_variables(comment, recipients)
19
- @comment = comment
20
- @thread = @comment.thread
21
- @creator = @comment.creator
22
-
23
- @creator_name = Commontator.commontator_name(@creator)
24
-
25
- @commontable_name = Commontator.commontable_name(@thread)
26
-
27
- <<<<<<< Updated upstream
28
- @commontable_url = Commontator.commontable_url(@comment, main_app)
29
- =======
30
- @comment_url = Commontator.comment_url(@comment, main_app)
31
- >>>>>>> Stashed changes
32
-
33
- params = Hash.new
34
- params[:comment] = @comment
35
- params[:thread] = @thread
36
- params[:creator] = @creator
37
- params[:creator_name] = @creator_name
38
- params[:commontable_name] = @commontable_name
39
- params[:comment_url] = @comment_url
40
-
41
- if uses_mailgun?
42
- @to = recipient_emails(recipients)
43
- else
44
- @to = t('commontator.email.undisclosed_recipients')
45
- @bcc = recipient_emails(recipients)
46
- end
47
-
48
- @from = @thread.config.email_from_proc.call(@thread)
49
- end
50
-
51
- def recipient_emails(recipients)
52
- recipients.collect{ |s| Commontator.commontator_email(s, self) }
53
- end
54
-
55
- def mailgun_recipient_variables(recipients)
56
- recipient_emails(recipients).each_with_object({}) do |user_email, memo|
57
- memo[user_email] = {}
58
- end
59
- end
60
-
61
- def uses_mailgun?
62
- Rails.application.config.action_mailer.delivery_method == :mailgun
63
- end
64
- end
65
- end
@@ -1,124 +0,0 @@
1
- module Commontator
2
- class Comment < ActiveRecord::Base
3
- belongs_to :creator, :polymorphic => true
4
- belongs_to :editor, :polymorphic => true
5
- belongs_to :thread
6
- belongs_to :parent_comment
7
-
8
- validates_presence_of :creator, :on => :create
9
- validates_presence_of :editor, :on => :update
10
- validates_presence_of :thread
11
- validates_presence_of :body
12
-
13
- validates_uniqueness_of :body,
14
- :scope => [:creator_type, :creator_id, :thread_id, :deleted_at],
15
- :message => I18n.t('commontator.comment.errors.double_posted')
16
-
17
- validate :parent_comment_in_same_thread
18
-
19
- protected
20
-
21
- cattr_accessor :acts_as_votable_initialized
22
-
23
- def parent_comment_in_same_thread
24
- return if parent_comment.nil? || parent_comment.thread_id == thread_id
25
- errors.add(:parent_comment, 'must belong to the same thread')
26
- end
27
-
28
- public
29
-
30
- def is_modified?
31
- !editor.nil?
32
- end
33
-
34
- def is_latest?
35
- thread.comments.last == self
36
- end
37
-
38
- def is_votable?
39
- return true if acts_as_votable_initialized
40
- return false unless self.class.respond_to?(:acts_as_votable)
41
- self.class.acts_as_votable
42
- self.class.acts_as_votable_initialized = true
43
- end
44
-
45
- def get_vote_by(user)
46
- return nil unless is_votable? && !user.nil? && user.is_commontator
47
- votes_for.where(:voter_type => user.class.name, :voter_id => user.id).first
48
- end
49
-
50
- def update_cached_votes(vote_scope = nil)
51
- self.update_column(:cached_votes_up, count_votes_up(true))
52
- self.update_column(:cached_votes_down, count_votes_down(true))
53
- end
54
-
55
- def is_deleted?
56
- !deleted_at.blank?
57
- end
58
-
59
- def delete_by(user)
60
- return false if is_deleted?
61
- self.deleted_at = Time.now
62
- self.editor = user
63
- self.save
64
- end
65
-
66
- def undelete_by(user)
67
- return false unless is_deleted?
68
- self.deleted_at = nil
69
- self.editor = user
70
- self.save
71
- end
72
-
73
- def created_timestamp
74
- I18n.t 'commontator.comment.status.created_at',
75
- :created_at => I18n.l(created_at, :format => :commontator)
76
- end
77
-
78
- def updated_timestamp
79
- I18n.t 'commontator.comment.status.updated_at',
80
- :editor_name => Commontator.commontator_name(editor || creator),
81
- :updated_at => I18n.l(updated_at, :format => :commontator)
82
- end
83
-
84
- ##################
85
- # Access Control #
86
- ##################
87
-
88
- def can_be_created_by?(user)
89
- user == creator && !user.nil? && user.is_commontator &&\
90
- !thread.is_closed? && thread.can_be_read_by?(user)
91
- end
92
-
93
- def can_be_edited_by?(user)
94
- return true if thread.can_be_edited_by?(user) &&\
95
- thread.config.moderator_permissions.to_sym == :e
96
- comment_edit = thread.config.comment_editing.to_sym
97
- !thread.is_closed? && !is_deleted? && user == creator &&\
98
- comment_edit != :n && (is_latest? || comment_edit == :a) &&\
99
- thread.can_be_read_by?(user)
100
- end
101
-
102
- def can_be_deleted_by?(user)
103
- mod_perm = thread.config.moderator_permissions.to_sym
104
- return true if thread.can_be_edited_by?(user) &&\
105
- (mod_perm == :e ||\
106
- mod_perm == :d)
107
- comment_del = thread.config.comment_deletion.to_sym
108
- !thread.is_closed? && (!is_deleted? || editor == user) &&\
109
- user == creator && comment_del != :n &&\
110
- (is_latest? || comment_del == :a) &&\
111
- thread.can_be_read_by?(user)
112
- end
113
-
114
- def can_be_voted_on?
115
- !thread.is_closed? && !is_deleted? &&\
116
- thread.config.comment_voting.to_sym != :n && is_votable?
117
- end
118
-
119
- def can_be_voted_on_by?(user)
120
- !user.nil? && user.is_commontator && user != creator &&\
121
- thread.can_be_read_by?(user) && can_be_voted_on?
122
- end
123
- end
124
- end