cmor_blog 0.0.1.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (341) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +19 -0
  4. data/app/assets/javascripts/cmor/blog/application.js +13 -0
  5. data/app/assets/stylesheets/cmor/blog/application.css +14 -0
  6. data/app/controllers/cmor/blog/application_controller.rb +6 -0
  7. data/app/controllers/cmor/blog/posts_controller.rb +32 -0
  8. data/app/helpers/cmor/blog/application_helper.rb +28 -0
  9. data/app/models/cmor/blog/asset_detail.rb +19 -0
  10. data/app/models/cmor/blog/post.rb +117 -0
  11. data/app/services/cmor/blog/application_service.rb +8 -0
  12. data/app/services/cmor/blog/import_posts_service.rb +147 -0
  13. data/app/views/cmor/blog/posts/_monthly_navigation.html.haml +3 -0
  14. data/app/views/cmor/blog/posts/_post.html.haml +36 -0
  15. data/app/views/cmor/blog/posts/_post_in_index.html.haml +18 -0
  16. data/app/views/cmor/blog/posts/_post_in_index_with_preview_picture.haml +20 -0
  17. data/app/views/cmor/blog/posts/index.html.haml +11 -0
  18. data/app/views/cmor/blog/posts/show.html.haml +4 -0
  19. data/app/views/layouts/cmor/blog/application.html.erb +14 -0
  20. data/config/locales/de.yml +46 -0
  21. data/config/locales/en.yml +46 -0
  22. data/config/routes.rb +14 -0
  23. data/db/migrate/20160214133500_create_cmor_blog_posts.rb +17 -0
  24. data/db/migrate/20180429134813_create_cmor_blog_asset_details.rb +14 -0
  25. data/lib/cmor/blog.rb +12 -0
  26. data/lib/cmor/blog/configuration.rb +29 -0
  27. data/lib/cmor/blog/engine.rb +7 -0
  28. data/lib/cmor/blog/feature.rb +9 -0
  29. data/lib/cmor/blog/version.rb +7 -0
  30. data/lib/cmor_blog.rb +10 -0
  31. data/lib/generators/cmor/blog/install/install_generator.rb +30 -0
  32. data/lib/generators/cmor/blog/install/templates/initializer.rb +62 -0
  33. data/lib/generators/cmor/blog/install/templates/routes.source +3 -0
  34. data/lib/tasks/cmor/blog_tasks.rake +4 -0
  35. data/lib/tasks/cmor_blog_tasks.rake +10 -0
  36. data/spec/dummy/Rakefile +6 -0
  37. data/spec/dummy/app/assets/config/manifest.js +3 -0
  38. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  39. data/spec/dummy/app/assets/javascripts/cable.js +13 -0
  40. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  41. data/spec/dummy/app/channels/application_cable/channel.rb +4 -0
  42. data/spec/dummy/app/channels/application_cable/connection.rb +4 -0
  43. data/spec/dummy/app/controllers/application_controller.rb +2 -0
  44. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  45. data/spec/dummy/app/jobs/application_job.rb +2 -0
  46. data/spec/dummy/app/mailers/application_mailer.rb +4 -0
  47. data/spec/dummy/app/models/application_record.rb +3 -0
  48. data/spec/dummy/app/models/user.rb +2 -0
  49. data/spec/dummy/app/views/layouts/application.html.erb +15 -0
  50. data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
  51. data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
  52. data/spec/dummy/bin/bundle +3 -0
  53. data/spec/dummy/bin/rails +4 -0
  54. data/spec/dummy/bin/rake +4 -0
  55. data/spec/dummy/bin/setup +36 -0
  56. data/spec/dummy/bin/update +31 -0
  57. data/spec/dummy/bin/yarn +11 -0
  58. data/spec/dummy/config.ru +5 -0
  59. data/spec/dummy/config/application.rb +31 -0
  60. data/spec/dummy/config/boot.rb +5 -0
  61. data/spec/dummy/config/cable.yml +10 -0
  62. data/spec/dummy/config/database.yml +25 -0
  63. data/spec/dummy/config/environment.rb +5 -0
  64. data/spec/dummy/config/environments/development.rb +61 -0
  65. data/spec/dummy/config/environments/production.rb +94 -0
  66. data/spec/dummy/config/environments/test.rb +46 -0
  67. data/spec/dummy/config/initializers/application_controller_renderer.rb +8 -0
  68. data/spec/dummy/config/initializers/assets.rb +14 -0
  69. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  70. data/spec/dummy/config/initializers/cmor_blog.rb +62 -0
  71. data/spec/dummy/config/initializers/content_security_policy.rb +25 -0
  72. data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
  73. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  74. data/spec/dummy/config/initializers/i18n.rb +2 -0
  75. data/spec/dummy/config/initializers/inflections.rb +16 -0
  76. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  77. data/spec/dummy/config/initializers/route_translator.rb +3 -0
  78. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  79. data/spec/dummy/config/locales/en.yml +33 -0
  80. data/spec/dummy/config/puma.rb +34 -0
  81. data/spec/dummy/config/routes.rb +6 -0
  82. data/spec/dummy/config/spring.rb +6 -0
  83. data/spec/dummy/config/storage.yml +34 -0
  84. data/spec/dummy/db/development.sqlite3 +0 -0
  85. data/spec/dummy/db/migrate/20190327133033_create_users.rb +9 -0
  86. data/spec/dummy/db/migrate/20190327133051_create_active_storage_tables.active_storage.rb +27 -0
  87. data/spec/dummy/db/migrate/20190327133123_create_cmor_blog_posts.cmor_blog.rb +18 -0
  88. data/spec/dummy/db/migrate/20190327133124_create_cmor_blog_asset_details.cmor_blog.rb +15 -0
  89. data/spec/dummy/db/schema.rb +68 -0
  90. data/spec/dummy/db/test.sqlite3 +0 -0
  91. data/spec/dummy/log/development.log +226 -0
  92. data/spec/dummy/log/test.log +3624 -0
  93. data/spec/dummy/package.json +5 -0
  94. data/spec/dummy/public/404.html +67 -0
  95. data/spec/dummy/public/422.html +67 -0
  96. data/spec/dummy/public/500.html +66 -0
  97. data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
  98. data/spec/dummy/public/apple-touch-icon.png +0 -0
  99. data/spec/dummy/public/favicon.ico +0 -0
  100. data/spec/dummy/spec/factories/users.rb +5 -0
  101. data/spec/dummy/spec/models/user_spec.rb +5 -0
  102. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-V/-VlqJOQHVnrawQ8A1buNVn3hwPuYfVLwsREkrYzrRbE.cache +0 -0
  103. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/0-/0-rNFQl4fMkTY8vJTbfxePsmzhsIt2AsoniGk4xYe-I.cache +1 -0
  104. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/1K/1KCn4vdjBDNXWTp5GTCm1lWakNX4V11-3h5wUSBuz8M.cache +0 -0
  105. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/2-/2-K7ByCr9Zks8jNPj4SSqHmHqcNuXoMul0U7MwcfiyI.cache +1 -0
  106. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/2J/2JZ8VAYhkBcWE3sok5fqFK1opx8vf16OKQxVHfUPn4k.cache +1 -0
  107. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/4S/4SroZcouXAP1i7fITmWIlfnrNNBOpA5VKGb3uMHZH48.cache +0 -0
  108. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/4U/4Ub_oe0l8MVs-xA0x5y3lXG4djK4UsBapN5Y4Qk0sKw.cache +0 -0
  109. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/4n/4nNBgBkVP_0STyHagWEckyfWk1f-4otn_qaa5sCX1L0.cache +1 -0
  110. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/5L/5L-FSYLjBxDmPgzI_CAYGDk-9Mni9w9C57XkJeyt5LA.cache +1 -0
  111. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/5t/5tpjyg_m8MBx1p6ILjvlZymN2bdbk3KcTK0VZYJdkTY.cache +1 -0
  112. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/6e/6eHLns1-9lpL1ONXkJHSM9src6rLg-c1X_ABZTpGJU0.cache +1 -0
  113. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/79/79jR4Uf_pUhttCKeRR-xEPMITP6aTnSgtQIa8EfUW8E.cache +2 -0
  114. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7J/7JogBzTsN0xbxts-BabQ4wnHAtlGuYmGycEYT7Dle4Y.cache +1 -0
  115. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7T/7T5lFJYzMovmpECinzRCGRLyLS1sVCeyiDdDvknzI0U.cache +1 -0
  116. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7a/7ao8G55LM-hTFgORzO63iz72VCny11R__UNkxZzU2yw.cache +1 -0
  117. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8-/8-QQLtMujDnjyd2fI0Ygw5qXaATxumVuyPKDpUWewKE.cache +2 -0
  118. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8A/8AZwOOosp2_Na8A4hIFe8XXNFXL__uJU2fwdBIuqHkA.cache +0 -0
  119. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8Q/8Qv0pOFexuQn3xn0g8_E7UAZoZjcSudR3eCadt2r1ic.cache +0 -0
  120. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/9A/9AEbGBhB9a-2DO40Xwi_I0f8jHH9gUjCFV5UyjoWVR0.cache +0 -0
  121. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Aw/Awcts-1k8q1xSf2V0I2WmGfqUnKoG59NAWSwSvunJVA.cache +0 -0
  122. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/BN/BNfwKvZJYl1bpvuNVfdnj6udFpDMLgHQ6_vwuENHdDs.cache +2 -0
  123. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/BP/BPzKKkTuUCyiTlGnLQfMc7tb9e0jou_eKKpm4n6EfVY.cache +0 -0
  124. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/C5/C5D4T0_nOZRxlB1Kr3YBjpAz13VAaGm5141p_IqSHEw.cache +3 -0
  125. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/DL/DLjtRRkBmXKx2VWmOCTFvQ3JSssi-BbBe3fbdTwVXOQ.cache +1 -0
  126. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/DP/DPjOD2ilEoIswCjcsmy1WyRh18tAJ4LiJZfy_KMbWzY.cache +1 -0
  127. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Da/DaZoUYIExefiNHgKW5vM_c0RMkH9JaDJKA7CY3KpkyM.cache +0 -0
  128. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/EN/ENfxRI6KnV8ss2kfdjn6kjKycOG8M53J9b4lH9AGGGQ.cache +1 -0
  129. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ee/EeAy4BwYqCSygG3U51uL3inSGn738uNoSJqSgXff5NU.cache +1 -0
  130. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ex/Exni9T-N0D00xhk9o73AIRL5YUOyHlJTj0i9YuzvnvQ.cache +1 -0
  131. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/F7/F74fucogx91yB5PW70H7x0uAJV_sYuVfbAg73rR-wUI.cache +3 -0
  132. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/GC/GCv8F2yrXEJfKqRtqEBW1OsTtGiDADLnbvBvPKqP6yk.cache +0 -0
  133. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/GX/GXqj3wdg60a1WWJ7Pc1E_AUGkuluO8MoOdb1XwCtYz4.cache +1 -0
  134. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/HC/HCDOUd7-S45aJ_PjVAC_Vmjyud3i1aQv4cE3t9_Z3Dw.cache +2 -0
  135. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/HF/HFu2mFr5c8pVTbfIfgAxKxWEcOhPpPjlo18LuL369kc.cache +1 -0
  136. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/HZ/HZ1iRdzAHZ8o4HrWUPniUmrldI0rrw3czGHIlhKx20Q.cache +2 -0
  137. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Hd/HdvGh1wSHDNyNuDGDRUp_nyHcqHy_WtaIEfQcrOvrjY.cache +1 -0
  138. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Hx/HxDhLNAjgpAjWKLIYCTcv1gXd11GGWXDRkGMlW1ZL4o.cache +1 -0
  139. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/IQ/IQbqZi-R_kzI2pVnGXlfdoMkGpN0i2UApwh2ZVOUQa0.cache +1 -0
  140. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/J1/J18tvJ-r9fZkRBGLAodMGvRuL8y43lIvRSNryp1rh8w.cache +1 -0
  141. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/J4/J4rQGZTf9t0HelWNR9t3snziBLFUdHsL9o-EMmVNv8k.cache +0 -0
  142. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/KU/KUadIyonXR1Vyz07b6lra7kQIWQVonzIiOzZCJOK4IE.cache +3 -0
  143. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Kh/Kh4fSXmrLshblZ8Bk6JwGdnCmYBoTIxUf0uwRRcasAk.cache +1 -0
  144. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Kz/KzsHCgPxPMmAH5F6_VrrRrakxBIEfJBfybtwD1wOUQw.cache +0 -0
  145. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/LC/LC9Rk-2HfS4nG-B3ZxORFRj2PKWRPbGTjnvXietiK0Y.cache +0 -0
  146. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Lj/LjybYghd8WNWroVlUKQlSXb7XIh7pdC7lhpKXaSVXtM.cache +1 -0
  147. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Lz/LzGa7gFqUj_VkpguWgGktdXriEcyQ1Z-ruM0YxwEz5w.cache +1 -0
  148. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/MC/MCuEd_HWd5C2COVhVm23pI9wjRXLZI7gB5cNb6b_5X4.cache +1 -0
  149. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/NA/NA7TG8OGXra5NGU5ptqd0TbvuCX0sB2U1SUbbOgo_ik.cache +1 -0
  150. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/No/NorQRkJJIpaNT8ovFAWD32sofZfyRSW6N_0T5xYeTWY.cache +1 -0
  151. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/OC/OCQLP9qXFiUNc1RIEcDAMZMYkr9z1BAVqLw1L8HFvD4.cache +2 -0
  152. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ov/OvBCJz5c2MTTm7L-A9v04oYC_wIng8p-y5A7AmRicNo.cache +0 -0
  153. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/PD/PD99Bcd5AQWB3NVDhz4dX9LI8A31bqUs4N-qUdEFCAE.cache +1 -0
  154. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/PI/PIysz08byyvXlaQfthLgm79fjzz0rZ0el42dAQq2hf8.cache +1 -0
  155. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Px/PxNIFn49GEE864vNppMRfgNmPdaFIOWZvVMn4ExV3QY.cache +1 -0
  156. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Q1/Q1UTphkJdeNwXU-Rha9SCBP7o60KxHlJdQkPxlEFLBw.cache +0 -0
  157. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/QL/QLUKmmM5O-i6yPAhldMs0CwJ-ZihYCJYQQHnmm2cYqI.cache +0 -0
  158. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/R6/R6W1OhmXADlwn2paOoImbgcKCpB8tY4uwtVA27HImuc.cache +3 -0
  159. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ri/RiHNcvWMX9tIg-jXtcQT41HOZwI91OMo8NmwtjN6CWM.cache +0 -0
  160. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/SG/SG-G2_g_Fs-ZnoYbMg3wTu51GwptCQ8adgkDYts8-rU.cache +1 -0
  161. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Se/SegC9HGurEVICEHZGXfEtuldGkbOVrcAlCdteLemCUc.cache +0 -0
  162. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ua/UaxuI-TA7etTySk2ZI7_iH5KlBLXtQpASQ61dF9IIc4.cache +0 -0
  163. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/VE/VE8OsRaFIUW7MgMYlyTmsYtxQvj34GcwG-gbsXmWcnw.cache +1 -0
  164. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/VS/VSliUoy2QKm5bR_26CTaylVZY4o61YuE0gr5kqU6UJE.cache +0 -0
  165. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Vr/VrtEHnJmqjZwGxBqPWkxmfbuNoZ_ZlWNmLzKRC924FU.cache +1 -0
  166. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/WH/WHzxZ3PqKDkQnL8MGHGOEV_Q2UhucCr-LpHoHr4z43I.cache +0 -0
  167. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Xk/XkVHFvPaI-xAbAcXZSv_EslOO0sXQSOJi2v9-w5UyE4.cache +1 -0
  168. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Xu/XuG6YDHQxb62TSnbGNXRIKPAoTVwjdmKapiJq6Jy-KY.cache +1 -0
  169. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ys/YsR2zZro__TQ26cZwbmdX6D7w7YvKz_2OjLDno3rJQI.cache +0 -0
  170. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Zj/ZjK1fvOKdajGTfU5pRn8x2UWgX8GWvuTXo24RENXREM.cache +1 -0
  171. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/_U/_Uz5da-URnRhVpIycPwOq3dvEZay17seoAYyPNNT_d4.cache +1 -0
  172. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/_q/_qzNQSchUcC0QmhBBswZ2FJibvBoks25T6X09LkLMjc.cache +0 -0
  173. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/_v/_vHhLuv_HO3ndie5PLld1rfmAfh8Y54vtbj14lnA97w.cache +0 -0
  174. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/a1/a1faMw3yyPayMOK_RdhhS4e-Q8bFhPeYUSk-13vND_U.cache +2 -0
  175. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/a9/a9GoBVChZoKZQRcFfP9umGJkkwQIDecswTove61HNA0.cache +0 -0
  176. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/a9/a9yu9LoY7F3kuGUpuGna13Yr3o6fyE8kBMoxrxMV_d0.cache +1 -0
  177. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/aQ/aQL0CNPS5ESzN5XcS9o8NF7i4bv4pCm0xdrA7vfw5fc.cache +2 -0
  178. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ao/aoSyB2bmm2fDa_qosbBpJx-JtMmejoDlu6bHkKA66_E.cache +1 -0
  179. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/bD/bDIuRJAlDi98cyI-tv6gf95cK6b2lDclVk6gw7-4yQE.cache +1 -0
  180. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/bl/blP7I9wrpMZirmqxSinkxvHgn7dwfxBAvHlUkCTQf9Q.cache +1 -0
  181. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/c7/c7CooReQb2ejxEumMNCGRid6lhlPFxxlYhiSx0BnFf4.cache +1 -0
  182. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dG/dG2st3mUGsh-8yC115nqU2IltElHJVNhu2vRfijxs20.cache +1 -0
  183. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/eX/eXISMIEArHupKrhdYlXSxlKxkcjE5Wg18tlXcTRuxP0.cache +1 -0
  184. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fR/fRbCj1aNB38O-9pznPKZJ-EZoFXBeVilAs0WroTkIEM.cache +1 -0
  185. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fq/fqqy6XMocl_Tx0nWsOC1LQ_uj3jUrV-CN8kMgtDR0Bc.cache +2 -0
  186. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/gr/grhVIe0nSeE-O8HzW-AZBuaGYtZ_HuXPy7VbBQhIctE.cache +2 -0
  187. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/i_/i_s59CkDPBCbkVzR2yxiT9kpEI1B0pO0OYOIwTGpkcI.cache +2 -0
  188. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/jK/jKHqW1VBzFtw_WgOZ-5WFrod_nbiYJ_Duey1VZXs3Mo.cache +0 -0
  189. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/kD/kDartayL6A6j26rd-NkFIU9yqvIIJh9IUdiLsbuHoPY.cache +1 -0
  190. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/kO/kOlLCxBCh7R0KCwUfLhoJPxB9emAznKrAyU9us4m9oo.cache +1 -0
  191. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/kb/kbmww9xZ7peHqx0f5W_VWlSovHbMJMX4EvurWyLGezI.cache +0 -0
  192. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/kc/kcFDNI3ZFzx4RNsqpECoNx5d1emF0Z_HykxZMLgiXos.cache +1 -0
  193. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/lS/lStvx9Beg2l4s8L-QdTSKuc5_qQPQAZPnIcRI7JkpPE.cache +2 -0
  194. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/n_/n_xYqQYhwEMQknb3jFQnjlxxBE9TzMNHCdJ-bEyZFIw.cache +2 -0
  195. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nq/nqBvCfX72u2EvAyNfHt3upjIFz009V5YYgwPmmaNRH4.cache +3 -0
  196. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nt/ntry6y5LOGB3mXS76ylx-eIcul__UqoQoqB4-0eaNnI.cache +2 -0
  197. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nx/nxTv3sKVUQZADJyM3dPaVmUA78MIsMLD_K279yN_GsI.cache +2 -0
  198. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/oH/oHwW7v7FzDUVmiRue4L09alpSkCTLZaC5iomoKL1XdE.cache +1 -0
  199. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ok/okweeGWRlOBhUpIGbH263Q5kkD3VyIL4MPMs6Yio3UM.cache +0 -0
  200. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/pH/pHdHA8Cna-GHcdsxCYCo-6rAGQdrvyBChqQemkP7xxg.cache +1 -0
  201. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qq/qqeUBxpDPTNXL2hYWXX8t_E_jxRkRpjhJR-FcdiLWr0.cache +3 -0
  202. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/r3/r3UzEYoPQOp8kxwFgec8oxWSDP5O4i1efWWYa4rNGEU.cache +1 -0
  203. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/rL/rLkB9vj9qSzMS2KR5Bl6QjaUInYI4awJBnwrvmBv9x8.cache +1 -0
  204. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/s5/s5K7Au8rvj_FANwHVjYyRNOCBFrCdUgNNowEyhPa008.cache +0 -0
  205. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sm/smkjNAEzX7uLiRZnQA38poQvnhHE5uHIlMpkirr_K04.cache +2 -0
  206. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/tj/tjmw05K7W-D6br1xD0DJtdb90ucU9crnmMzuFDLkZRQ.cache +1 -0
  207. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/uI/uIbDaIa3_XerLzHMbP0n4QZlx70WLZQBXr_U9W1-WyQ.cache +0 -0
  208. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ul/ulDytBOVkdKR2LICOxbRGTNTJF99h7ne8PSduUAPJ_c.cache +0 -0
  209. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/uv/uvUAuGlEjicX8KUS1uVon_aSNgfC9GbZEzxqB58yjmI.cache +2 -0
  210. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/vO/vOE3S39vUOdHdlAUjHF0JBpSrudcFxUsLKtHLtoUN_A.cache +1 -0
  211. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/vU/vUTeso84htTGOvr8I9J2ZzkMRRgkXmWYpoEDaVhcGa0.cache +1 -0
  212. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/v_/v_O7CAdXG7icZucqoA971FxfXpz7XWC8PtjH-Z1HIFU.cache +3 -0
  213. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/va/vashnKLH2tjD-oWYbESUbdtZoa-f8WyFZXvxFeldJq4.cache +1 -0
  214. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/vw/vw4hWcAaXGLEo2E8KRM86fVgJAvs7q3qkZYmkI2UYG0.cache +2 -0
  215. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/w8/w8XS90xe44-zLTirkVNvEMgky0Iu-y4R4tWoQTHOkWA.cache +1 -0
  216. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wM/wMSmpX0nNnplPucwLgkByW3-3TTUep3tNYyx5O_2Wmw.cache +1 -0
  217. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wi/win_v0ZNu-l7AoRx8w3ls1xcy0mUExLBVMCSr5oaJFc.cache +0 -0
  218. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yq/yqxTsMP8kmCSie9aYhLgHs_Db7h-sSa5vmqZZJUtwv0.cache +0 -0
  219. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yr/yrp_60uUSk5SlU1028XR4AIpun11BkJJOvIgatVUYBQ.cache +2 -0
  220. data/spec/dummy/tmp/development_secret.txt +1 -0
  221. data/spec/dummy/tmp/storage/1C/ZG/1CZGfUNuuKrZ7qk6h1cXqVBd +0 -0
  222. data/spec/dummy/tmp/storage/1S/o6/1So6D3b8BVrHoX99tPqvabZL +0 -0
  223. data/spec/dummy/tmp/storage/2P/aZ/2PaZeqoa1odEkDq2n7TfGWEM +0 -0
  224. data/spec/dummy/tmp/storage/2z/Ze/2zZevs255MwAii2R4vnTJFPy +0 -0
  225. data/spec/dummy/tmp/storage/3L/vt/3LvtKFwhfhCAoUPihXPppRTe +0 -0
  226. data/spec/dummy/tmp/storage/47/br/47brWKKHhCv8WdMk8BTbZJVX +0 -0
  227. data/spec/dummy/tmp/storage/4h/RR/4hRRTfTS238WYK3zZrJ9pQwU +0 -0
  228. data/spec/dummy/tmp/storage/4p/yS/4pySrDvGq9jgHmcacg7H5gFQ +0 -0
  229. data/spec/dummy/tmp/storage/5E/Nr/5ENr2prxJPcQQ3PJkDMWHDi1 +0 -0
  230. data/spec/dummy/tmp/storage/6V/zu/6VzuLk24y3aJHYPHFMLirQdV +0 -0
  231. data/spec/dummy/tmp/storage/6u/5J/6u5JAfsBSVRNMPZ7jE6GhxmH +0 -0
  232. data/spec/dummy/tmp/storage/7K/ST/7KST3RNC4q7rUBZZuEFm8AU1 +0 -0
  233. data/spec/dummy/tmp/storage/99/FF/99FFqLkch5ZaTtvov4qFEsxm +0 -0
  234. data/spec/dummy/tmp/storage/AV/D6/AVD6mUw74AaoARAfAymRtxKZ +0 -0
  235. data/spec/dummy/tmp/storage/Bh/gg/BhggdxRHV151u447z7c2p6TS +0 -0
  236. data/spec/dummy/tmp/storage/CC/TZ/CCTZ4EJF69feP3mxXRabwGVy +0 -0
  237. data/spec/dummy/tmp/storage/DJ/Ny/DJNy1XiciYwxbpqMS9WD64j8 +0 -0
  238. data/spec/dummy/tmp/storage/DZ/Ls/DZLs3Ewnvji36LQJGXwT6u5E +0 -0
  239. data/spec/dummy/tmp/storage/E3/uT/E3uTaffJwArAqMejvo8KMWDh +0 -0
  240. data/spec/dummy/tmp/storage/EQ/hr/EQhrmnA4KZZhBib5npmHmTEc +0 -0
  241. data/spec/dummy/tmp/storage/Ej/vb/EjvbAseR5TJFveKyG2e5nuVA +0 -0
  242. data/spec/dummy/tmp/storage/Er/cG/ErcGF2BZsWTyT9HCBfi7wLyh +0 -0
  243. data/spec/dummy/tmp/storage/F8/n5/F8n5EZot44kDuwQc1Gbnpv5K +0 -0
  244. data/spec/dummy/tmp/storage/FY/iN/FYiN6tdjJzh1cJ4CraruqR5u +0 -0
  245. data/spec/dummy/tmp/storage/Fk/qg/FkqgDp7D83z8ZypbT2XrSa6c +0 -0
  246. data/spec/dummy/tmp/storage/Fy/J6/FyJ6GFpX3KWPEMqTUfWQc7xp +0 -0
  247. data/spec/dummy/tmp/storage/GB/wz/GBwziu8qmP1roV25ecYGVddo +0 -0
  248. data/spec/dummy/tmp/storage/GR/ii/GRii5T9e7dr3z1VPcjKEECyr +0 -0
  249. data/spec/dummy/tmp/storage/GZ/zx/GZzxYQWsomhMgBjfSR5JCX4L +0 -0
  250. data/spec/dummy/tmp/storage/Hf/7H/Hf7HkAiiaYVwZgd5KW4bHqRi +0 -0
  251. data/spec/dummy/tmp/storage/Hm/8S/Hm8SczkaM4sxZzmug95QvJuw +0 -0
  252. data/spec/dummy/tmp/storage/J5/ea/J5eaqWJUpaBEknM7Zqq8cugK +0 -0
  253. data/spec/dummy/tmp/storage/JD/MS/JDMSvwmLM688CFMhRHCU1Qpk +0 -0
  254. data/spec/dummy/tmp/storage/Je/Vp/JeVpcxPNVUeYTfJJ3foEahwW +0 -0
  255. data/spec/dummy/tmp/storage/KK/Yc/KKYcMt1FViVgja18fdSTQtAv +0 -0
  256. data/spec/dummy/tmp/storage/LL/Rv/LLRvVSdyeo2ygWD8yUjt4nhD +0 -0
  257. data/spec/dummy/tmp/storage/LV/6y/LV6yGq6qQEGhqsqgQ5Gbct8Z +0 -0
  258. data/spec/dummy/tmp/storage/Lb/qM/LbqMPeyyjFX7PPSZHDKibwNU +0 -0
  259. data/spec/dummy/tmp/storage/M3/tM/M3tMDYsreYrmPJXMc6hW4hvd +0 -0
  260. data/spec/dummy/tmp/storage/MY/k5/MYk5BqurKtbSVBDsNwCNCSdL +0 -0
  261. data/spec/dummy/tmp/storage/NU/nC/NUnCVxhd1LbcK5ddgc7MEhAG +0 -0
  262. data/spec/dummy/tmp/storage/Ns/DS/NsDSBxGwmUigtW7VR14wuM15 +0 -0
  263. data/spec/dummy/tmp/storage/P6/WL/P6WLzwPLUy1xGvwV63MyGjsL +0 -0
  264. data/spec/dummy/tmp/storage/QP/h7/QPh7xpq1wbQa8CHHVv6GKoSJ +0 -0
  265. data/spec/dummy/tmp/storage/RK/5z/RK5z7URen9eFj1SUf9Uj98Gt +0 -0
  266. data/spec/dummy/tmp/storage/RU/Vu/RUVuE6ZtDt5PhEdR15svsoJH +0 -0
  267. data/spec/dummy/tmp/storage/RY/EH/RYEH1bLt944KypcnQbyRj1fe +0 -0
  268. data/spec/dummy/tmp/storage/Re/Uy/ReUysbYmuUTVwBVETuDj7RVZ +0 -0
  269. data/spec/dummy/tmp/storage/Rr/CM/RrCMmpJHiXaVFgDTJd8A2fjn +0 -0
  270. data/spec/dummy/tmp/storage/SQ/ez/SQezvUkSyLiVKz1xU1DXb8ir +0 -0
  271. data/spec/dummy/tmp/storage/Sy/QC/SyQCtYbb9yGxsXBF4ru8yG6y +0 -0
  272. data/spec/dummy/tmp/storage/Tv/n1/Tvn1UqjW2STGTQhQXpbXLCDh +0 -0
  273. data/spec/dummy/tmp/storage/Tx/FL/TxFLDNfQ6iumBBfR997SBEJg +0 -0
  274. data/spec/dummy/tmp/storage/UD/yf/UDyfFEtVP9jmV3srnbC6mdz5 +0 -0
  275. data/spec/dummy/tmp/storage/UG/dH/UGdHTncKed7W3RymzMzucZ91 +0 -0
  276. data/spec/dummy/tmp/storage/Ve/b5/Veb5B4bQFx44KgSCR7WPe8SS +0 -0
  277. data/spec/dummy/tmp/storage/Vm/2C/Vm2CH832uJbDA2rSAKuqG3fG +0 -0
  278. data/spec/dummy/tmp/storage/WD/FB/WDFBDzGeDophMUoZUxK6omdi +0 -0
  279. data/spec/dummy/tmp/storage/WW/ZF/WWZFmcnsUYnoMHYcFgTLZsjV +0 -0
  280. data/spec/dummy/tmp/storage/XX/Mq/XXMqNjoDCTBZmKJVAbhpjcMi +0 -0
  281. data/spec/dummy/tmp/storage/Xs/q9/Xsq942LTmatZEN1jvTHjK6wx +0 -0
  282. data/spec/dummy/tmp/storage/Y5/1v/Y51v66kYfRGPWevKuGe5dLnW +0 -0
  283. data/spec/dummy/tmp/storage/YN/Ap/YNApKcsRJgYobyHWZhVqg3Rd +0 -0
  284. data/spec/dummy/tmp/storage/Zy/Am/ZyAmvyND25d2LVfjcdRvqXB8 +0 -0
  285. data/spec/dummy/tmp/storage/aK/Ev/aKEvRD13qcBo9NBftxt2aYUp +0 -0
  286. data/spec/dummy/tmp/storage/bT/7T/bT7TD7ctuCdSUMExqsC6VPER +0 -0
  287. data/spec/dummy/tmp/storage/bV/Cs/bVCsxyaYiLRWgDiehHz6Qj82 +0 -0
  288. data/spec/dummy/tmp/storage/bW/Pf/bWPfQe3WKgHCB7UCnR77EEMh +0 -0
  289. data/spec/dummy/tmp/storage/cP/SY/cPSY4VXYQbZcimFtRHjvf5ZJ +0 -0
  290. data/spec/dummy/tmp/storage/cp/AE/cpAEGMDtvJ7so88a1XMKdpWY +0 -0
  291. data/spec/dummy/tmp/storage/dF/2X/dF2Xq3wV7kUAsijYS8BKfcuD +0 -0
  292. data/spec/dummy/tmp/storage/dP/8t/dP8tPy9GyEWx5CCF6CG4wq5H +0 -0
  293. data/spec/dummy/tmp/storage/dr/Kk/drKk3HEbcc8B38LerEqwN5RE +0 -0
  294. data/spec/dummy/tmp/storage/du/Rh/duRh4us2eAcVu5gngEpruVLp +0 -0
  295. data/spec/dummy/tmp/storage/e3/7r/e37r5L78foRymJLH7r9fY1eV +0 -0
  296. data/spec/dummy/tmp/storage/eL/rV/eLrV13c1XhfCqbx6HiBYRqNy +0 -0
  297. data/spec/dummy/tmp/storage/et/VH/etVHxMjng4jb64cAYfJibjTK +0 -0
  298. data/spec/dummy/tmp/storage/fR/Z7/fRZ7acsH1SjYubpX1esWcSX7 +0 -0
  299. data/spec/dummy/tmp/storage/gn/nb/gnnborYm7AYCbuCQM3qim4kS +0 -0
  300. data/spec/dummy/tmp/storage/gp/RP/gpRPpaAgputB1w8Rsv1uRmn6 +0 -0
  301. data/spec/dummy/tmp/storage/gw/9h/gw9hHGsVa6xNbrLqYBkPcqCE +0 -0
  302. data/spec/dummy/tmp/storage/h2/EY/h2EYL5e22Ur86cjopX6YwxiR +0 -0
  303. data/spec/dummy/tmp/storage/hA/JT/hAJTrsX2B97c7xEMStT5MmjZ +0 -0
  304. data/spec/dummy/tmp/storage/iE/4t/iE4t1m3xHAw97V79iq8PMQAD +0 -0
  305. data/spec/dummy/tmp/storage/iz/Q2/izQ2jnMeUTo1CcsBTzDoRyb8 +0 -0
  306. data/spec/dummy/tmp/storage/jG/Cw/jGCwrpvz98fLGs6wArsQ5JgH +0 -0
  307. data/spec/dummy/tmp/storage/mF/5e/mF5eLZfR4VsEicPBbBVCVLQS +0 -0
  308. data/spec/dummy/tmp/storage/mK/NE/mKNEd6jR4KzMeuHUbTcocoEF +0 -0
  309. data/spec/dummy/tmp/storage/mY/Ue/mYUewUgWyj5ZowF5biNFfuJt +0 -0
  310. data/spec/dummy/tmp/storage/nf/Uu/nfUutwhYubsYtM5QUvcmKtc6 +0 -0
  311. data/spec/dummy/tmp/storage/ns/an/nsan7CAnTsZUnfLTzUq9ihnR +0 -0
  312. data/spec/dummy/tmp/storage/pC/m6/pCm6CFaYdMDgNgg5BdKB1Rnc +0 -0
  313. data/spec/dummy/tmp/storage/rK/9V/rK9VoCR5xUxhJmYLtiwsQsCC +0 -0
  314. data/spec/dummy/tmp/storage/sV/An/sVAn4hKTkoW9qKSCZ7NkB9h7 +0 -0
  315. data/spec/dummy/tmp/storage/t9/eJ/t9eJ1RXYSgdoB7J2tWs24d8u +0 -0
  316. data/spec/dummy/tmp/storage/ua/Yi/uaYiK155xpdkdv4QEuugKB6f +0 -0
  317. data/spec/dummy/tmp/storage/uj/Tr/ujTrRopARKsL5484Jr4vjSLR +0 -0
  318. data/spec/dummy/tmp/storage/vn/io/vnioNtVhFuFziNrpnjNh1rB8 +0 -0
  319. data/spec/dummy/tmp/storage/vr/8y/vr8yH1tfRN2dqAC1Y775su96 +0 -0
  320. data/spec/dummy/tmp/storage/w5/S5/w5S5YyCy7NGfFKca51WS4nvr +0 -0
  321. data/spec/dummy/tmp/storage/w6/Sj/w6SjSf1n3uPRg78FVd3h27hU +0 -0
  322. data/spec/dummy/tmp/storage/wS/P8/wSP82rYHyzX6VJCo47xEuCh7 +0 -0
  323. data/spec/dummy/tmp/storage/xR/pS/xRpSx4cDGVwKdXe7UDapBGov +0 -0
  324. data/spec/dummy/tmp/storage/xs/BL/xsBLEJ3e2aFcu2QBt4VyXNri +0 -0
  325. data/spec/dummy/tmp/storage/yQ/Cb/yQCbeQrrZiByzGE5dND2xUgT +0 -0
  326. data/spec/dummy/tmp/storage/yW/PB/yWPBK9uujkKSofwUP2AZfEyZ +0 -0
  327. data/spec/dummy/tmp/storage/zB/e1/zBe1U2PAQejTa3bJM9fgF61d +0 -0
  328. data/spec/dummy/tmp/storage/zp/bV/zpbVy3VE6wV6TNaow4ZwyjpL +0 -0
  329. data/spec/factories/cmor_blog_asset_details.rb +17 -0
  330. data/spec/factories/cmor_blog_posts.rb +7 -0
  331. data/spec/features/de/blog/posts_feature_spec.rb +13 -0
  332. data/spec/files/cmor/blog/asset/example.jpg +0 -0
  333. data/spec/models/cmor/blog/post_spec.rb +55 -0
  334. data/spec/models/generic_spec.rb +50 -0
  335. data/spec/models/i18n_spec.rb +41 -0
  336. data/spec/rails_helper.rb +62 -0
  337. data/spec/spec_helper.rb +98 -0
  338. data/spec/support/capybara.rb +1 -0
  339. data/spec/support/factory_bot.rb +9 -0
  340. data/spec/support/rao-shoulda_matchers.rb +5 -0
  341. metadata +760 -0
@@ -0,0 +1,3 @@
1
+ = render_navigation do |primary|
2
+ - posts_by_month.sort.reverse.each do |month, posts|
3
+ - primary.item "posts_for_#{month}", "#{I18n.l(month, format: '%B %Y')} (#{posts.size})", cmor_blog.month_posts_path(year: month.year, month: month.month)
@@ -0,0 +1,36 @@
1
+ %div{ id: dom_id(post), class: dom_class(post) }
2
+ %h1.post-title
3
+ = link_to(post.title, cmor_blog.url_for(post))
4
+ %small
5
+ %span.post-creation-information.text-muted
6
+ = "#{l(post.created_at)} | #{post.creator.send(Cmor::Blog::Configuration.creator_label_method_name)}"
7
+ - if Cmor::Blog.features?(:cmor_comments)
8
+ |
9
+ %span.comments-information
10
+ = link_to(t('cmor.comments.commentable.comments_information', comments_count: post.comments.count), cmor_blog.post_url(post, anchor: 'comments'))
11
+ - if Cmor::Blog.features?(:cmor_tags)
12
+ |
13
+ %span.post-tags
14
+ = tag_labels_for(post)
15
+
16
+ %p.post-body= post.body(format: :html).html_safe
17
+
18
+ - if post.asset_details.images.any?
19
+ .row
20
+ - post.asset_details.images.order(position: :asc).each do |picture_detail|
21
+ .col-lg-4.d-flex.align-items-stretch
22
+ .card.text-center.border-0
23
+ %a{ href: main_app.url_for(picture_detail.asset), data: { gallery: dom_id(post) } }
24
+ %img{ src: main_app.url_for(picture_detail.asset.variant(Cmor::Blog::Configuration.preview_picture_asset_variant_options)) }
25
+ .card-body
26
+ %h5.card-title
27
+ = picture_detail.title
28
+ %p.card-text
29
+ = picture_detail.description
30
+
31
+ - if post.asset_details.non_images.any?
32
+ = collection_table(collection: post.asset_details.non_images.order(position: :asc)) do |t|
33
+ = t.column :filename
34
+ = t.column :actions do |resource|
35
+ - link_to(main_app.url_for(resource.asset), class: 'btn btn-primary') do
36
+ - t('.download')
@@ -0,0 +1,18 @@
1
+ %div{ id: dom_id(post), class: "row #{dom_class(post)} bottom-margin-5 mb-4" }
2
+ .col-lg-12
3
+ %h2.post-title
4
+ = link_to(post.title, cmor_blog.url_for(post))
5
+ %small
6
+ %span.post-creation-information.text-muted
7
+ = "#{l(post.created_at)} | #{post.creator.send(Cmor::Blog::Configuration.creator_label_method_name)}"
8
+ - if Cmor::Blog.features?(:cmor_comments)
9
+ |
10
+ %span.comments-information
11
+ = link_to(t('cmor.comments.commentable.comments_information', comments_count: post.comments.count), cmor_blog.post_url(post, anchor: 'comments'))
12
+ - if Cmor::Blog.features?(:cmor_tags)
13
+ |
14
+ %span.post-tags
15
+ = tag_labels_for(post)
16
+
17
+ .post-body.truncate-lines-3
18
+ = post.body(format: :html).html_safe
@@ -0,0 +1,20 @@
1
+ %div{ id: dom_id(post), class: "row #{dom_class(post)} bottom-margin-5 mb-4" }
2
+ .col-lg-4
3
+ = image_tag(main_app.url_for(post.preview_picture.asset.variant(Cmor::Blog::Configuration.preview_picture_asset_variant_options)), class: 'img-fluid')
4
+ .col-lg-8
5
+ %h2.post-title
6
+ = link_to(post.title, cmor_blog.url_for(post))
7
+ %small
8
+ %span.post-creation-information.text-muted
9
+ = "#{l(post.created_at)} | #{post.creator.send(Cmor::Blog::Configuration.creator_label_method_name)}"
10
+ - if Cmor::Blog.features?(:cmor_comments)
11
+ |
12
+ %span.comments-information
13
+ = link_to(t('cmor.comments.commentable.comments_information', comments_count: post.comments.count), cmor_blog.post_url(post, anchor: 'comments'))
14
+ - if Cmor::Blog.features?(:cmor_tags)
15
+ |
16
+ %span.post-tags
17
+ = tag_labels_for(post)
18
+
19
+ .post-body.truncate-lines-3
20
+ = post.body(format: :html).html_safe
@@ -0,0 +1,11 @@
1
+ %h1#page-title= Cmor::Blog::Configuration.posts_index_page_title_proc.call(self)
2
+
3
+ - @collection.each do |resource|
4
+ - if resource.preview_picture.present?
5
+ = render partial: "post_in_index_with_preview_picture", locals: { post: resource }
6
+ - else
7
+ = render partial: "post_in_index", locals: { post: resource }
8
+
9
+ .row
10
+ .col-lg-12.text-center
11
+ = paginate(@collection, Cmor::Blog::Configuration.pagination_options_proc.call(self))
@@ -0,0 +1,4 @@
1
+ = render @resource
2
+
3
+ - if Cmor::Blog.features?(:cmor_comments)
4
+ = commentable(@resource)
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Blog</title>
5
+ <%= stylesheet_link_tag "cmor/blog/application", media: "all" %>
6
+ <%= javascript_include_tag "cmor/blog/application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,46 @@
1
+ de:
2
+ classes:
3
+ cmor/blog/engine: Blog
4
+ activerecord:
5
+ models:
6
+ cmor/blog/post:
7
+ one: Post
8
+ other: Posts
9
+ cmor/blog/asset_detail:
10
+ one: Anhang
11
+ other: Anhänge
12
+ attributes:
13
+ cmor/blog/post:
14
+ id: ID
15
+ assets: Anhänge
16
+ asset_details_count: Anhänge
17
+ title: Titel
18
+ tags: Tags
19
+ body: Inhalt
20
+ position: Position
21
+ published: Veröffentlicht
22
+ published_at: Veröffentlicht am
23
+ created_by_id: Erstellt von
24
+ creator: Erstellt von
25
+ slug: Freundliche ID
26
+ updated_by_id: Aktualisiert von
27
+ updater: Aktualisiert von
28
+ created_at: Erstellt am
29
+ updated_at: Aktualisiert am
30
+ cmor/blog/asset_detail:
31
+ id: ID
32
+ post: Post
33
+ post_id: Post
34
+ asset: Datei
35
+ asset_id: Datei
36
+ asset_actions: ''
37
+ description: Beschreibung
38
+ filename: Dateiname
39
+ title: Titel
40
+ preview_picture: Vorschau
41
+ position: Position
42
+ published_at: Veröffentlicht am
43
+ created_at: Erstellt am
44
+ updated_at: Aktualisiert am
45
+ routes:
46
+ cmor_blog_engine: blog
@@ -0,0 +1,46 @@
1
+ en:
2
+ classes:
3
+ cmor/blog/engine: Blog
4
+ activerecord:
5
+ models:
6
+ cmor/blog/post:
7
+ one: Post
8
+ other: Posts
9
+ cmor/blog/asset_detail:
10
+ one: Asset
11
+ other: Assets
12
+ attributes:
13
+ cmor/blog/post:
14
+ id: ID
15
+ assets: Asset
16
+ asset_details_count: Assets
17
+ title: Title
18
+ tags: Tags
19
+ body: Body
20
+ position: Position
21
+ published: Published
22
+ published_at: Published at
23
+ created_by_id: Created by
24
+ creator: Created by
25
+ slug: Slug
26
+ updated_by_id: Updated by
27
+ updater: Updated by
28
+ created_at: Created at
29
+ updated_at: Updated at
30
+ cmor/blog/asset_detail:
31
+ id: ID
32
+ post: Post
33
+ post_id: Post
34
+ asset: File
35
+ asset_id: File
36
+ asset_actions: ''
37
+ description: Description
38
+ filename: Filename
39
+ title: Title
40
+ preview_picture: Preview
41
+ position: Position
42
+ published_at: Published at
43
+ created_at: Created at
44
+ updated_at: Updated at
45
+ routes:
46
+ cmor_blog_engine: blog
data/config/routes.rb ADDED
@@ -0,0 +1,14 @@
1
+ Cmor::Blog::Engine.routes.draw do
2
+ localized do
3
+ scope :cmor_blog_engine do
4
+ resources :posts, only: [:index, :show] do
5
+ get 'page/:page', action: :index, on: :collection
6
+ get ':year/:month/:day', action: :index, on: :collection, constraints: { year: /\d+/, month: /\d+/, day: /\d+/ }, as: :day
7
+ get ':year/:month', action: :index, on: :collection, constraints: { year: /\d+/, month: /\d+/ }, as: :month
8
+ get ':year', action: :index, on: :collection, constraints: { year: /\d+/ }, as: :year
9
+ end
10
+
11
+ root to: 'posts#index'
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,17 @@
1
+ class CreateCmorBlogPosts < ActiveRecord::Migration[4.2]
2
+ def change
3
+ create_table :cmor_blog_posts do |t|
4
+ t.string :title
5
+ t.text :body
6
+ t.timestamp :published_at
7
+ t.integer :created_by_id
8
+ t.integer :updated_by_id
9
+ t.string :slug
10
+ t.integer :position
11
+
12
+ t.timestamps null: false
13
+
14
+ t.index :slug, unique: true
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,14 @@
1
+ class CreateCmorBlogAssetDetails < ActiveRecord::Migration[5.2]
2
+ def change
3
+ create_table :cmor_blog_asset_details do |t|
4
+ t.references :post
5
+ t.references :asset
6
+ t.string :title
7
+ t.text :description
8
+ t.integer :position
9
+ t.timestamp :published_at
10
+
11
+ t.timestamps
12
+ end
13
+ end
14
+ end
data/lib/cmor/blog.rb ADDED
@@ -0,0 +1,12 @@
1
+ require 'cmor/blog/feature'
2
+ require 'cmor/blog/configuration'
3
+ require 'cmor/blog/engine'
4
+
5
+
6
+ module Cmor
7
+ module Blog
8
+ extend Configuration
9
+ end
10
+ end
11
+
12
+ Cmor.configure { |c| c.register_configuration(:blog, Cmor::Blog) }
@@ -0,0 +1,29 @@
1
+ require 'active_support/core_ext/module/delegation'
2
+ require 'active_support/core_ext/module/attribute_accessors'
3
+ require 'active_support/hash_with_indifferent_access'
4
+
5
+ module Cmor
6
+ module Blog
7
+ module Configuration
8
+ def configure
9
+ yield self
10
+ end
11
+
12
+ mattr_accessor(:base_controller) { '::FrontendController' }
13
+ mattr_accessor(:creator_class_name) { 'User' }
14
+ mattr_accessor(:user_factory_name) { :user }
15
+ mattr_accessor(:posts_index_page_title_proc) { ->(view) { view.resource_class.model_name.human(count: :other) } }
16
+ mattr_accessor(:pagination_options_proc) { ->(view) { { theme: 'twitter-bootstrap-3' } } }
17
+ mattr_accessor(:preview_picture_asset_variant_options) { { resize: '320x240' } }
18
+ mattr_accessor(:creator_label_method_name) { :to_s }
19
+ mattr_accessor(:features) { {} }
20
+ def enable_feature(name, options = {})
21
+ @@features[name] = Cmor::Blog::Feature.new(name, options)
22
+ end
23
+
24
+ def features?(name)
25
+ @@features.has_key?(name)
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,7 @@
1
+ module Cmor
2
+ module Blog
3
+ class Engine < ::Rails::Engine
4
+ isolate_namespace Cmor::Blog
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,9 @@
1
+ module Cmor
2
+ module Blog
3
+ class Feature
4
+ def initialize(name, options = {})
5
+ @name, @options = name, options
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,7 @@
1
+ require 'cmor/version'
2
+
3
+ module Cmor
4
+ module Blog
5
+ VERSION = ::Cmor::VERSION
6
+ end
7
+ end
data/lib/cmor_blog.rb ADDED
@@ -0,0 +1,10 @@
1
+ require 'cmor_core'
2
+ require 'acts_as_list'
3
+ require 'acts_as_published'
4
+ require 'friendly_id'
5
+ require 'haml-rails'
6
+ require 'kramdown'
7
+ require 'rails-i18n'
8
+ require 'rao-resources_controller'
9
+
10
+ require 'cmor/blog'
@@ -0,0 +1,30 @@
1
+ module Cmor
2
+ module Blog
3
+ module Generators
4
+ class InstallGenerator < Rails::Generators::Base
5
+ desc 'Generates the initializer'
6
+
7
+ source_root File.expand_path('../templates', __FILE__)
8
+
9
+ attr_reader :base_controller_class_name
10
+ attr_reader :user_factory_name
11
+ attr_reader :creator_class_name
12
+
13
+ def initialize(*args)
14
+ super
15
+ @base_controller_class_name = ENV.fetch('BASE_CONTROLLER_CLASS_NAME') { '::ApplicationController' }
16
+ @user_factory_name = ENV.fetch('CMOR_BLOG_USER_FACTORY_NAME') { 'user' }
17
+ @creator_class_name = ENV.fetch('CMOR_BLOG_CREATOR_CLASS_NAME') { 'User' }
18
+ end
19
+
20
+ def generate_initializer
21
+ template 'initializer.rb', 'config/initializers/cmor_blog.rb'
22
+ end
23
+
24
+ def generate_routes
25
+ route File.read(File.join(File.expand_path('../templates', __FILE__), 'routes.source'))
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,62 @@
1
+ Cmor::Blog.configure do |config|
2
+ # Set the base controller for the page controller
3
+ #
4
+ # Default: config.base_controller = '<%= base_controller_class_name %>'
5
+ #
6
+ config.base_controller = '<%= base_controller_class_name %>'
7
+
8
+ # Class to use for creators and updaters.
9
+ #
10
+ # default: config.creator_class_name = '<%= creator_class_name %>'
11
+ #
12
+ config.creator_class_name = '<%= creator_class_name %>'
13
+
14
+ # Factory name to use for creators and updaters.
15
+ #
16
+ # default: config.user_factory_name = '<%= user_factory_name %>'
17
+ #
18
+ config.user_factory_name = '<%= user_factory_name %>'
19
+
20
+ # Set the page title for the posts index page. Useful for when you use
21
+ # the blog posts index as main app root page.
22
+ #
23
+ # example: config.posts_index_page_title_proc = ->(view) { view.t('.welcome') }
24
+ #
25
+ # default: config.posts_index_page_title_proc = ->(view) { view.resource_class.model_name.human(count: :other) }
26
+ #
27
+ config.posts_index_page_title_proc = ->(view) { view.resource_class.model_name.human(count: :other) }
28
+
29
+ # Set options that will be passed to the paginate call.
30
+ #
31
+ # example for bootstrap 3 (You will need to add the bootstrap3-kaminari-views gem to your Gemfile):
32
+ #
33
+ # config.pagination_options_proc = ->(view) { { theme: 'twitter-bootstrap-3' }
34
+ #
35
+ # example for bootstrap 4 (You will need to add the bootstrap4-kaminari-views gem to your Gemfile):
36
+ #
37
+ # config.pagination_options_proc = ->(view) { { theme: 'twitter-bootstrap-4' }
38
+ #
39
+ # default: config.pagination_options_proc = ->(view) { { theme: 'twitter-bootstrap-4', pagination_class: 'justify-content-center' } }
40
+ #
41
+ config.pagination_options_proc = ->(view) { { theme: 'twitter-bootstrap-4', pagination_class: 'justify-content-center' } }
42
+
43
+ # ActiveStorage options for rendering preview pictures in the posts index and show view.
44
+ #
45
+ # Default: config.preview_picture_asset_variant_options = { resize: '320x240' }
46
+ #
47
+ config.preview_picture_asset_variant_options = { resize: '320x240' }
48
+
49
+ # Enables the Cmor::Comments integration
50
+ #
51
+ # config.enable_feature :cmor_comments, {}
52
+
53
+ # Enables the Cmor::Tags integration
54
+ #
55
+ # config.enable_feature :cmor_tags, {}
56
+
57
+ # Method to call on creator for display.
58
+ #
59
+ # default: config.creator_label_method_name = :to_s
60
+ #
61
+ config.creator_label_method_name = :to_s
62
+ end