cmor_tags 0.0.1.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (276) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +22 -0
  4. data/Rakefile +19 -0
  5. data/app/assets/javascripts/cmor/tags/application/dummy.js +0 -0
  6. data/app/assets/javascripts/cmor/tags/application.js +13 -0
  7. data/app/assets/javascripts/cmor_tags.js +1 -0
  8. data/app/assets/stylesheets/cmor/tags/application/tag-labels.css +4 -0
  9. data/app/assets/stylesheets/cmor/tags/application.css +14 -0
  10. data/app/assets/stylesheets/cmor_tags.css +3 -0
  11. data/app/attribute_renderers/tag_list_renderer.rb +8 -0
  12. data/app/concerns/model/cmor/tags/taggable_concern.rb +13 -0
  13. data/app/controllers/cmor/tags/searchs_controller.rb +24 -0
  14. data/app/helpers/cmor/tags/application_helper.rb +14 -0
  15. data/app/models/cmor/tags/null_tag.rb +9 -0
  16. data/app/models/cmor/tags/search.rb +49 -0
  17. data/app/models/cmor/tags/tag.rb +5 -0
  18. data/app/models/cmor/tags/tagging.rb +25 -0
  19. data/app/views/cmor/tags/_search_box.html.haml +4 -0
  20. data/app/views/cmor/tags/_tag_labels_for_resource.html.haml +4 -0
  21. data/app/views/cmor/tags/searchs/_form.html.haml +3 -0
  22. data/app/views/cmor/tags/searchs/create.html.haml +8 -0
  23. data/app/views/cmor/tags/searchs/new.html.haml +2 -0
  24. data/app/views/layouts/cmor/tags/application.html.erb +14 -0
  25. data/config/initializers/assets.rb +0 -0
  26. data/config/initializers/inject_taggable_concern.rb +6 -0
  27. data/config/locales/de.yml +48 -0
  28. data/config/locales/en.yml +48 -0
  29. data/config/routes.rb +14 -0
  30. data/db/migrate/20190301132031_add_color_to_tags.rb +6 -0
  31. data/lib/cmor/tags/configuration.rb +21 -0
  32. data/lib/cmor/tags/engine.rb +8 -0
  33. data/lib/cmor/tags/version.rb +7 -0
  34. data/lib/cmor/tags.rb +10 -0
  35. data/lib/cmor_tags.rb +20 -0
  36. data/lib/generators/cmor/tags/install/install_generator.rb +32 -0
  37. data/lib/generators/cmor/tags/install/templates/application_controller.source +3 -0
  38. data/lib/generators/cmor/tags/install/templates/initializer.rb +25 -0
  39. data/lib/generators/cmor/tags/install/templates/routes.source +2 -0
  40. data/lib/tasks/cmor/tags_tasks.rake +8 -0
  41. data/spec/dummy/app/assets/config/manifest.js +3 -0
  42. data/spec/dummy/app/assets/javascripts/cable.js +13 -0
  43. data/spec/dummy/app/channels/application_cable/channel.rb +4 -0
  44. data/spec/dummy/app/channels/application_cable/connection.rb +4 -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/views/layouts/mailer.html.erb +13 -0
  49. data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
  50. data/spec/dummy/app/views/posts/_post.html.haml +1 -0
  51. data/spec/dummy/bin/update +31 -0
  52. data/spec/dummy/bin/yarn +11 -0
  53. data/spec/dummy/config/cable.yml +10 -0
  54. data/spec/dummy/config/initializers/application_controller_renderer.rb +8 -0
  55. data/spec/dummy/config/initializers/cmor_tags.rb +25 -0
  56. data/spec/dummy/config/initializers/content_security_policy.rb +25 -0
  57. data/spec/dummy/config/initializers/i18n.rb +2 -0
  58. data/spec/dummy/config/initializers/route_translator.rb +3 -0
  59. data/spec/dummy/config/puma.rb +34 -0
  60. data/spec/dummy/config/spring.rb +6 -0
  61. data/spec/dummy/config/storage.yml +34 -0
  62. data/spec/dummy/db/development.sqlite3 +0 -0
  63. data/spec/dummy/db/migrate/20190325181515_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb +37 -0
  64. data/spec/dummy/db/migrate/20190325181516_add_missing_unique_indices.acts_as_taggable_on_engine.rb +26 -0
  65. data/spec/dummy/db/migrate/20190325181517_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb +20 -0
  66. data/spec/dummy/db/migrate/20190325181518_add_missing_taggable_index.acts_as_taggable_on_engine.rb +15 -0
  67. data/spec/dummy/db/migrate/20190325181519_change_collation_for_tag_names.acts_as_taggable_on_engine.rb +15 -0
  68. data/spec/dummy/db/migrate/20190325181520_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb +23 -0
  69. data/spec/dummy/db/migrate/20190325181525_create_posts.rb +9 -0
  70. data/spec/dummy/db/test.sqlite3 +0 -0
  71. data/spec/dummy/log/development.log +188 -0
  72. data/spec/dummy/log/test.log +282 -0
  73. data/spec/dummy/package.json +5 -0
  74. data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
  75. data/spec/dummy/public/apple-touch-icon.png +0 -0
  76. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/0A/0ATFLQloq-lmKTIr3WSckCFJcAF8juR7mfCg-lF-wiM.cache +1 -0
  77. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/0o/0oYvKhVhlcNdnSd31OdrAqp3ym7sUUDHbG1HNmJSZ3M.cache +0 -0
  78. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/0q/0qG4-skAgaIFYfgXot0N-nlaoAqYyqyXJL_6WkhsUyE.cache +0 -0
  79. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/1U/1U3G1wyHveocXxP8A5aYDGiC2mJXzw9evqwGcC7Dc5I.cache +2 -0
  80. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/1l/1lEMv6jfoaJrLEZK5L1WTsXBWmWTrEaRFH9MlBcIVDg.cache +0 -0
  81. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/23/23Lc8nnJ_U4euxFVp7P5D_GLLcMoFY3xJcNsVgoOfjE.cache +1 -0
  82. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/29/29nD1YSEEB_gaB2_pdE--gkJvqx7W0PhEymY2qrkTic.cache +0 -0
  83. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/2J/2JZ8VAYhkBcWE3sok5fqFK1opx8vf16OKQxVHfUPn4k.cache +1 -0
  84. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/2S/2Sjg-i6TWZhzN55SEnzTtNi0dYztgd2sAURZXblJLOY.cache +1 -0
  85. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/2v/2vMg6aDV_y44K_JDBHL9BxRGSrju03XdjGenJGyTRSY.cache +0 -0
  86. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/3N/3NRHvUh8BPHd10NY-S5hOul6afZ6SL8OgvWDQpnHvHo.cache +0 -0
  87. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/3a/3ayqDM10RGgeN8gahYJKiyupAtcAdfNqn0Z2ayegFrM.cache +2 -0
  88. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/4O/4OSrr9rd8i_fS9ZwF3X7jOa91rLnqE7B1WvNzf226YA.cache +2 -0
  89. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/55/55cmHSQGq-mSD_VcgBeL9IaCa-v5PCbbypOu6a45oqA.cache +0 -0
  90. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/5C/5CwvRQ-TbXPe8yNl8e0KM6UANx6cNrhP_KgMfnYx30Y.cache +1 -0
  91. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/5L/5L-FSYLjBxDmPgzI_CAYGDk-9Mni9w9C57XkJeyt5LA.cache +1 -0
  92. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/5o/5oMaZ8U_dFX9l_Tukp1P7IpPMK2AMxKxgRtnR_zgT2Y.cache +1 -0
  93. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/6e/6eHLns1-9lpL1ONXkJHSM9src6rLg-c1X_ABZTpGJU0.cache +1 -0
  94. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7-/7-GQEvgBAbjNHZWq_JUZLS06RYzLo9NdwiXNnhEGtT0.cache +0 -0
  95. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/72/72JwV5KO29y1zyFbW5LzL1_p-pj-nxz06qvPjrepgHc.cache +1 -0
  96. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/79/79jR4Uf_pUhttCKeRR-xEPMITP6aTnSgtQIa8EfUW8E.cache +2 -0
  97. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7A/7A6KkmMqogd1hYdBJzKdfYx7s-UV4fkF0y5MniETAmc.cache +0 -0
  98. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7a/7a_xvuKI_jNbh2hLSKtSl1eJpscSQdbnWgZt0-Zj5nE.cache +1 -0
  99. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8-/8-QQLtMujDnjyd2fI0Ygw5qXaATxumVuyPKDpUWewKE.cache +0 -0
  100. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8Q/8Qv0pOFexuQn3xn0g8_E7UAZoZjcSudR3eCadt2r1ic.cache +0 -0
  101. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8T/8THGXP-2ZR_f_xkWiiQJAygjklf0nA4mQKSuleFm-80.cache +1 -0
  102. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8a/8ajPb-OzTZfJhLUn_WTTxIhzbIAaEA4HewIA-jOj--c.cache +1 -0
  103. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8c/8cJgoNVa-FivkHV5N-aDWa0-wK9hK8cH-pHXeUolRBU.cache +0 -0
  104. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8d/8d2Wh67es5lOz-sg_C6i93xo_MbzmASA_0DuBKkeVkk.cache +0 -0
  105. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/9-/9-QH-D5T9oHDy57Oeh3dkNqGs2OGh7zlo29ANf6DyQw.cache +1 -0
  106. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/9A/9Adi_AFfM0LKzawMf35rtCuEf9joQWvntGqClAdJ1yc.cache +0 -0
  107. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/9X/9XGDlZ-wXiPAQGAb-AFzJf71D_UYBnHVCs_Q5SR2FPA.cache +1 -0
  108. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/AL/ALpIzE1pNpiyS00dwE7gRrdXjTK6FrylELfoihpUNY8.cache +1 -0
  109. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Av/Av2RbvMe-Vv4_XgSJ5dpE_uURyCaSmDnFcwqKKUKh6M.cache +1 -0
  110. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ax/AxM3U92ykKafOIl607NzgFn79bJKzT8b4JF0ZiiWON8.cache +1 -0
  111. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/BB/BBFDN2hfpOd0HsQFPakCBQvzpZ1r65OpAyPRTYnjnGA.cache +1 -0
  112. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/BP/BPOIywq90q0tV6CFK2llqr-24KniQp3p3iOFrnsN9DU.cache +3 -0
  113. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/BV/BV80JS73aw87gEpMBSaD9PeOz8qJOfY1zuXKNgv41C0.cache +0 -0
  114. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/C1/C14-auZ3RPbRcVrqnpPojLEZWY8ESps0NNrrpSuICqs.cache +0 -0
  115. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/C5/C5D4T0_nOZRxlB1Kr3YBjpAz13VAaGm5141p_IqSHEw.cache +3 -0
  116. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/C6/C6hq0gmlv8BxoBBBLyuqt813xUy2up1IYwsvLJ252DA.cache +1 -0
  117. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Du/DuUv3-G020JVW8ln6235zybFLuL2nbTFKeSzmyBBWFE.cache +1 -0
  118. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/E9/E9H7SqtoOr-Fj2skhd8UFmrpf67brNmEDwZEYBdfKJw.cache +1 -0
  119. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/EZ/EZMdXsWigDVBrQc84YabkYd_aVvILvUt4B4M-GGPEG8.cache +1 -0
  120. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Eu/Eu5OyZ39Bbmc1_8ahhhHTnTMLE9Pf9l5oS2IubMCenY.cache +1 -0
  121. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ex/Exni9T-N0D00xhk9o73AIRL5YUOyHlJTj0i9YuzvnvQ.cache +1 -0
  122. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/F7/F74fucogx91yB5PW70H7x0uAJV_sYuVfbAg73rR-wUI.cache +3 -0
  123. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/FD/FDXlm_Ar6rU8kIsnfv5kd4qR0hqXS9n9BW1I5DBdS2M.cache +2 -0
  124. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Fy/FyrJbZ1Rn6UMVr-v-ObZpnQspgNLG61KDnTAM5iN9uE.cache +2 -0
  125. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/GU/GUseAf9pqMSpBX0vXLK1OeQIV_s5fqSvGme-2XqkfuY.cache +2 -0
  126. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/H2/H2ht1BkseqMwkBsCd_IyjMFMqZGkRjd6M1vKOHMIagY.cache +0 -0
  127. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/HC/HCDOUd7-S45aJ_PjVAC_Vmjyud3i1aQv4cE3t9_Z3Dw.cache +2 -0
  128. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/HZ/HZ1iRdzAHZ8o4HrWUPniUmrldI0rrw3czGHIlhKx20Q.cache +2 -0
  129. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/He/HecOTm2I7FI72g6WsDema6iCkNczdDeN-EGJUumsQd4.cache +1 -0
  130. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Hx/HxDhLNAjgpAjWKLIYCTcv1gXd11GGWXDRkGMlW1ZL4o.cache +1 -0
  131. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/KU/KUadIyonXR1Vyz07b6lra7kQIWQVonzIiOzZCJOK4IE.cache +3 -0
  132. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/LP/LPRW7sjtiZqWeoDwfE1phJiuSjesI8-twmkAwlmqWXo.cache +0 -0
  133. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/MC/MCuEd_HWd5C2COVhVm23pI9wjRXLZI7gB5cNb6b_5X4.cache +1 -0
  134. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/MR/MRs-3DA21hnk0VBZ6dGeSXqp0bQm4hi-QOZOq1uHeGE.cache +1 -0
  135. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/N4/N4tnRbkFBVwDQ7etLF-LVe9rHnYTS2aZEqtn8mqf9-c.cache +0 -0
  136. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/NA/NA7TG8OGXra5NGU5ptqd0TbvuCX0sB2U1SUbbOgo_ik.cache +1 -0
  137. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/NE/NELJj39rhhdroUI5gqIG1WvBHocVvLRYMGBQ79vToxM.cache +2 -0
  138. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Nh/Nhyy848jZRods00snp4YybUITS-4UBS1H41XtTcohP4.cache +4 -0
  139. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/O0/O0M_rsBWNKWOXrRYGDaaHL4oewoIG2wtxBr2SMYiL5c.cache +0 -0
  140. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Oa/OaQBnCJMy3nhgYuPPZz-rbN_NVd20hib32GM-5ZrlRo.cache +1 -0
  141. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/PD/PD99Bcd5AQWB3NVDhz4dX9LI8A31bqUs4N-qUdEFCAE.cache +1 -0
  142. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/PI/PIysz08byyvXlaQfthLgm79fjzz0rZ0el42dAQq2hf8.cache +1 -0
  143. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/PQ/PQu0qCwIT4XZCVKzPFZQNRhtZvB35DK5OGXWTvPqStE.cache +1 -0
  144. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/PR/PRT9nnPny7IjFKgxlxXRMImaDpesdM67Mo1xAbEJwQ8.cache +1 -0
  145. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ps/PszMV6m4MlExX0S7BdpDj_Nr22lCzS2HfqQPK3EDphw.cache +0 -0
  146. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Pv/PvcQ4n7NaBNu_e-Q72qgPoDwOoTOv7Ki75PF-H0O5d0.cache +0 -0
  147. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/QX/QXeO0ubZ7H91Nm-xQPMa6B1sZAq6hTcgyU05DRTIx3c.cache +2 -0
  148. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Qd/QdQr7ZLZ-zG-HwQraQO2TzlbnblrLM73WZ4BB4Tc24k.cache +1 -0
  149. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Qp/Qp1AU6KG2Z9v2ip-6UVINfb_6l3BzrQjzglB0yBiIWY.cache +1 -0
  150. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/R6/R6W1OhmXADlwn2paOoImbgcKCpB8tY4uwtVA27HImuc.cache +3 -0
  151. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/RY/RYidNj6Thirp6c4fYrHw6satQpwScKljLagQ4jRngvE.cache +2 -0
  152. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/SE/SEZX3HFRvXh7LLjkgP2md53CV2rvXwnzhOkwd9W9N9U.cache +0 -0
  153. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ss/Ss9sD2j7Ox5HAulf2tzL4nmhG4uMqUQfW-0lxb5s434.cache +0 -0
  154. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Sy/Sy0jX4N-RpyfZ-N5FLkIWw3gfgqXtqgGJarBfMukHp8.cache +1 -0
  155. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/U5/U5KMYvIoLRI3aI9tIsBcRnVawS-s2s3QlLrC4kAcmGA.cache +2 -0
  156. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/UM/UMTeo1_fvHO3GlNnieKfaJA_xoXfuYoWQSY0aNeaqQ8.cache +1 -0
  157. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Uc/Uc2hcKC_z4VdeM7vBRo3IGSANNMT5zgfhjnuohH6CV0.cache +1 -0
  158. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Um/UmmPRM3DBv1Tbop82iskBpVNz6CWAu8Bss-5XlmKmHI.cache +3 -0
  159. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/VS/VSliUoy2QKm5bR_26CTaylVZY4o61YuE0gr5kqU6UJE.cache +0 -0
  160. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/VU/VUcMwPMF1zc5zEWpuqPsX7kqAnkiUp8tbEFZ5Hkl_aw.cache +1 -0
  161. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Vr/VrtEHnJmqjZwGxBqPWkxmfbuNoZ_ZlWNmLzKRC924FU.cache +1 -0
  162. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/W8/W8QHp8Xk5cW9goP5r5jiN5HiTuupbMLd3iJO4vQNr8A.cache +1 -0
  163. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/WI/WITMO7-QJWNyQ1SqvzHDJMaHfvJTy08uxHcwVRvEdmk.cache +2 -0
  164. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Xk/XkVHFvPaI-xAbAcXZSv_EslOO0sXQSOJi2v9-w5UyE4.cache +1 -0
  165. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Y0/Y0__Ks5VsmMbst0IZJTWkj_zdPjZLag411S1AWpnMfI.cache +1 -0
  166. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Y4/Y40tZQHUgCeaVY-x7UDWg6qDZ_nBPW9wAsKSlxMy2YY.cache +1 -0
  167. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Yv/Yv4Mz9s_ARThs1GcSLUJC0USmVHrIqMwIJ9wJavhtIY.cache +0 -0
  168. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ZG/ZG2jD-bpYZlRxvFlefZvhPle80TRz1eilMrHFdyKqpM.cache +1 -0
  169. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Zj/ZjK1fvOKdajGTfU5pRn8x2UWgX8GWvuTXo24RENXREM.cache +1 -0
  170. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Zt/Zt_8JRM9d25lTIoWOG4CGD0D-8V7piPlpY-LSLY9zp0.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/_v/_vHhLuv_HO3ndie5PLld1rfmAfh8Y54vtbj14lnA97w.cache +0 -0
  173. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/_z/_zt32LQMzUJ0s5mgC5VE6A9U3nNudIL-CQ2CUbSP2jE.cache +1 -0
  174. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/a7/a72HuHs9A4s8WqPxyhKbkKSzJUdgikYwmfJyixbjZGA.cache +2 -0
  175. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/aQ/aQL0CNPS5ESzN5XcS9o8NF7i4bv4pCm0xdrA7vfw5fc.cache +2 -0
  176. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/b8/b86NyU0f7kebqkFxncuEOBtaTD6wBX-sxudb3wLDQpo.cache +1 -0
  177. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/bD/bDIuRJAlDi98cyI-tv6gf95cK6b2lDclVk6gw7-4yQE.cache +1 -0
  178. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/bL/bLkqyRwp_AqHB5D3TbRQOPco-SC_NfsOa3SwEkbBFVY.cache +0 -0
  179. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/bX/bXAKVbDDLCbJ33E_zQXJIBZoz5899kzzfq_Q3PndD0o.cache +3 -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/cB/cBfQ4Z7iTpfUfA-bM4vTRBezdD2EgnfnxuZHq7RC1EM.cache +1 -0
  183. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/cn/cnhAFPFfinOAskt9hrkQ2LTHThvc9sSrdTSrl_Io0ds.cache +0 -0
  184. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/cu/cuW8s9P2oOvuK0LrnxPNNcYzPUUgAWMg33M8kT-td6k.cache +1 -0
  185. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dG/dG2st3mUGsh-8yC115nqU2IltElHJVNhu2vRfijxs20.cache +1 -0
  186. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dH/dHbb8VsMsr9XdHfbPspVNcQNDmKHyHv90O3s_n_wVVw.cache +1 -0
  187. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dZ/dZ8aIUTQl_V08dRUgErYxIBZ0py5MjHDdTfCSKQf0gM.cache +0 -0
  188. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dZ/dZtoL2N-kuka3HWX3PhlY8j-ITKs4bNxiFOkhsIjMjw.cache +1 -0
  189. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dl/dlBTWxsKYOOgn44yc6vGybDehP1pRNfOWN5-r5cvMl4.cache +0 -0
  190. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dt/dtZXNx3vKNUUUnM0rFpgoUWIag_mxLlY48n9l6HJ7R8.cache +2 -0
  191. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/e3/e3c0WJrAcOOtTCdVYS9y2BPGklYG_5zH-2VPRCad990.cache +1 -0
  192. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/e7/e7udXkUqgnnEl6_gMnpAC_5eiuEcUZM3D7BP7elrN00.cache +3 -0
  193. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ek/ekV-kLj0Y6c5a9bVLMSA1guKtOfsB7Gsn1qxuyb3ejg.cache +2 -0
  194. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/el/elYS15GAoe--COYSC8vXUOxTrMFONIJN82xLCodoiIc.cache +1 -0
  195. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fR/fRbCj1aNB38O-9pznPKZJ-EZoFXBeVilAs0WroTkIEM.cache +1 -0
  196. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fq/fqqy6XMocl_Tx0nWsOC1LQ_uj3jUrV-CN8kMgtDR0Bc.cache +0 -0
  197. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fv/fvftxvByD8vR3z32V1RKnvqbA5bFlgvdN7wtxLBuISo.cache +0 -0
  198. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/gH/gHc5zZFGo93R1QKNijIJYz0bT4g7jRda_CxttyITNrY.cache +1 -0
  199. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/gy/gyZPzWUmhSQhTuuyRou2UonnbpuuFSvMPySAe8RUE3g.cache +1 -0
  200. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/h2/h2105zpTSZpcHFRSflO76h8HYkCNszW9lJyzCw-eLQ0.cache +0 -0
  201. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/h2/h2Z8WDQyX5n1-QdXQ91K4YEEwB06lFUpr4uOjr__uyc.cache +3 -0
  202. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/hf/hfti6m6fT1lCAGxukz24_HRQJ_Yxy55m0W2dyeHuVe4.cache +1 -0
  203. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/iB/iBotPTXLWAzSQjo1wRT9wQilhr4-7c6OGOm50z0Nw_E.cache +0 -0
  204. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/i_/i_s59CkDPBCbkVzR2yxiT9kpEI1B0pO0OYOIwTGpkcI.cache +2 -0
  205. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/jK/jKHqW1VBzFtw_WgOZ-5WFrod_nbiYJ_Duey1VZXs3Mo.cache +0 -0
  206. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/k3/k31C_Rf-ifBroR-8rtNJzKv97oyxKKk2s5njNhp-yKE.cache +0 -0
  207. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/kD/kDartayL6A6j26rd-NkFIU9yqvIIJh9IUdiLsbuHoPY.cache +1 -0
  208. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/kQ/kQO5QnfECSRFs7omWBm6nggWngVK5Wac3_dKMjgxHtk.cache +0 -0
  209. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/lS/lStvx9Beg2l4s8L-QdTSKuc5_qQPQAZPnIcRI7JkpPE.cache +0 -0
  210. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/lV/lVQpEtZBWKuLzLechjY8ESgnO0bkoqFBs2WMM0TjaGE.cache +0 -0
  211. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/la/laei9qw2p6gQIRT1xHJFT4GhOTjIvqoHiTNV9G4GQzw.cache +1 -0
  212. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ls/lssw4HuF9TbG50gCrqs6T8LGQWwDMSqRC3Wp8FqqMpo.cache +1 -0
  213. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nF/nFcmGFEHfCPMj4z356tmGsemget1Vq-QoxxIyaZWiGk.cache +2 -0
  214. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/n_/n_xYqQYhwEMQknb3jFQnjlxxBE9TzMNHCdJ-bEyZFIw.cache +2 -0
  215. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nq/nqBvCfX72u2EvAyNfHt3upjIFz009V5YYgwPmmaNRH4.cache +3 -0
  216. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nt/ntry6y5LOGB3mXS76ylx-eIcul__UqoQoqB4-0eaNnI.cache +2 -0
  217. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nw/nwkcTJn2Q2Psx4XjKjgxw-Q-7ANbZ2E9yH_HCK50oxQ.cache +0 -0
  218. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nx/nxTv3sKVUQZADJyM3dPaVmUA78MIsMLD_K279yN_GsI.cache +2 -0
  219. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ny/nyncywtu30BHeG-vizWSdXxNakMEjE66N78If2y6vNY.cache +1 -0
  220. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/o3/o3KriyUH_Oim5tx6IQaMksR5QXoplqfIdBx_q8FuGJ8.cache +1 -0
  221. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/o9/o9uark_TmW5KZtMyRyxh2nJCW_McyLavKG81CQwo3R0.cache +1 -0
  222. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/o_/o_sbBYPtSI5HJ3xoreWOKzbaPHCBOQLIbA-tD93Iw9I.cache +0 -0
  223. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/pB/pBan2_e-mmViTiLjuRhKq3JBDzG6roNOXULsGuvnbg8.cache +1 -0
  224. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/pB/pBfE-Z1ByE48wvW5zYFu7h11vNxp2ICAJZO2Q1FeoYM.cache +0 -0
  225. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/pQ/pQkUK6Yu2rT3Jm0utfTnzItK16hzeDJffNXExAjJr7A.cache +0 -0
  226. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/px/pxTPoRetayDOk6WMniYis0WROOw0YcTZbH8lu9-itHg.cache +1 -0
  227. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qJ/qJ5Sgj2xpuC8q-I2Jb1eBu-sGWL9oVeX7NS-HeFo8DA.cache +1 -0
  228. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qN/qNfQYqDd98wAJnH5g_7uRNAcgdxuC-aB-zdYvF3788g.cache +1 -0
  229. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qY/qYGQ7_x90s8we-9-JKA2DhBWgvlgLXUzB-7mowVImlQ.cache +0 -0
  230. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qj/qjs-t5igalSCJwoa3mOZImVnSBYVdKap1x0jwveJ_vI.cache +0 -0
  231. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qq/qqeUBxpDPTNXL2hYWXX8t_E_jxRkRpjhJR-FcdiLWr0.cache +3 -0
  232. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/r3/r3ous1Avo09j8KN-CDZEfwUGP8XkHPAJ6w0yF_JZZ1A.cache +1 -0
  233. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/r9/r90r3TkyWqdl0bLxLsG8rjjqqLW_Wk2WCGkS0SADkbI.cache +0 -0
  234. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sL/sLfo-t4UFr-WaYFPc6tf_yrL1g9htJCKdURpb0OzgFE.cache +1 -0
  235. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/si/si8itwNDYuY2nxBFi_m0z4WVJBnvSN9fAhC94U9qz9A.cache +2 -0
  236. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sj/sjdps2NJkERt-eWGF-YPxHTICplfxo6HdJo1FNRt6xQ.cache +1 -0
  237. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sm/smkjNAEzX7uLiRZnQA38poQvnhHE5uHIlMpkirr_K04.cache +2 -0
  238. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sp/speHfQOY_enyaPBbQt1HLH3tTkb9rb0Q_R6rCYcZBpY.cache +1 -0
  239. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ts/ts0TLKjOH1oInP5UXG1fPkdae8SUzbXjyNUP_UH6zks.cache +1 -0
  240. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/u4/u4-Kvxm2FBM0KKxXE_uvG6tJiJ2vUpmeh0Fi9jv8vyw.cache +2 -0
  241. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/uL/uLGtgHwju6gj8GsTS57M-n35Vb1PiYYKGRZIkq2tEg4.cache +1 -0
  242. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/uk/ukUZ2QewmCuQxvGJXf2qmAcazsbm4adK0-7wYxbwguQ.cache +1 -0
  243. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/v3/v3R5MQnqQlTH98cIm3XeSPbo9f58dk3q_3oqGtvgiEY.cache +1 -0
  244. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/vG/vG3d0UMPiYsK4f-N8LXN-5Y59kvC4Whc56Y_aKuT2To.cache +1 -0
  245. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/v_/v_O7CAdXG7icZucqoA971FxfXpz7XWC8PtjH-Z1HIFU.cache +3 -0
  246. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/vw/vw4hWcAaXGLEo2E8KRM86fVgJAvs7q3qkZYmkI2UYG0.cache +2 -0
  247. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/w8/w8XS90xe44-zLTirkVNvEMgky0Iu-y4R4tWoQTHOkWA.cache +1 -0
  248. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wE/wERepdikKyD943SdHeb45vidAQ-3GVSJjeViMG-Wv0M.cache +0 -0
  249. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wF/wFKZmATPBEEioBG1pZ_krFy7Cg5XizpOrJb5Ir7XPDA.cache +1 -0
  250. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wi/win_v0ZNu-l7AoRx8w3ls1xcy0mUExLBVMCSr5oaJFc.cache +0 -0
  251. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wn/wnqbc4jNHFLn9fcdGEkW7hGDGjU5quwOPh5T4cpPJgE.cache +0 -0
  252. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xq/xqwpimufxHDB-2mekCyXcPLODfRzSv8qGGxRtbqq6PM.cache +0 -0
  253. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yS/yShblMN24-kCKLNputE13zX6PfZweJ_bmHBJT_6-duI.cache +0 -0
  254. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yq/yqxTsMP8kmCSie9aYhLgHs_Db7h-sSa5vmqZZJUtwv0.cache +0 -0
  255. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yr/yrp_60uUSk5SlU1028XR4AIpun11BkJJOvIgatVUYBQ.cache +2 -0
  256. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/zP/zP1aZgVygnGx1-SZ3DE55BIPhL-NmyL6U0t2IEYLfgc.cache +1 -0
  257. data/spec/dummy/tmp/development_secret.txt +1 -0
  258. data/spec/factories/cmor_tags_taggings.rb +6 -0
  259. data/spec/factories/cmor_tags_tags.rb +6 -0
  260. data/spec/features/cmor/tags/search_spec.rb +26 -0
  261. data/spec/models/cmor/tags/search_spec.rb +35 -0
  262. data/spec/models/generic_spec.rb +50 -0
  263. data/spec/models/i18n_spec.rb +41 -0
  264. data/spec/rails_helper.rb +62 -0
  265. data/spec/rails_helper.rb~ +57 -0
  266. data/spec/spec_helper.rb +96 -0
  267. data/spec/spec_helper.rb~ +90 -0
  268. data/spec/support/capybara.rb +1 -0
  269. data/spec/support/factory_bot.rb +12 -0
  270. data/spec/support/formulaic.rb~ +5 -0
  271. data/spec/support/rao-shoulda_matchers.rb +5 -0
  272. data/spec/support/shoulda_matchers.rb +8 -0
  273. data/spec/support~/capybara.rb +1 -0
  274. data/spec/support~/factory_girl_rails.rb +5 -0
  275. data/spec/support~/shoulda_matchers.rb +8 -0
  276. metadata +639 -0
@@ -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::Tags::Tag => {},
14
+ Cmor::Tags::Tagging => {},
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::Tags::Tag => {},
6
+ Cmor::Tags::Tagging => {},
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,62 @@
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
+ # Add additional requires below this line. Rails is not loaded until this point!
9
+
10
+ # Requires supporting ruby files with custom matchers and macros, etc, in
11
+ # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
12
+ # run as spec files by default. This means that files in spec/support that end
13
+ # in _spec.rb will both be required and run as specs, causing the specs to be
14
+ # run twice. It is recommended that you do not name files matching this glob to
15
+ # end with _spec.rb. You can configure this pattern with the --pattern
16
+ # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
17
+ #
18
+ # The following line is provided for convenience purposes. It has the downside
19
+ # of increasing the boot-up time by auto-requiring all files in the support
20
+ # directory. Alternatively, in the individual `*_spec.rb` files, manually
21
+ # require only the support files necessary.
22
+ #
23
+ # Dir[Rails.root.join('spec', 'support', '**', '*.rb')].each { |f| require f }
24
+ Dir[Cmor::Tags::Engine.root.join('spec', 'support', '**', '*.rb')].each { |f| require f }
25
+
26
+ # Checks for pending migrations and applies them before tests are run.
27
+ # If you are not using ActiveRecord, you can remove these lines.
28
+ # begin
29
+ # ActiveRecord::Migration.maintain_test_schema!
30
+ # rescue ActiveRecord::PendingMigrationError => e
31
+ # puts e.to_s.strip
32
+ # exit 1
33
+ # end
34
+ RSpec.configure do |config|
35
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
36
+ config.fixture_path = "#{::Rails.root}/spec/fixtures"
37
+
38
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
39
+ # examples within a transaction, remove the following line or assign false
40
+ # instead of true.
41
+ config.use_transactional_fixtures = true
42
+
43
+ # RSpec Rails can automatically mix in different behaviours to your tests
44
+ # based on their file location, for example enabling you to call `get` and
45
+ # `post` in specs under `spec/controllers`.
46
+ #
47
+ # You can disable this behaviour by removing the line below, and instead
48
+ # explicitly tag your specs with their type, e.g.:
49
+ #
50
+ # RSpec.describe UsersController, :type => :controller do
51
+ # # ...
52
+ # end
53
+ #
54
+ # The different available types are documented in the features, such as in
55
+ # https://relishapp.com/rspec/rspec-rails/docs
56
+ config.infer_spec_type_from_file_location!
57
+
58
+ # Filter lines from Rails gems in backtraces.
59
+ config.filter_rails_from_backtrace!
60
+ # arbitrary gems may also be filtered via:
61
+ # config.filter_gems_from_backtrace("gem name")
62
+ end
@@ -0,0 +1,57 @@
1
+ # This file is copied to spec/ when you run 'rails generate rspec:install'
2
+ ENV['RAILS_ENV'] ||= 'test'
3
+ require File.expand_path('../dummy/config/environment', __FILE__)
4
+ # Prevent database truncation if the environment is production
5
+ abort('The Rails environment is running in production mode!') if Rails.env.production?
6
+ require 'spec_helper'
7
+ require 'rspec/rails'
8
+ # Add additional requires below this line. Rails is not loaded until this point!
9
+
10
+ # Requires supporting ruby files with custom matchers and macros, etc, in
11
+ # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
12
+ # run as spec files by default. This means that files in spec/support that end
13
+ # in _spec.rb will both be required and run as specs, causing the specs to be
14
+ # run twice. It is recommended that you do not name files matching this glob to
15
+ # end with _spec.rb. You can configure this pattern with the --pattern
16
+ # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
17
+ #
18
+ # The following line is provided for convenience purposes. It has the downside
19
+ # of increasing the boot-up time by auto-requiring all files in the support
20
+ # directory. Alternatively, in the individual `*_spec.rb` files, manually
21
+ # require only the support files necessary.
22
+ #
23
+ Dir[Cmor::Tags::Engine.root.join('spec/support/**/*.rb')].each { |f| require f }
24
+
25
+ # Checks for pending migration and applies them before tests are run.
26
+ # If you are not using ActiveRecord, you can remove this line.
27
+ # ActiveRecord::Migration.maintain_test_schema!
28
+
29
+ RSpec.configure do |config|
30
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
31
+ config.fixture_path = "#{::Rails.root}/spec/fixtures"
32
+
33
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
34
+ # examples within a transaction, remove the following line or assign false
35
+ # instead of true.
36
+ config.use_transactional_fixtures = true
37
+
38
+ # RSpec Rails can automatically mix in different behaviours to your tests
39
+ # based on their file location, for example enabling you to call `get` and
40
+ # `post` in specs under `spec/controllers`.
41
+ #
42
+ # You can disable this behaviour by removing the line below, and instead
43
+ # explicitly tag your specs with their type, e.g.:
44
+ #
45
+ # RSpec.describe UsersController, :type => :controller do
46
+ # # ...
47
+ # end
48
+ #
49
+ # The different available types are documented in the features, such as in
50
+ # https://relishapp.com/rspec/rspec-rails/docs
51
+ config.infer_spec_type_from_file_location!
52
+
53
+ # Filter lines from Rails gems in backtraces.
54
+ config.filter_rails_from_backtrace!
55
+ # arbitrary gems may also be filtered via:
56
+ # config.filter_gems_from_backtrace("gem name")
57
+ 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,90 @@
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
+ # The `.rspec` file also contains a few flags that are not defaults but that
16
+ # users commonly want.
17
+ #
18
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
19
+ RSpec.configure do |config|
20
+ # rspec-expectations config goes here. You can use an alternate
21
+ # assertion/expectation library such as wrong or the stdlib/minitest
22
+ # assertions if you prefer.
23
+ config.expect_with :rspec do |expectations|
24
+ # This option will default to `true` in RSpec 4. It makes the `description`
25
+ # and `failure_message` of custom matchers include text for helper methods
26
+ # defined using `chain`, e.g.:
27
+ # be_bigger_than(2).and_smaller_than(4).description
28
+ # # => "be bigger than 2 and smaller than 4"
29
+ # ...rather than:
30
+ # # => "be bigger than 2"
31
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
32
+ end
33
+
34
+ # rspec-mocks config goes here. You can use an alternate test double
35
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
36
+ config.mock_with :rspec do |mocks|
37
+ # Prevents you from mocking or stubbing a method that does not exist on
38
+ # a real object. This is generally recommended, and will default to
39
+ # `true` in RSpec 4.
40
+ mocks.verify_partial_doubles = true
41
+ end
42
+
43
+ # The settings below are suggested to provide a good initial experience
44
+ # with RSpec, but feel free to customize to your heart's content.
45
+ # # These two settings work together to allow you to limit a spec run
46
+ # # to individual examples or groups you care about by tagging them with
47
+ # # `:focus` metadata. When nothing is tagged with `:focus`, all examples
48
+ # # get run.
49
+ # config.filter_run :focus
50
+ # config.run_all_when_everything_filtered = true
51
+ #
52
+ # # Allows RSpec to persist some state between runs in order to support
53
+ # # the `--only-failures` and `--next-failure` CLI options. We recommend
54
+ # # you configure your source control system to ignore this file.
55
+ # config.example_status_persistence_file_path = "spec/examples.txt"
56
+ #
57
+ # # Limits the available syntax to the non-monkey patched syntax that is
58
+ # # recommended. For more details, see:
59
+ # # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
60
+ # # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
61
+ # # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
62
+ # config.disable_monkey_patching!
63
+ #
64
+ # # Many RSpec users commonly either run the entire suite or an individual
65
+ # # file, and it's useful to allow more verbose output when running an
66
+ # # individual spec file.
67
+ # if config.files_to_run.one?
68
+ # # Use the documentation formatter for detailed output,
69
+ # # unless a formatter has already been configured
70
+ # # (e.g. via a command-line flag).
71
+ # config.default_formatter = 'doc'
72
+ # end
73
+ #
74
+ # # Print the 10 slowest examples and example groups at the
75
+ # # end of the spec run, to help surface which specs are running
76
+ # # particularly slow.
77
+ # config.profile_examples = 10
78
+ #
79
+ # # Run specs in random order to surface order dependencies. If you find an
80
+ # # order dependency and want to debug it, you can fix the order by providing
81
+ # # the seed, which is printed after each run.
82
+ # # --seed 1234
83
+ # config.order = :random
84
+ #
85
+ # # Seed global randomization in this process using the `--seed` CLI option.
86
+ # # Setting this allows you to use `--seed` to deterministically reproduce
87
+ # # test failures related to randomization by passing the same `--seed` value
88
+ # # as the one that triggered the failure.
89
+ # Kernel.srand config.seed
90
+ end
@@ -0,0 +1 @@
1
+ require 'capybara'
@@ -0,0 +1,12 @@
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 += [
9
+ Cmor::Tags::Engine.root.join(*%w(spec factories)),
10
+ Rails.root.join(*%w(spec factories))
11
+ ]
12
+ FactoryBot.find_definitions
@@ -0,0 +1,5 @@
1
+ require 'formulaic'
2
+
3
+ RSpec.configure do |config|
4
+ config.include Formulaic::Dsl, type: :feature
5
+ end
@@ -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,8 @@
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
+ end
8
+ end
@@ -0,0 +1 @@
1
+ require 'capybara/rspec'
@@ -0,0 +1,5 @@
1
+ require 'factory_girl_rails'
2
+
3
+ RSpec.configure do |config|
4
+ config.include FactoryBot::Syntax::Methods
5
+ end
@@ -0,0 +1,8 @@
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
+ end
8
+ end