cmor_testimonials 0.0.8.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (277) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +43 -0
  4. data/Rakefile +26 -0
  5. data/app/assets/javascripts/cmor/testimonials/application/keep.js +0 -0
  6. data/app/assets/javascripts/cmor/testimonials/application.js +3 -0
  7. data/app/assets/javascripts/cmor_testimonials.js +2 -0
  8. data/app/assets/stylesheets/cmor/testimonials/application/carousel.css +15 -0
  9. data/app/assets/stylesheets/cmor/testimonials/application.css +3 -0
  10. data/app/assets/stylesheets/cmor_testimonials.css +3 -0
  11. data/app/models/cmor/testimonials/application_record.rb +7 -0
  12. data/app/models/cmor/testimonials/category.rb +15 -0
  13. data/app/models/cmor/testimonials/testimonial.rb +19 -0
  14. data/app/view_helpers/cmor/testimonials/application_view_helper.rb +32 -0
  15. data/app/views/cmor/testimonials/application_view_helper/_render_category.html.haml +28 -0
  16. data/app/views/components/cmor/testimonials/_testimonials_box.html.erb +38 -0
  17. data/config/initializers/assets.rb +1 -0
  18. data/config/locales/de.yml +40 -0
  19. data/config/locales/en.yml +40 -0
  20. data/config/routes.rb +6 -0
  21. data/db/migrate/20190401160025_create_cmor_testimonials_categories.rb +11 -0
  22. data/db/migrate/20190401204002_create_cmor_testimonials_testimonials.rb +15 -0
  23. data/lib/cmor/testimonials/configuration.rb +15 -0
  24. data/lib/cmor/testimonials/engine.rb +14 -0
  25. data/lib/cmor/testimonials/version.rb +8 -0
  26. data/lib/cmor/testimonials.rb +14 -0
  27. data/lib/cmor_testimonials.rb +10 -0
  28. data/lib/generators/cmor/testimonials/install/install_generator.rb +15 -0
  29. data/lib/generators/cmor/testimonials/install/templates/initializer.rb +10 -0
  30. data/spec/dummy/Rakefile +6 -0
  31. data/spec/dummy/app/assets/config/manifest.js +3 -0
  32. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  33. data/spec/dummy/app/assets/javascripts/cable.js +13 -0
  34. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  35. data/spec/dummy/app/channels/application_cable/channel.rb +4 -0
  36. data/spec/dummy/app/channels/application_cable/connection.rb +4 -0
  37. data/spec/dummy/app/controllers/application_controller.rb +2 -0
  38. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  39. data/spec/dummy/app/jobs/application_job.rb +2 -0
  40. data/spec/dummy/app/mailers/application_mailer.rb +4 -0
  41. data/spec/dummy/app/models/application_record.rb +3 -0
  42. data/spec/dummy/app/views/layouts/application.html.erb +15 -0
  43. data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
  44. data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
  45. data/spec/dummy/bin/bundle +3 -0
  46. data/spec/dummy/bin/rails +4 -0
  47. data/spec/dummy/bin/rake +4 -0
  48. data/spec/dummy/bin/setup +36 -0
  49. data/spec/dummy/bin/update +31 -0
  50. data/spec/dummy/bin/yarn +11 -0
  51. data/spec/dummy/config/application.rb +31 -0
  52. data/spec/dummy/config/boot.rb +5 -0
  53. data/spec/dummy/config/cable.yml +10 -0
  54. data/spec/dummy/config/database.yml +25 -0
  55. data/spec/dummy/config/environment.rb +5 -0
  56. data/spec/dummy/config/environments/development.rb +61 -0
  57. data/spec/dummy/config/environments/production.rb +94 -0
  58. data/spec/dummy/config/environments/test.rb +46 -0
  59. data/spec/dummy/config/initializers/application_controller_renderer.rb +8 -0
  60. data/spec/dummy/config/initializers/assets.rb +14 -0
  61. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  62. data/spec/dummy/config/initializers/cmor_testimonials.rb +10 -0
  63. data/spec/dummy/config/initializers/content_security_policy.rb +25 -0
  64. data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
  65. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  66. data/spec/dummy/config/initializers/i18n.rb +2 -0
  67. data/spec/dummy/config/initializers/inflections.rb +16 -0
  68. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  69. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  70. data/spec/dummy/config/locales/en.yml +33 -0
  71. data/spec/dummy/config/puma.rb +34 -0
  72. data/spec/dummy/config/routes.rb +3 -0
  73. data/spec/dummy/config/spring.rb +6 -0
  74. data/spec/dummy/config/storage.yml +34 -0
  75. data/spec/dummy/config.ru +5 -0
  76. data/spec/dummy/db/development.sqlite3 +0 -0
  77. data/spec/dummy/db/migrate/20190415205541_create_active_storage_tables.active_storage.rb +27 -0
  78. data/spec/dummy/db/migrate/20190415205602_create_cmor_testimonials_categories.cmor_testimonials.rb +12 -0
  79. data/spec/dummy/db/migrate/20190415205603_create_cmor_testimonials_testimonials.cmor_testimonials.rb +16 -0
  80. data/spec/dummy/db/schema.rb +57 -0
  81. data/spec/dummy/db/test.sqlite3 +0 -0
  82. data/spec/dummy/log/development.log +126 -0
  83. data/spec/dummy/log/test.log +5788 -0
  84. data/spec/dummy/package.json +5 -0
  85. data/spec/dummy/public/404.html +67 -0
  86. data/spec/dummy/public/422.html +67 -0
  87. data/spec/dummy/public/500.html +66 -0
  88. data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
  89. data/spec/dummy/public/apple-touch-icon.png +0 -0
  90. data/spec/dummy/public/favicon.ico +0 -0
  91. data/spec/dummy/tmp/development_secret.txt +1 -0
  92. data/spec/dummy/tmp/storage/1N/J1/1NJ18sJCuUdBZUpdetYFuApY +0 -0
  93. data/spec/dummy/tmp/storage/28/gQ/28gQnjRT2t8msWxRpDP2KYka +0 -0
  94. data/spec/dummy/tmp/storage/2g/2b/2g2bbFxmaR22MMSM3fLN5nDB +0 -0
  95. data/spec/dummy/tmp/storage/2z/C3/2zC3mPmFoKDmQ5trvB3LzMr2 +0 -0
  96. data/spec/dummy/tmp/storage/33/7Z/337ZxQUr2SKGSfeVAJrfpf87 +0 -0
  97. data/spec/dummy/tmp/storage/3E/Y4/3EY4WEugSL5TSB5VuYD8eRAT +0 -0
  98. data/spec/dummy/tmp/storage/3e/iV/3eiVkLD4hH5T6qUKRCZvTJqj +0 -0
  99. data/spec/dummy/tmp/storage/4D/PM/4DPMqsHXexYKZbeWhK7wts93 +0 -0
  100. data/spec/dummy/tmp/storage/4v/zD/4vzDmubfGftBhYJUwMMWg12j +0 -0
  101. data/spec/dummy/tmp/storage/5X/vf/5XvfWJP5cF9uBo6iQeYovD64 +0 -0
  102. data/spec/dummy/tmp/storage/5j/mw/5jmwxWBJE7h32iqbTTd3XhYD +0 -0
  103. data/spec/dummy/tmp/storage/5v/km/5vkmp52bMPQR6TapqMe4NUUq +0 -0
  104. data/spec/dummy/tmp/storage/6B/3d/6B3dQ59g6LKxi8gwAct4kpnB +0 -0
  105. data/spec/dummy/tmp/storage/6S/HP/6SHPNswkCu1xDmCuUTPeVshP +0 -0
  106. data/spec/dummy/tmp/storage/6T/mN/6TmNBJMRz59t4Wpp6MamdV6j +0 -0
  107. data/spec/dummy/tmp/storage/6e/Ce/6eCeec45vBj18m9DpFSTtxVp +0 -0
  108. data/spec/dummy/tmp/storage/7L/2i/7L2iUQg5GjWkYAngBFRxs4Pr +0 -0
  109. data/spec/dummy/tmp/storage/7j/2N/7j2NVESwNyS2CoVoo7TABapL +0 -0
  110. data/spec/dummy/tmp/storage/8E/58/8E58jjd2RykiVbuebideURV5 +0 -0
  111. data/spec/dummy/tmp/storage/8M/qj/8MqjcvxpEMNftTZ8WJWMRMeF +0 -0
  112. data/spec/dummy/tmp/storage/8X/eY/8XeYuZFyqLMKrVnppUe7mrHW +0 -0
  113. data/spec/dummy/tmp/storage/8Y/QQ/8YQQ8jL55faAHby7SdgBfEC7 +0 -0
  114. data/spec/dummy/tmp/storage/8k/4g/8k4gZ6CyEkppMaLrwULiVsr9 +0 -0
  115. data/spec/dummy/tmp/storage/9o/Jj/9oJj1wuKPxJtCNqCdjXoZdXZ +0 -0
  116. data/spec/dummy/tmp/storage/A3/82/A382kRCKbYbzhxvfexVmSXCB +0 -0
  117. data/spec/dummy/tmp/storage/AH/GF/AHGFDr7r7RGf6wdUFxDg6hTy +0 -0
  118. data/spec/dummy/tmp/storage/Ab/mc/AbmcZGWMgDKFMJPYbU5jvrJZ +0 -0
  119. data/spec/dummy/tmp/storage/Ah/uE/AhuELtbVMAxbVRVnu98S6skP +0 -0
  120. data/spec/dummy/tmp/storage/Am/Km/AmKmN4qr4npqWZD1r89PMecR +0 -0
  121. data/spec/dummy/tmp/storage/BV/Gn/BVGnH6c7ZCuZwWnkALAM536c +0 -0
  122. data/spec/dummy/tmp/storage/CH/MF/CHMF37WejzzQ2eRqPyaUXwfE +0 -0
  123. data/spec/dummy/tmp/storage/CJ/qh/CJqhj3Tcca4HyM57QJvnNE8g +0 -0
  124. data/spec/dummy/tmp/storage/CZ/3N/CZ3Ni6zNHPa55SD2KbjATiD6 +0 -0
  125. data/spec/dummy/tmp/storage/Cf/FA/CfFAbUZQ98PCuBW7br96ypQ8 +0 -0
  126. data/spec/dummy/tmp/storage/Cs/St/CsStuy4F1sZcyxPuf73hvqYd +0 -0
  127. data/spec/dummy/tmp/storage/Dc/Vw/DcVwrmgibZ5ojXZbHpn2w3HE +0 -0
  128. data/spec/dummy/tmp/storage/Dv/7Y/Dv7YWjAQLYvJg17waUu3mNqr +0 -0
  129. data/spec/dummy/tmp/storage/Dv/T9/DvT9Wd56A83mggFUqbrmrAF5 +0 -0
  130. data/spec/dummy/tmp/storage/E4/Xf/E4XfzSqXPwb7g94y8oDC1eMC +0 -0
  131. data/spec/dummy/tmp/storage/EV/zf/EVzfVEG9Ka1VbDtbBLLCiDfz +0 -0
  132. data/spec/dummy/tmp/storage/EY/hm/EYhmVdjH3nsbv3kCZS6hggoQ +0 -0
  133. data/spec/dummy/tmp/storage/FK/rQ/FKrQmnw46xkdLbgH8rE8vBoj +0 -0
  134. data/spec/dummy/tmp/storage/Fn/Lv/FnLve1mynskdALBgZkWV1ZNm +0 -0
  135. data/spec/dummy/tmp/storage/Fo/u1/Fou1L8eJDZYvmh683iNdXe4Y +0 -0
  136. data/spec/dummy/tmp/storage/Fu/uK/FuuKNdHZ3ykgao7oLmNS2JuN +0 -0
  137. data/spec/dummy/tmp/storage/G5/mG/G5mGAwdc7yZ21GWUcsdAsqoj +0 -0
  138. data/spec/dummy/tmp/storage/GB/ux/GBuxpb2BUbZNdnqUhZN11cQK +0 -0
  139. data/spec/dummy/tmp/storage/GG/Vb/GGVbVHmRdUoCuuHDQ4U4d8Mb +0 -0
  140. data/spec/dummy/tmp/storage/GX/Wg/GXWgmi8qWvZ6s5jCeysSwUvZ +0 -0
  141. data/spec/dummy/tmp/storage/Go/9E/Go9Edk21oD7MHvGhpHPajdWQ +0 -0
  142. data/spec/dummy/tmp/storage/Gv/rA/GvrAR2JKd9ggKVUYaY7ZWLGJ +0 -0
  143. data/spec/dummy/tmp/storage/Gz/Rt/GzRtHKs6FGTNQREWYj6hm5Jx +0 -0
  144. data/spec/dummy/tmp/storage/HA/ad/HAadceL8x7QeVSAAXyV13K31 +0 -0
  145. data/spec/dummy/tmp/storage/Ht/rT/HtrTHcZpQdFL1FAxbtyGu7Jj +0 -0
  146. data/spec/dummy/tmp/storage/Hu/WR/HuWR4aKHgrvbvVSBbdKJorfB +0 -0
  147. data/spec/dummy/tmp/storage/Jg/T1/JgT1p5TdKyYFW8dcWBdL3dV1 +0 -0
  148. data/spec/dummy/tmp/storage/Kb/aP/KbaPW5ozx7Nk617idmScNBr8 +0 -0
  149. data/spec/dummy/tmp/storage/Kv/P9/KvP9Y6REnxN581983YHzTrmC +0 -0
  150. data/spec/dummy/tmp/storage/L4/4W/L44Wh1j35AXpKCWYZ1sAYbAy +0 -0
  151. data/spec/dummy/tmp/storage/Nb/5P/Nb5PhsjATLQ5KJoz3XjWKvPT +0 -0
  152. data/spec/dummy/tmp/storage/Nq/fo/NqfoyBh4a6Axgvx9AMpKZfkj +0 -0
  153. data/spec/dummy/tmp/storage/Nv/RV/NvRVU5TwzuPUULm62fdts4B7 +0 -0
  154. data/spec/dummy/tmp/storage/Nz/RQ/NzRQ6jTV3aX5nC9UEvpoa9ts +0 -0
  155. data/spec/dummy/tmp/storage/P7/Ve/P7Veddvux3Ep5ARb4BoVMFFV +0 -0
  156. data/spec/dummy/tmp/storage/Q1/Bd/Q1BdYGFbvkssCUiGiFtuetBW +0 -0
  157. data/spec/dummy/tmp/storage/Q2/6K/Q26K3FSuoFoHJxLVrjuZucvW +0 -0
  158. data/spec/dummy/tmp/storage/QP/Nd/QPNdrmdF36BeMy8XxvMfh2FH +0 -0
  159. data/spec/dummy/tmp/storage/QW/Jk/QWJk3yUEMwFi463yEudKQXdZ +0 -0
  160. data/spec/dummy/tmp/storage/Qg/fC/QgfCEgcxh6wrKN861f5c4GVM +0 -0
  161. data/spec/dummy/tmp/storage/RP/Er/RPErqWSiDDvr23qBJaimXYqZ +0 -0
  162. data/spec/dummy/tmp/storage/S9/mN/S9mN1BziPheiD5Lgj7a7Jpzc +0 -0
  163. data/spec/dummy/tmp/storage/SP/2e/SP2eX48JMcfGS5pa17vaQVTL +0 -0
  164. data/spec/dummy/tmp/storage/Sd/cU/SdcUaUQ4QUVD5HtDmHkNVknQ +0 -0
  165. data/spec/dummy/tmp/storage/Sm/dg/SmdgcuqQ25U6jKJ2ipRUrytv +0 -0
  166. data/spec/dummy/tmp/storage/T4/DV/T4DVX1Vb6nU3nPvqvqf5JKpT +0 -0
  167. data/spec/dummy/tmp/storage/TF/Eb/TFEbdvcnrPRMH3HBaeD2cN9M +0 -0
  168. data/spec/dummy/tmp/storage/TL/EU/TLEUxrKLUvXkQYLMyim2EVH6 +0 -0
  169. data/spec/dummy/tmp/storage/Uk/xR/UkxRFB89MBAtdFRWdwLv2Q38 +0 -0
  170. data/spec/dummy/tmp/storage/V3/4f/V34fuGsDRXWuRU3T7mFP8Nh9 +0 -0
  171. data/spec/dummy/tmp/storage/V4/6z/V46zZiDDJQHPvGhe6FLBKBou +0 -0
  172. data/spec/dummy/tmp/storage/V8/GR/V8GRXGk3m4oDfQfSCNzLAgXh +0 -0
  173. data/spec/dummy/tmp/storage/VD/ue/VDueDabFWETVvXXrZDqq5ZiL +0 -0
  174. data/spec/dummy/tmp/storage/VJ/zh/VJzhgsiiRt7KkTG3UxrrHcB2 +0 -0
  175. data/spec/dummy/tmp/storage/VR/Kb/VRKbXXKcJLiBU4P9w4sVcQxm +0 -0
  176. data/spec/dummy/tmp/storage/Vx/vF/VxvFvPChdUZgBC3JfdA5nHk3 +0 -0
  177. data/spec/dummy/tmp/storage/WN/Sx/WNSxYiK2ew27nhYjgVBh53M8 +0 -0
  178. data/spec/dummy/tmp/storage/WV/W6/WVW6NjA6XqXxgdJTRtRCjgdK +0 -0
  179. data/spec/dummy/tmp/storage/X2/UC/X2UCDsNop6iAHzYiptaSfj2p +0 -0
  180. data/spec/dummy/tmp/storage/Xb/JH/XbJH1dcmbYbax4hg6yui6r7z +0 -0
  181. data/spec/dummy/tmp/storage/Xe/ik/XeikT9BqMxmUJUuCrNXYmKXt +0 -0
  182. data/spec/dummy/tmp/storage/Xv/FS/XvFSak3xdGprBHGsbb3M2cwe +0 -0
  183. data/spec/dummy/tmp/storage/YF/VG/YFVGXyUZWU54x54wg48uWAJ8 +0 -0
  184. data/spec/dummy/tmp/storage/YZ/ZK/YZZK7iQZBEyuwBXF2ecSabfg +0 -0
  185. data/spec/dummy/tmp/storage/Z6/Rc/Z6RcJouwcgnLmRjUMQJcrjPv +0 -0
  186. data/spec/dummy/tmp/storage/ZQ/cQ/ZQcQLdYFfbgFg45kUwTnsGoK +0 -0
  187. data/spec/dummy/tmp/storage/Zf/U4/ZfU4QKXp7vTdeR7yM2Xsg4vV +0 -0
  188. data/spec/dummy/tmp/storage/Zp/Hs/ZpHsU85zGbJoUA5zGkxyJ6aS +0 -0
  189. data/spec/dummy/tmp/storage/aH/Wd/aHWdKzbeKqYkDjYMGRw4DYZD +0 -0
  190. data/spec/dummy/tmp/storage/aQ/Q7/aQQ7RRLn4HndHMKuWNFVqZNr +0 -0
  191. data/spec/dummy/tmp/storage/ac/qr/acqrA2w4fPoop4HyhnFbbe8S +0 -0
  192. data/spec/dummy/tmp/storage/bU/ch/bUchoBDeJqVd5WtpGE2Eid91 +0 -0
  193. data/spec/dummy/tmp/storage/c9/dG/c9dGzEV2HG4my6giHGZGYg8g +0 -0
  194. data/spec/dummy/tmp/storage/cV/Jz/cVJz12osk5KxZ5CiMRJ9m8hk +0 -0
  195. data/spec/dummy/tmp/storage/cW/xz/cWxznYX1dYQnugur7tbGqfaL +0 -0
  196. data/spec/dummy/tmp/storage/ch/Qq/chQqBWN6f5zHfX49bqoYUU6W +0 -0
  197. data/spec/dummy/tmp/storage/ck/em/ckemF81RCdYCnLQpTtmWkKtY +0 -0
  198. data/spec/dummy/tmp/storage/dQ/mA/dQmAK9oX5PArCqKQUJCuqhHY +0 -0
  199. data/spec/dummy/tmp/storage/dU/zv/dUzvtYqqDKucZxKEziCrkTgG +0 -0
  200. data/spec/dummy/tmp/storage/dh/pB/dhpBoFExucUvNe8fUPoXtUTr +0 -0
  201. data/spec/dummy/tmp/storage/en/X2/enX2XywgRGiCqAHEkJAE396v +0 -0
  202. data/spec/dummy/tmp/storage/et/2N/et2N5EqfhHtKEZqT87mQtePH +0 -0
  203. data/spec/dummy/tmp/storage/ew/LU/ewLUV3HmFHXp5BUjceeGL4s5 +0 -0
  204. data/spec/dummy/tmp/storage/ey/oC/eyoCL8vB7u5KjBE7vWRRFr2X +0 -0
  205. data/spec/dummy/tmp/storage/fJ/LY/fJLYW1KdFxET4e88exNqCAxY +0 -0
  206. data/spec/dummy/tmp/storage/fS/PE/fSPEn86i5iJRoFrdMBebNJCP +0 -0
  207. data/spec/dummy/tmp/storage/fk/K1/fkK1JWQSquvj8ZBXsGD9PWxm +0 -0
  208. data/spec/dummy/tmp/storage/g1/1w/g11wexiyX8u58Mr8ybydWExZ +0 -0
  209. data/spec/dummy/tmp/storage/gp/Bo/gpBoVdnRHKAKqPdDgYsmM8pP +0 -0
  210. data/spec/dummy/tmp/storage/gr/oK/groKuW5zG1FLXZoxEebtoqS8 +0 -0
  211. data/spec/dummy/tmp/storage/hJ/y7/hJy7dMSZsRm9S1GvKv4cucUb +0 -0
  212. data/spec/dummy/tmp/storage/hS/VK/hSVK4BzDTwhCRE4drL7zVxZW +0 -0
  213. data/spec/dummy/tmp/storage/ha/tw/hatwQTQvWjEfRxZYaSGuYGag +0 -0
  214. data/spec/dummy/tmp/storage/iD/tM/iDtMAVLcg9ZKPqezEPw7R9U1 +0 -0
  215. data/spec/dummy/tmp/storage/iQ/kd/iQkdF4Nojc1hdc44nt8XtYCm +0 -0
  216. data/spec/dummy/tmp/storage/iX/xe/iXxesnS6MUEBUjAPDnhtWbAF +0 -0
  217. data/spec/dummy/tmp/storage/ix/cT/ixcT6VaZyxkkRsZJFMkBRAmD +0 -0
  218. data/spec/dummy/tmp/storage/jT/3v/jT3vW7AvqQWiNNbYWFUPa4nX +0 -0
  219. data/spec/dummy/tmp/storage/jd/jv/jdjv65KF93NG11MzUmkb8Wtb +0 -0
  220. data/spec/dummy/tmp/storage/jk/wm/jkwmD4AhC8QD8MfG4jCon7ab +0 -0
  221. data/spec/dummy/tmp/storage/k1/5L/k15LYceG6HzvwVZEnCn81NBe +0 -0
  222. data/spec/dummy/tmp/storage/k9/8X/k98XebZ4ibXgn98z4h7PhLmv +0 -0
  223. data/spec/dummy/tmp/storage/ku/iq/kuiqW8qtCaWzHNJHXkLtjwWv +0 -0
  224. data/spec/dummy/tmp/storage/mF/qV/mFqVRgBeo6AfovyhXXWi3vFQ +0 -0
  225. data/spec/dummy/tmp/storage/ma/NR/maNRntCu7HjFYgJYhyNtrdmf +0 -0
  226. data/spec/dummy/tmp/storage/nf/GK/nfGKpHEoB6M1189h99yy8aa7 +0 -0
  227. data/spec/dummy/tmp/storage/nk/8C/nk8CDdAP24BuNwTkGEDpdQhd +0 -0
  228. data/spec/dummy/tmp/storage/no/wA/nowATDmNWTXvpaL3W2bAKsc4 +0 -0
  229. data/spec/dummy/tmp/storage/p1/at/p1atybsHpJRqYoESYPsohx6F +0 -0
  230. data/spec/dummy/tmp/storage/pX/ey/pXeysMBPTttZXDNECfwQobN5 +0 -0
  231. data/spec/dummy/tmp/storage/px/8C/px8C1w4Qc15qkYmVS8denUug +0 -0
  232. data/spec/dummy/tmp/storage/qE/aW/qEaWKpBnn4SdEFcXyDyJd8px +0 -0
  233. data/spec/dummy/tmp/storage/qL/ZA/qLZADU8CjYXifHrUKzBJ5mB8 +0 -0
  234. data/spec/dummy/tmp/storage/qj/Pu/qjPuWHbmcqisuRYdkwtadCiV +0 -0
  235. data/spec/dummy/tmp/storage/qu/BW/quBW6j7bBsC1SvVGsFSnQrNC +0 -0
  236. data/spec/dummy/tmp/storage/rD/3B/rD3BXaR8niv1yPAm7hHqgz1a +0 -0
  237. data/spec/dummy/tmp/storage/ro/ux/rouxjTs6DKdhMJYMcjXN7nc2 +0 -0
  238. data/spec/dummy/tmp/storage/s5/Q9/s5Q9iTFFUMM4cK79TMdvkyHE +0 -0
  239. data/spec/dummy/tmp/storage/si/ZM/siZMw2Eb3DfSj2qRiHit2Nmh +0 -0
  240. data/spec/dummy/tmp/storage/t2/eZ/t2eZxsCNn3PByNgFDNpT8ExV +0 -0
  241. data/spec/dummy/tmp/storage/t8/85/t885sJN8w5K5wazKBqqCXKCc +0 -0
  242. data/spec/dummy/tmp/storage/tP/iY/tPiYiEkgzDrjieQz1B53VWzP +0 -0
  243. data/spec/dummy/tmp/storage/tn/ad/tnadsYsGyXMZgmf9L5GGyjBQ +0 -0
  244. data/spec/dummy/tmp/storage/u5/Nb/u5NbzTLRchmRuK2Gq1zdhHLm +0 -0
  245. data/spec/dummy/tmp/storage/ux/3C/ux3CQ7LVVU9Cue35QVwmJYw8 +0 -0
  246. data/spec/dummy/tmp/storage/vR/cz/vRczM7mZ76Q9Qsifhhjkgccr +0 -0
  247. data/spec/dummy/tmp/storage/vi/N7/viN75StNRdYRWqk2RSwDxiGh +0 -0
  248. data/spec/dummy/tmp/storage/vy/Db/vyDbgbKDoum9ve24VV91RZ7Q +0 -0
  249. data/spec/dummy/tmp/storage/vz/Tn/vzTnSQrAxd1Wb8SWSHPFg1eB +0 -0
  250. data/spec/dummy/tmp/storage/wL/9M/wL9MvhdDU8PNKGGnrXg7ioTo +0 -0
  251. data/spec/dummy/tmp/storage/wj/QD/wjQDZSnwWkaVMZQwyFsdQ2H9 +0 -0
  252. data/spec/dummy/tmp/storage/wo/bj/wobjkpXKAf42kKXEfSq3ue7r +0 -0
  253. data/spec/dummy/tmp/storage/wx/7r/wx7rvWzAkro62eF1VpNYGB1u +0 -0
  254. data/spec/dummy/tmp/storage/xP/gJ/xPgJAyWn5CEzcHacU5zxPit1 +0 -0
  255. data/spec/dummy/tmp/storage/yD/T2/yDT2LmAy3G4335LZC7zRyGbh +0 -0
  256. data/spec/dummy/tmp/storage/yN/re/yNrenFsVHbajazmwszwyNetk +0 -0
  257. data/spec/dummy/tmp/storage/yq/Zp/yqZpkZGrQvPTqGnxiAY9YYtx +0 -0
  258. data/spec/dummy/tmp/storage/ys/MC/ysMCDjgyWiG2yheYt9W6wj9z +0 -0
  259. data/spec/dummy/tmp/storage/zz/zM/zzzMk3Z4aicTTkr2EqpMYVHr +0 -0
  260. data/spec/factories/cmor/testimonials/categories.rb +7 -0
  261. data/spec/factories/cmor/testimonials/testimonials.rb +17 -0
  262. data/spec/files/cmor/testimonials/testimonials/enerbunny.png +0 -0
  263. data/spec/files/cmor/testimonials/testimonials/homer.png +0 -0
  264. data/spec/models/cmor/testimonials/category_spec.rb +9 -0
  265. data/spec/models/cmor/testimonials/testimonial_spec.rb +33 -0
  266. data/spec/models/generic_spec.rb +50 -0
  267. data/spec/models/i18n_spec.rb +41 -0
  268. data/spec/rails_helper.rb +63 -0
  269. data/spec/spec_helper.rb +96 -0
  270. data/spec/support/capybara.rb +1 -0
  271. data/spec/support/factory_bot.rb +9 -0
  272. data/spec/support/pry.rb +1 -0
  273. data/spec/support/rao-shoulda_matchers.rb +5 -0
  274. data/spec/support/rao-view_helper.rb +5 -0
  275. data/spec/support/shoulda_matchers.rb +9 -0
  276. data/spec/view_helpers/cmor/testimonials/application_view_helper_spec.rb +15 -0
  277. metadata +697 -0
@@ -0,0 +1,7 @@
1
+ FactoryBot.define do
2
+ factory :cmor_testimonials_category, class: "Cmor::Testimonials::Category" do
3
+ locale { I18n.locale }
4
+ sequence(:identifier) { |i| "category_#{i.to_s}" }
5
+ sequence(:name) { |i| "Category ##{i.to_s}" }
6
+ end
7
+ end
@@ -0,0 +1,17 @@
1
+ FactoryBot.define do
2
+ factory :cmor_testimonials_testimonial, class: "Cmor::Testimonials::Testimonial" do
3
+ association(:category, factory: :cmor_testimonials_category)
4
+ sequence(:fullname) {|n| "John_Doe_#{n}" }
5
+ role { "MyString" }
6
+ company { "MyString" }
7
+ body { "MyText" }
8
+ published_at { 1.hour.ago }
9
+ after(:build) do |resource|
10
+ image = resource.image.attach(
11
+ io: File.open(Cmor::Testimonials::Engine.root.join(*%w( spec files cmor testimonials testimonials homer.png))),
12
+ filename: 'homer.png',
13
+ content_type: 'image/png'
14
+ )
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,9 @@
1
+ require 'rails_helper'
2
+
3
+ RSpec.describe Cmor::Testimonials::Category, type: :model do
4
+ subject { create :cmor_testimonials_category }
5
+
6
+ context "associations" do
7
+ it { should have_many :testimonials }
8
+ end
9
+ end
@@ -0,0 +1,33 @@
1
+ require 'rails_helper'
2
+
3
+ RSpec.describe Cmor::Testimonials::Testimonial, type: :model do
4
+ subject { create :cmor_testimonials_testimonial }
5
+
6
+ context "acts as list" do
7
+ it { should respond_to(:move_to_top) }
8
+ it { should respond_to(:move_higher) }
9
+ it { should respond_to(:move_lower) }
10
+ it { should respond_to(:move_to_bottom) }
11
+ end
12
+
13
+ context "associations" do
14
+ it { should belong_to :category }
15
+ end
16
+
17
+ context "active_storage" do
18
+ it { should respond_to :image }
19
+ end
20
+
21
+ describe "attach image" do
22
+ let(:filename) { 'homer.png' }
23
+ let(:file) { File.open(Cmor::Testimonials::Engine.root.join(*%W(spec files cmor testimonials testimonials #{filename}))) }
24
+
25
+ before(:each) do
26
+ subject.image.attach(io: file, filename: filename, content_type: 'image/png')
27
+ subject.save!
28
+ end
29
+
30
+ it { expect(subject.image).to be_attached }
31
+ it { expect(subject.image.filename.to_s).to eq(filename) }
32
+ end
33
+ end
@@ -0,0 +1,50 @@
1
+ require 'rails_helper'
2
+
3
+ RSpec.describe 'ActiveRecord::Base models', type: :model do
4
+ DEFAULT_SPECS_TO_RUN = [
5
+ :is_an_active_record,
6
+ :is_instanciable,
7
+ :valid_with_correct_attributes,
8
+ :not_valid_with_empty_attributes,
9
+ :saves_with_valid_attributes
10
+ ]
11
+
12
+ {
13
+ Cmor::Testimonials::Category => {},
14
+ Cmor::Testimonials::Testimonial => {},
15
+ }.each do |model, options|
16
+ options.reverse_merge!(specs_to_run: DEFAULT_SPECS_TO_RUN, specs_to_skip: [])
17
+ specs_to_run = options.delete(:specs_to_run)
18
+ specs_to_skip = options.delete(:specs_to_skip)
19
+ specs = specs_to_run - specs_to_skip
20
+
21
+ describe model do
22
+ it 'is an ActiveRecord::Base' do
23
+ expect(ActiveRecord::Base.descendants).to include(model)
24
+ end if specs.include?(:is_an_active_record)
25
+
26
+ it 'is instanciable' do
27
+ instance = model.new
28
+ expect(instance).to be_a(model)
29
+ end if specs.include?(:is_instanciable)
30
+
31
+ it 'is valid with correct attribute values' do
32
+ instance = build(model.to_s.tableize.singularize.underscore.tr('/', '_'))
33
+
34
+ instance.valid?
35
+ expect(instance.errors.full_messages).to eq([])
36
+ end if specs.include?(:valid_with_correct_attributes)
37
+
38
+ it 'is not valid with empty attributes' do
39
+ instance = model.new
40
+ expect(instance).not_to be_valid
41
+ end if specs.include?(:not_valid_with_empty_attributes)
42
+
43
+ it 'saves with valid attributes' do
44
+ instance = build(model.to_s.tableize.singularize.underscore.tr('/', '_'))
45
+ expect(instance.save).to be_truthy
46
+ expect(instance).to be_persisted
47
+ end if specs.include?(:saves_with_valid_attributes)
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,41 @@
1
+ require 'rails_helper'
2
+
3
+ RSpec.describe 'Translations', type: :model do
4
+ {
5
+ Cmor::Testimonials::Category => {},
6
+ Cmor::Testimonials::Testimonial => {},
7
+ }.each do |model, options|
8
+ I18n.available_locales.each do |locale|
9
+ I18n.locale = locale
10
+
11
+ describe "for locale #{locale}:" do
12
+ describe "#{model} translations" do
13
+ it 'include one' do
14
+ I18n.locale = locale
15
+ i18n_key = ['activerecord', 'models', model.name.underscore].join('.')
16
+ i18n_options = {}
17
+ expect(I18n.translate!(i18n_key, options)[:one]).to be_a(String)
18
+ end
19
+
20
+ it 'include other' do
21
+ I18n.locale = locale
22
+ i18n_key = ['activerecord', 'models', model.name.underscore].join('.')
23
+ i18n_options = {}
24
+ expect(I18n.translate!(i18n_key, options)[:other]).to be_a(String)
25
+ end
26
+
27
+ describe 'for attributes' do
28
+
29
+ model.column_names.each do |column_name|
30
+ it "include #{column_name}" do
31
+ I18n.locale = locale
32
+ i18n_key = ['activerecord', 'attributes', model.name.underscore, column_name].join('.')
33
+ expect(I18n.translate!(i18n_key)).to be_a(String)
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,63 @@
1
+ # This file is copied to spec/ when you run 'rails generate rspec:install'
2
+ require 'spec_helper'
3
+ ENV['RAILS_ENV'] ||= 'test'
4
+ require File.expand_path('../dummy/config/environment', __FILE__)
5
+ # Prevent database truncation if the environment is production
6
+ abort("The Rails environment is running in production mode!") if Rails.env.production?
7
+ require 'rspec/rails'
8
+ require 'shoulda-matchers'
9
+ # Add additional requires below this line. Rails is not loaded until this point!
10
+
11
+ # Requires supporting ruby files with custom matchers and macros, etc, in
12
+ # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
13
+ # run as spec files by default. This means that files in spec/support that end
14
+ # in _spec.rb will both be required and run as specs, causing the specs to be
15
+ # run twice. It is recommended that you do not name files matching this glob to
16
+ # end with _spec.rb. You can configure this pattern with the --pattern
17
+ # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
18
+ #
19
+ # The following line is provided for convenience purposes. It has the downside
20
+ # of increasing the boot-up time by auto-requiring all files in the support
21
+ # directory. Alternatively, in the individual `*_spec.rb` files, manually
22
+ # require only the support files necessary.
23
+ #
24
+ # Dir[Rails.root.join('spec', 'support', '**', '*.rb')].each { |f| require f }
25
+ Dir[Cmor::Testimonials::Engine.root.join('spec', 'support', '**', '*.rb')].each { |f| require f }
26
+
27
+ # Checks for pending migrations and applies them before tests are run.
28
+ # If you are not using ActiveRecord, you can remove these lines.
29
+ # begin
30
+ # ActiveRecord::Migration.maintain_test_schema!
31
+ # rescue ActiveRecord::PendingMigrationError => e
32
+ # puts e.to_s.strip
33
+ # exit 1
34
+ # end
35
+ RSpec.configure do |config|
36
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
37
+ config.fixture_path = "#{::Rails.root}/spec/fixtures"
38
+
39
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
40
+ # examples within a transaction, remove the following line or assign false
41
+ # instead of true.
42
+ config.use_transactional_fixtures = true
43
+
44
+ # RSpec Rails can automatically mix in different behaviours to your tests
45
+ # based on their file location, for example enabling you to call `get` and
46
+ # `post` in specs under `spec/controllers`.
47
+ #
48
+ # You can disable this behaviour by removing the line below, and instead
49
+ # explicitly tag your specs with their type, e.g.:
50
+ #
51
+ # RSpec.describe UsersController, :type => :controller do
52
+ # # ...
53
+ # end
54
+ #
55
+ # The different available types are documented in the features, such as in
56
+ # https://relishapp.com/rspec/rspec-rails/docs
57
+ config.infer_spec_type_from_file_location!
58
+
59
+ # Filter lines from Rails gems in backtraces.
60
+ config.filter_rails_from_backtrace!
61
+ # arbitrary gems may also be filtered via:
62
+ # config.filter_gems_from_backtrace("gem name")
63
+ end
@@ -0,0 +1,96 @@
1
+ # This file was generated by the `rails generate rspec:install` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
4
+ # this file to always be loaded, without a need to explicitly require it in any
5
+ # files.
6
+ #
7
+ # Given that it is always loaded, you are encouraged to keep this file as
8
+ # light-weight as possible. Requiring heavyweight dependencies from this file
9
+ # will add to the boot time of your test suite on EVERY test run, even for an
10
+ # individual file that may not need all of that loaded. Instead, consider making
11
+ # a separate helper file that requires the additional dependencies and performs
12
+ # the additional setup, and require it from the spec files that actually need
13
+ # it.
14
+ #
15
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
16
+ RSpec.configure do |config|
17
+ # rspec-expectations config goes here. You can use an alternate
18
+ # assertion/expectation library such as wrong or the stdlib/minitest
19
+ # assertions if you prefer.
20
+ config.expect_with :rspec do |expectations|
21
+ # This option will default to `true` in RSpec 4. It makes the `description`
22
+ # and `failure_message` of custom matchers include text for helper methods
23
+ # defined using `chain`, e.g.:
24
+ # be_bigger_than(2).and_smaller_than(4).description
25
+ # # => "be bigger than 2 and smaller than 4"
26
+ # ...rather than:
27
+ # # => "be bigger than 2"
28
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
29
+ end
30
+
31
+ # rspec-mocks config goes here. You can use an alternate test double
32
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
33
+ config.mock_with :rspec do |mocks|
34
+ # Prevents you from mocking or stubbing a method that does not exist on
35
+ # a real object. This is generally recommended, and will default to
36
+ # `true` in RSpec 4.
37
+ mocks.verify_partial_doubles = true
38
+ end
39
+
40
+ # This option will default to `:apply_to_host_groups` in RSpec 4 (and will
41
+ # have no way to turn it off -- the option exists only for backwards
42
+ # compatibility in RSpec 3). It causes shared context metadata to be
43
+ # inherited by the metadata hash of host groups and examples, rather than
44
+ # triggering implicit auto-inclusion in groups with matching metadata.
45
+ config.shared_context_metadata_behavior = :apply_to_host_groups
46
+
47
+ # The settings below are suggested to provide a good initial experience
48
+ # with RSpec, but feel free to customize to your heart's content.
49
+ =begin
50
+ # This allows you to limit a spec run to individual examples or groups
51
+ # you care about by tagging them with `:focus` metadata. When nothing
52
+ # is tagged with `:focus`, all examples get run. RSpec also provides
53
+ # aliases for `it`, `describe`, and `context` that include `:focus`
54
+ # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
55
+ config.filter_run_when_matching :focus
56
+
57
+ # Allows RSpec to persist some state between runs in order to support
58
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
59
+ # you configure your source control system to ignore this file.
60
+ config.example_status_persistence_file_path = "spec/examples.txt"
61
+
62
+ # Limits the available syntax to the non-monkey patched syntax that is
63
+ # recommended. For more details, see:
64
+ # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
65
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
66
+ # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
67
+ config.disable_monkey_patching!
68
+
69
+ # Many RSpec users commonly either run the entire suite or an individual
70
+ # file, and it's useful to allow more verbose output when running an
71
+ # individual spec file.
72
+ if config.files_to_run.one?
73
+ # Use the documentation formatter for detailed output,
74
+ # unless a formatter has already been configured
75
+ # (e.g. via a command-line flag).
76
+ config.default_formatter = "doc"
77
+ end
78
+
79
+ # Print the 10 slowest examples and example groups at the
80
+ # end of the spec run, to help surface which specs are running
81
+ # particularly slow.
82
+ config.profile_examples = 10
83
+
84
+ # Run specs in random order to surface order dependencies. If you find an
85
+ # order dependency and want to debug it, you can fix the order by providing
86
+ # the seed, which is printed after each run.
87
+ # --seed 1234
88
+ config.order = :random
89
+
90
+ # Seed global randomization in this process using the `--seed` CLI option.
91
+ # Setting this allows you to use `--seed` to deterministically reproduce
92
+ # test failures related to randomization by passing the same `--seed` value
93
+ # as the one that triggered the failure.
94
+ Kernel.srand config.seed
95
+ =end
96
+ end
@@ -0,0 +1 @@
1
+ require 'capybara'
@@ -0,0 +1,9 @@
1
+ require 'factory_bot_rails'
2
+
3
+ RSpec.configure do |config|
4
+ config.include FactoryBot::Syntax::Methods
5
+ end
6
+
7
+ # FactoryBot.factories.clear
8
+ # FactoryBot.definition_file_paths += [Rails.root.join(*%w(spec factories))]
9
+ # FactoryBot.find_definitions
@@ -0,0 +1 @@
1
+ require 'pry-rails'
@@ -0,0 +1,5 @@
1
+ require 'rao/shoulda/matchers'
2
+
3
+ RSpec.configure do |config|
4
+ config.include Rao::Shoulda::Matchers, type: :feature
5
+ end
@@ -0,0 +1,5 @@
1
+ require 'rao/view_helper/spec_helper'
2
+
3
+ RSpec.configure do |c|
4
+ c.include Rao::ViewHelper::SpecHelper, type: :view_helper
5
+ end
@@ -0,0 +1,9 @@
1
+ require 'shoulda-matchers'
2
+
3
+ Shoulda::Matchers.configure do |config|
4
+ config.integrate do |with|
5
+ with.test_framework :rspec
6
+ with.library :rails
7
+ with.library :active_model
8
+ end
9
+ end
@@ -0,0 +1,15 @@
1
+ require 'rails_helper'
2
+
3
+ RSpec.describe Cmor::Testimonials::ApplicationViewHelper, type: :view_helper do
4
+ let(:testimonials) { create_list(:cmor_testimonials_testimonial, 3) }
5
+ let(:category) { create(:cmor_testimonials_category, testimonials: testimonials) }
6
+ let(:args) { [category.identifier, {}] }
7
+ before(:each) do
8
+ register_view_helper Markup::Rails::ApplicationViewHelper, as: :markup_helper
9
+ end
10
+
11
+
12
+ describe 'render_category' do
13
+ it { expect(html).to have_css('div.cmor-testimonials-category') }
14
+ end
15
+ end