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
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 5c3d92d45643ee2e89e83e03a0b692100093c5f09525f967a8fa7b0d2935f9a2
4
+ data.tar.gz: 02aa2c41959fdafef3c11bbdb53a0958501c2ef2a814683f4ffbcf601eccc32f
5
+ SHA512:
6
+ metadata.gz: fd024ffa9bda9aeada4cc526d26a7b091216b9fb8cf04e4634086200f266143bfd734224c73db46fbf2213db322656d6563d832c2c054dc90c0c0b0729798036
7
+ data.tar.gz: 96e2437431bd99d01ef9c12448be1b12fb7545fca3921f88364c25e913ea2be5b42033ddbedb9619bd5df550c15b5576d9f2b6bb24b3f967f478ae26b4f11085
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2016 Roberto Vasquez Angel
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,19 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'Cmor::Blog'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.rdoc')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+ Bundler::GemHelper.install_tasks
18
+
19
+ require 'rails/dummy/tasks'
@@ -0,0 +1,13 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require_tree .
@@ -0,0 +1,14 @@
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 any plugin's vendor/assets/stylesheets directory 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 bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
+ * files in this directory. It is generally better to create a new file per style scope.
11
+ *
12
+ *= require_tree .
13
+ *= require_self
14
+ */
@@ -0,0 +1,6 @@
1
+ module Cmor
2
+ module Blog
3
+ class ApplicationController < ActionController::Base
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,32 @@
1
+ module Cmor
2
+ module Blog
3
+ class PostsController < Cmor::Blog::Configuration.base_controller.constantize
4
+ include Rao::ResourcesController::ResourcesConcern
5
+ include Rao::ResourcesController::ResourceInflectionsConcern
6
+ include Rao::ResourcesController::RestResourceUrlsConcern
7
+ include Rao::ResourcesController::RestActionsConcern
8
+ include Rao::ResourcesController::KaminariConcern
9
+ include Rao::ResourcesController::LocationHistoryConcern
10
+
11
+ helper Cmor::Comments::ApplicationHelper if Cmor::Blog.features?(:cmor_comments)
12
+
13
+ def self.resource_class
14
+ Cmor::Blog::Post
15
+ end
16
+
17
+ private
18
+
19
+ def load_collection_scope
20
+ if params.has_key?(:year)
21
+ super.published.for_date(params[:year], params[:month], params[:day])
22
+ else
23
+ super.published
24
+ end
25
+ end
26
+
27
+ def load_resource_scope
28
+ super.published.friendly
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,28 @@
1
+ module Cmor
2
+ module Blog
3
+ module ApplicationHelper
4
+ # Prerequisites:
5
+ #
6
+ # You have to add the simple-navigation gem to your Gemfile:
7
+ #
8
+ # # Gemfile
9
+ # gem 'simple-navigation'
10
+ #
11
+ # Usage:
12
+ #
13
+ # # app/controllers/application_controller.rb
14
+ # class ApplicationController < ActionController::Base
15
+ # helper Cmor::Blog::ApplicationHelper
16
+ # end
17
+ #
18
+ # # app/views/layouts/application.html.haml
19
+ # = blog_render_monthly_navigation if controller.class.name.deconstantize == 'Cmor::Blog'
20
+ #
21
+ def blog_render_monthly_navigation
22
+ posts = Cmor::Blog::Post.published.all.pluck(:created_at)
23
+ posts_by_month = posts.group_by {|t| t.beginning_of_month }
24
+ render partial: 'cmor/blog/posts/monthly_navigation', locals: { posts_by_month: posts_by_month}
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,19 @@
1
+ module Cmor::Blog
2
+ class AssetDetail < ApplicationRecord
3
+ belongs_to :post
4
+ belongs_to :asset, class_name: 'ActiveStorage::Attachment', dependent: :destroy
5
+
6
+ acts_as_list scope: :post_id
7
+
8
+ scope :images, -> { joins(asset: [:blob]).where("active_storage_blobs.content_type LIKE '%image/%'") }
9
+ scope :non_images, -> { joins(asset: [:blob]).where("active_storage_blobs.content_type NOT LIKE '%image/%'") }
10
+
11
+ def filename
12
+ asset.blob.filename
13
+ end
14
+
15
+ def human
16
+ filename
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,117 @@
1
+ module Cmor
2
+ module Blog
3
+ class Post < ActiveRecord::Base
4
+ include Model::Cmor::Comments::CommentableConcern if Cmor::Blog.features?(:cmor_comments)
5
+ include Model::Cmor::Tags::TaggableConcern if Cmor::Blog.features?(:cmor_tags)
6
+
7
+ # publishing
8
+ include ActsAsPublished::ActiveRecord
9
+ acts_as_published
10
+
11
+ # positioning
12
+ acts_as_list
13
+ default_scope { order(position: :desc) }
14
+
15
+ # assets
16
+ has_many_attached :assets if respond_to?(:has_many_attached)
17
+
18
+ # slugs
19
+ extend FriendlyId
20
+ friendly_id :title, use: :slugged
21
+
22
+ belongs_to :creator, class_name: Cmor::Blog.creator_class_name, foreign_key: 'created_by_id'
23
+ belongs_to :updater, class_name: Cmor::Blog.creator_class_name, foreign_key: 'updated_by_id', optional: true
24
+
25
+ scope :for_date, ->(year, month, day) { where(created_at: "#{year}-#{month || 1}-#{day || 1}".to_date.beginning_of_month.."#{year}-#{month || 1}-#{day || 1}".to_date.end_of_month) }
26
+
27
+ def human
28
+ title
29
+ end
30
+
31
+ module Markdown
32
+ def body(format: nil)
33
+ case format
34
+ when :html
35
+ to_markdown(read_attribute(:body))
36
+ else
37
+ read_attribute(:body)
38
+ end
39
+ end
40
+
41
+ private
42
+
43
+ def to_markdown(string)
44
+ Kramdown::Document.new(string).to_html
45
+ end
46
+ end
47
+
48
+ include Markdown
49
+
50
+ module AssetDetailsConcern
51
+ extend ActiveSupport::Concern
52
+
53
+ included do
54
+ has_many :asset_details, inverse_of: :post, dependent: :destroy, autosave: true
55
+ before_validation :cleanup_orphaned_asset_details
56
+ before_validation :ensure_asset_details
57
+ end
58
+
59
+ def asset_details_count
60
+ asset_details.count
61
+ end
62
+
63
+ def append_assets
64
+ assets
65
+ end
66
+
67
+ def append_assets=(assets)
68
+ if Rails.version < '6.0.0'
69
+ self.assets = assets
70
+ else
71
+ self.assets.attach(assets)
72
+ end
73
+ end
74
+
75
+ def overwrite_assets
76
+ assets
77
+ end
78
+
79
+ def overwrite_assets=(assets)
80
+ return if assets.nil? || assets.empty?
81
+ self.asset_details.map { |ad| ad.mark_for_destruction }
82
+ self.assets = assets
83
+ end
84
+
85
+ private
86
+
87
+ def cleanup_orphaned_asset_details
88
+ asset_details.each do |asset_detail|
89
+ asset_detail.destroy if asset_detail.asset.nil?
90
+ end
91
+ end
92
+
93
+ def ensure_asset_details
94
+ (assets - asset_details.all.map(&:asset)).map do |asset|
95
+ build_asset_detail_for_asset(asset)
96
+ end
97
+ end
98
+
99
+ def build_asset_detail_for_asset(asset)
100
+ asset_details.build(asset: asset)
101
+ end
102
+ end
103
+
104
+ include AssetDetailsConcern if respond_to?(:has_many_attached)
105
+
106
+ module PreviewPictureConcern
107
+ extend ActiveSupport::Concern
108
+
109
+ def preview_picture
110
+ asset_details.images.first
111
+ end
112
+ end
113
+
114
+ include PreviewPictureConcern
115
+ end
116
+ end
117
+ end
@@ -0,0 +1,8 @@
1
+ module Cmor
2
+ module Blog
3
+ class ApplicationService < Rails::AddOns::Service::Base
4
+ class Result < Rails::AddOns::Service::Result::Base
5
+ end
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,147 @@
1
+ require 'csv'
2
+
3
+ module Cmor
4
+ module Blog
5
+ # Example:
6
+ #
7
+ # You selected joomla posts from your database like this:
8
+ #
9
+ # SELECT joomla_content.title, joomla_content.fulltext, joomla_content.created, joomla_content.modified, joomla_users.email
10
+ # FROM joomla_content, joomla_users
11
+ # where created_by = joomla_users.id;
12
+ #
13
+ # And exported the data into a csv file like this:
14
+ #
15
+ # # tmp/old_posts.csv
16
+ # title;fulltext;created;modified;email
17
+ # "My first Post";"This is the body";"2013-02-12 14:22:23";"2013-02-12 21:58:54";john.doe@example.com
18
+ #
19
+ # You can import this csv file from the rails console:
20
+ #
21
+ # # rails console
22
+ # Cmor::Blog::ImportPostsService.call({ filename: 'tmp/old_posts.csv', column_map: :joomla, body_source_format: :html }, autosave: true)
23
+ #
24
+ class ImportPostsService < ApplicationService
25
+ class Result < ApplicationService::Result
26
+ attr_accessor :filename, :column_map, :body_source_format, :csv_data, :posts
27
+ end
28
+
29
+ COLUMN_MAPS = {
30
+ joomla: {
31
+ title: :title,
32
+ body: :fulltext,
33
+ created_at: :created,
34
+ updated_at: :modified,
35
+ # published_at: ->(row) { Time.zone.now },
36
+ published_at: :created,
37
+ creator_email: :email
38
+ }
39
+ }
40
+
41
+ def self.column_maps
42
+ COLUMN_MAPS
43
+ end
44
+
45
+ BODY_SOURCE_FORMATS = [:markdown, :html]
46
+
47
+ def self.body_source_formats
48
+ BODY_SOURCE_FORMATS
49
+ end
50
+
51
+ attr_accessor :filename, :column_map, :body_source_format
52
+
53
+ validates :filename, presence: true
54
+ validates :column_map, presence: true, inclusion: column_maps.keys
55
+ validates :body_source_format, presence: true, inclusion: body_source_formats
56
+
57
+ private
58
+
59
+ def after_initialize
60
+ @creators = {}
61
+ @body_source_format ||= :markdown
62
+ end
63
+
64
+ def _perform
65
+ @csv_data = load_csv_data!
66
+ @posts = build_posts!
67
+
68
+ ActiveRecord::Base.transaction { @posts.map(&:save!) } if autosave?
69
+
70
+ @result.csv_data = @csv_data
71
+ @result.posts = @posts
72
+ @result.filename = @filename
73
+ @result.column_map = @column_map
74
+ @result.body_source_format = @body_source_format
75
+ end
76
+
77
+ def load_csv_data!
78
+ CSV.read(@filename, csv_options)
79
+ end
80
+
81
+ def csv_options
82
+ { col_sep: ';', headers: true }
83
+ end
84
+
85
+ def build_posts!
86
+ say "Building posts" do
87
+ @csv_data.each_with_index.collect do |row, index|
88
+ build_post(row, index)
89
+ end
90
+ end
91
+ end
92
+
93
+ def build_post(row, index)
94
+ say "Building post [#{index}]" do
95
+ attrs = build_post_attributes(row.to_h)
96
+ Cmor::Blog::Post.new(attrs)
97
+ end
98
+ end
99
+
100
+ def build_post_attributes(row)
101
+ attrs = column_mapping.each_with_object({}) do |(post_attribute_name, value_key_or_proc), result|
102
+ result[post_attribute_name] = case value_key_or_proc
103
+ when Symbol, String
104
+ row[value_key_or_proc.to_s]
105
+ when Proc
106
+ value_key_or_proc.call(row)
107
+ else
108
+ nil
109
+ end
110
+ end
111
+ attrs[:creator] = load_creator(attrs.delete(:creator_email))
112
+ attrs[:body] = transform_body(attrs.delete(:body) || '') unless @body_source_format == :markdown
113
+ attrs
114
+ end
115
+
116
+ def column_maps
117
+ self.class.column_maps
118
+ end
119
+
120
+ def column_mapping
121
+ column_maps[@column_map]
122
+ end
123
+
124
+ def post_attribute_for_imported_key(key)
125
+ column_mapping.invert[key.to_sym]
126
+ end
127
+
128
+ def load_creator(email)
129
+ creator = Cmor::Blog::Configuration.creator_class_name.constantize.where(email: email).first_or_initialize { |u| u.password = u.password_confirmation = SecureRandom.uuid }
130
+ if creator.persisted?
131
+ @creators[email] ||= creator
132
+ else
133
+ creator
134
+ end
135
+ end
136
+
137
+ def transform_body(body)
138
+ case @body_source_format
139
+ when :html
140
+ HTMLPage.new(contents: body).markdown
141
+ else
142
+ body
143
+ end
144
+ end
145
+ end
146
+ end
147
+ end