cmor_tags 0.0.1.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +22 -0
- data/Rakefile +19 -0
- data/app/assets/javascripts/cmor/tags/application/dummy.js +0 -0
- data/app/assets/javascripts/cmor/tags/application.js +13 -0
- data/app/assets/javascripts/cmor_tags.js +1 -0
- data/app/assets/stylesheets/cmor/tags/application/tag-labels.css +4 -0
- data/app/assets/stylesheets/cmor/tags/application.css +14 -0
- data/app/assets/stylesheets/cmor_tags.css +3 -0
- data/app/attribute_renderers/tag_list_renderer.rb +8 -0
- data/app/concerns/model/cmor/tags/taggable_concern.rb +13 -0
- data/app/controllers/cmor/tags/searchs_controller.rb +24 -0
- data/app/helpers/cmor/tags/application_helper.rb +14 -0
- data/app/models/cmor/tags/null_tag.rb +9 -0
- data/app/models/cmor/tags/search.rb +49 -0
- data/app/models/cmor/tags/tag.rb +5 -0
- data/app/models/cmor/tags/tagging.rb +25 -0
- data/app/views/cmor/tags/_search_box.html.haml +4 -0
- data/app/views/cmor/tags/_tag_labels_for_resource.html.haml +4 -0
- data/app/views/cmor/tags/searchs/_form.html.haml +3 -0
- data/app/views/cmor/tags/searchs/create.html.haml +8 -0
- data/app/views/cmor/tags/searchs/new.html.haml +2 -0
- data/app/views/layouts/cmor/tags/application.html.erb +14 -0
- data/config/initializers/assets.rb +0 -0
- data/config/initializers/inject_taggable_concern.rb +6 -0
- data/config/locales/de.yml +48 -0
- data/config/locales/en.yml +48 -0
- data/config/routes.rb +14 -0
- data/db/migrate/20190301132031_add_color_to_tags.rb +6 -0
- data/lib/cmor/tags/configuration.rb +21 -0
- data/lib/cmor/tags/engine.rb +8 -0
- data/lib/cmor/tags/version.rb +7 -0
- data/lib/cmor/tags.rb +10 -0
- data/lib/cmor_tags.rb +20 -0
- data/lib/generators/cmor/tags/install/install_generator.rb +32 -0
- data/lib/generators/cmor/tags/install/templates/application_controller.source +3 -0
- data/lib/generators/cmor/tags/install/templates/initializer.rb +25 -0
- data/lib/generators/cmor/tags/install/templates/routes.source +2 -0
- data/lib/tasks/cmor/tags_tasks.rake +8 -0
- data/spec/dummy/app/assets/config/manifest.js +3 -0
- data/spec/dummy/app/assets/javascripts/cable.js +13 -0
- data/spec/dummy/app/channels/application_cable/channel.rb +4 -0
- data/spec/dummy/app/channels/application_cable/connection.rb +4 -0
- data/spec/dummy/app/jobs/application_job.rb +2 -0
- data/spec/dummy/app/mailers/application_mailer.rb +4 -0
- data/spec/dummy/app/models/application_record.rb +3 -0
- data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/spec/dummy/app/views/posts/_post.html.haml +1 -0
- data/spec/dummy/bin/update +31 -0
- data/spec/dummy/bin/yarn +11 -0
- data/spec/dummy/config/cable.yml +10 -0
- data/spec/dummy/config/initializers/application_controller_renderer.rb +8 -0
- data/spec/dummy/config/initializers/cmor_tags.rb +25 -0
- data/spec/dummy/config/initializers/content_security_policy.rb +25 -0
- data/spec/dummy/config/initializers/i18n.rb +2 -0
- data/spec/dummy/config/initializers/route_translator.rb +3 -0
- data/spec/dummy/config/puma.rb +34 -0
- data/spec/dummy/config/spring.rb +6 -0
- data/spec/dummy/config/storage.yml +34 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20190325181515_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb +37 -0
- data/spec/dummy/db/migrate/20190325181516_add_missing_unique_indices.acts_as_taggable_on_engine.rb +26 -0
- data/spec/dummy/db/migrate/20190325181517_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb +20 -0
- data/spec/dummy/db/migrate/20190325181518_add_missing_taggable_index.acts_as_taggable_on_engine.rb +15 -0
- data/spec/dummy/db/migrate/20190325181519_change_collation_for_tag_names.acts_as_taggable_on_engine.rb +15 -0
- data/spec/dummy/db/migrate/20190325181520_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb +23 -0
- data/spec/dummy/db/migrate/20190325181525_create_posts.rb +9 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +188 -0
- data/spec/dummy/log/test.log +282 -0
- data/spec/dummy/package.json +5 -0
- data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/spec/dummy/public/apple-touch-icon.png +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/0A/0ATFLQloq-lmKTIr3WSckCFJcAF8juR7mfCg-lF-wiM.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/0o/0oYvKhVhlcNdnSd31OdrAqp3ym7sUUDHbG1HNmJSZ3M.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/0q/0qG4-skAgaIFYfgXot0N-nlaoAqYyqyXJL_6WkhsUyE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/1U/1U3G1wyHveocXxP8A5aYDGiC2mJXzw9evqwGcC7Dc5I.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/1l/1lEMv6jfoaJrLEZK5L1WTsXBWmWTrEaRFH9MlBcIVDg.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/23/23Lc8nnJ_U4euxFVp7P5D_GLLcMoFY3xJcNsVgoOfjE.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/29/29nD1YSEEB_gaB2_pdE--gkJvqx7W0PhEymY2qrkTic.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/2J/2JZ8VAYhkBcWE3sok5fqFK1opx8vf16OKQxVHfUPn4k.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/2S/2Sjg-i6TWZhzN55SEnzTtNi0dYztgd2sAURZXblJLOY.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/2v/2vMg6aDV_y44K_JDBHL9BxRGSrju03XdjGenJGyTRSY.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/3N/3NRHvUh8BPHd10NY-S5hOul6afZ6SL8OgvWDQpnHvHo.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/3a/3ayqDM10RGgeN8gahYJKiyupAtcAdfNqn0Z2ayegFrM.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/4O/4OSrr9rd8i_fS9ZwF3X7jOa91rLnqE7B1WvNzf226YA.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/55/55cmHSQGq-mSD_VcgBeL9IaCa-v5PCbbypOu6a45oqA.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/5C/5CwvRQ-TbXPe8yNl8e0KM6UANx6cNrhP_KgMfnYx30Y.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/5L/5L-FSYLjBxDmPgzI_CAYGDk-9Mni9w9C57XkJeyt5LA.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/5o/5oMaZ8U_dFX9l_Tukp1P7IpPMK2AMxKxgRtnR_zgT2Y.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/6e/6eHLns1-9lpL1ONXkJHSM9src6rLg-c1X_ABZTpGJU0.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7-/7-GQEvgBAbjNHZWq_JUZLS06RYzLo9NdwiXNnhEGtT0.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/72/72JwV5KO29y1zyFbW5LzL1_p-pj-nxz06qvPjrepgHc.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/79/79jR4Uf_pUhttCKeRR-xEPMITP6aTnSgtQIa8EfUW8E.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7A/7A6KkmMqogd1hYdBJzKdfYx7s-UV4fkF0y5MniETAmc.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7a/7a_xvuKI_jNbh2hLSKtSl1eJpscSQdbnWgZt0-Zj5nE.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8-/8-QQLtMujDnjyd2fI0Ygw5qXaATxumVuyPKDpUWewKE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8Q/8Qv0pOFexuQn3xn0g8_E7UAZoZjcSudR3eCadt2r1ic.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8T/8THGXP-2ZR_f_xkWiiQJAygjklf0nA4mQKSuleFm-80.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8a/8ajPb-OzTZfJhLUn_WTTxIhzbIAaEA4HewIA-jOj--c.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8c/8cJgoNVa-FivkHV5N-aDWa0-wK9hK8cH-pHXeUolRBU.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8d/8d2Wh67es5lOz-sg_C6i93xo_MbzmASA_0DuBKkeVkk.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/9-/9-QH-D5T9oHDy57Oeh3dkNqGs2OGh7zlo29ANf6DyQw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/9A/9Adi_AFfM0LKzawMf35rtCuEf9joQWvntGqClAdJ1yc.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/9X/9XGDlZ-wXiPAQGAb-AFzJf71D_UYBnHVCs_Q5SR2FPA.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/AL/ALpIzE1pNpiyS00dwE7gRrdXjTK6FrylELfoihpUNY8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Av/Av2RbvMe-Vv4_XgSJ5dpE_uURyCaSmDnFcwqKKUKh6M.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ax/AxM3U92ykKafOIl607NzgFn79bJKzT8b4JF0ZiiWON8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/BB/BBFDN2hfpOd0HsQFPakCBQvzpZ1r65OpAyPRTYnjnGA.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/BP/BPOIywq90q0tV6CFK2llqr-24KniQp3p3iOFrnsN9DU.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/BV/BV80JS73aw87gEpMBSaD9PeOz8qJOfY1zuXKNgv41C0.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/C1/C14-auZ3RPbRcVrqnpPojLEZWY8ESps0NNrrpSuICqs.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/C5/C5D4T0_nOZRxlB1Kr3YBjpAz13VAaGm5141p_IqSHEw.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/C6/C6hq0gmlv8BxoBBBLyuqt813xUy2up1IYwsvLJ252DA.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Du/DuUv3-G020JVW8ln6235zybFLuL2nbTFKeSzmyBBWFE.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/E9/E9H7SqtoOr-Fj2skhd8UFmrpf67brNmEDwZEYBdfKJw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/EZ/EZMdXsWigDVBrQc84YabkYd_aVvILvUt4B4M-GGPEG8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Eu/Eu5OyZ39Bbmc1_8ahhhHTnTMLE9Pf9l5oS2IubMCenY.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ex/Exni9T-N0D00xhk9o73AIRL5YUOyHlJTj0i9YuzvnvQ.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/F7/F74fucogx91yB5PW70H7x0uAJV_sYuVfbAg73rR-wUI.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/FD/FDXlm_Ar6rU8kIsnfv5kd4qR0hqXS9n9BW1I5DBdS2M.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Fy/FyrJbZ1Rn6UMVr-v-ObZpnQspgNLG61KDnTAM5iN9uE.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/GU/GUseAf9pqMSpBX0vXLK1OeQIV_s5fqSvGme-2XqkfuY.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/H2/H2ht1BkseqMwkBsCd_IyjMFMqZGkRjd6M1vKOHMIagY.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/HC/HCDOUd7-S45aJ_PjVAC_Vmjyud3i1aQv4cE3t9_Z3Dw.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/HZ/HZ1iRdzAHZ8o4HrWUPniUmrldI0rrw3czGHIlhKx20Q.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/He/HecOTm2I7FI72g6WsDema6iCkNczdDeN-EGJUumsQd4.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Hx/HxDhLNAjgpAjWKLIYCTcv1gXd11GGWXDRkGMlW1ZL4o.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/KU/KUadIyonXR1Vyz07b6lra7kQIWQVonzIiOzZCJOK4IE.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/LP/LPRW7sjtiZqWeoDwfE1phJiuSjesI8-twmkAwlmqWXo.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/MC/MCuEd_HWd5C2COVhVm23pI9wjRXLZI7gB5cNb6b_5X4.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/MR/MRs-3DA21hnk0VBZ6dGeSXqp0bQm4hi-QOZOq1uHeGE.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/N4/N4tnRbkFBVwDQ7etLF-LVe9rHnYTS2aZEqtn8mqf9-c.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/NA/NA7TG8OGXra5NGU5ptqd0TbvuCX0sB2U1SUbbOgo_ik.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/NE/NELJj39rhhdroUI5gqIG1WvBHocVvLRYMGBQ79vToxM.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Nh/Nhyy848jZRods00snp4YybUITS-4UBS1H41XtTcohP4.cache +4 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/O0/O0M_rsBWNKWOXrRYGDaaHL4oewoIG2wtxBr2SMYiL5c.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Oa/OaQBnCJMy3nhgYuPPZz-rbN_NVd20hib32GM-5ZrlRo.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/PD/PD99Bcd5AQWB3NVDhz4dX9LI8A31bqUs4N-qUdEFCAE.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/PI/PIysz08byyvXlaQfthLgm79fjzz0rZ0el42dAQq2hf8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/PQ/PQu0qCwIT4XZCVKzPFZQNRhtZvB35DK5OGXWTvPqStE.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/PR/PRT9nnPny7IjFKgxlxXRMImaDpesdM67Mo1xAbEJwQ8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ps/PszMV6m4MlExX0S7BdpDj_Nr22lCzS2HfqQPK3EDphw.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Pv/PvcQ4n7NaBNu_e-Q72qgPoDwOoTOv7Ki75PF-H0O5d0.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/QX/QXeO0ubZ7H91Nm-xQPMa6B1sZAq6hTcgyU05DRTIx3c.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Qd/QdQr7ZLZ-zG-HwQraQO2TzlbnblrLM73WZ4BB4Tc24k.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Qp/Qp1AU6KG2Z9v2ip-6UVINfb_6l3BzrQjzglB0yBiIWY.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/R6/R6W1OhmXADlwn2paOoImbgcKCpB8tY4uwtVA27HImuc.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/RY/RYidNj6Thirp6c4fYrHw6satQpwScKljLagQ4jRngvE.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/SE/SEZX3HFRvXh7LLjkgP2md53CV2rvXwnzhOkwd9W9N9U.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ss/Ss9sD2j7Ox5HAulf2tzL4nmhG4uMqUQfW-0lxb5s434.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Sy/Sy0jX4N-RpyfZ-N5FLkIWw3gfgqXtqgGJarBfMukHp8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/U5/U5KMYvIoLRI3aI9tIsBcRnVawS-s2s3QlLrC4kAcmGA.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/UM/UMTeo1_fvHO3GlNnieKfaJA_xoXfuYoWQSY0aNeaqQ8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Uc/Uc2hcKC_z4VdeM7vBRo3IGSANNMT5zgfhjnuohH6CV0.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Um/UmmPRM3DBv1Tbop82iskBpVNz6CWAu8Bss-5XlmKmHI.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/VS/VSliUoy2QKm5bR_26CTaylVZY4o61YuE0gr5kqU6UJE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/VU/VUcMwPMF1zc5zEWpuqPsX7kqAnkiUp8tbEFZ5Hkl_aw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Vr/VrtEHnJmqjZwGxBqPWkxmfbuNoZ_ZlWNmLzKRC924FU.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/W8/W8QHp8Xk5cW9goP5r5jiN5HiTuupbMLd3iJO4vQNr8A.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/WI/WITMO7-QJWNyQ1SqvzHDJMaHfvJTy08uxHcwVRvEdmk.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Xk/XkVHFvPaI-xAbAcXZSv_EslOO0sXQSOJi2v9-w5UyE4.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Y0/Y0__Ks5VsmMbst0IZJTWkj_zdPjZLag411S1AWpnMfI.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Y4/Y40tZQHUgCeaVY-x7UDWg6qDZ_nBPW9wAsKSlxMy2YY.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Yv/Yv4Mz9s_ARThs1GcSLUJC0USmVHrIqMwIJ9wJavhtIY.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ZG/ZG2jD-bpYZlRxvFlefZvhPle80TRz1eilMrHFdyKqpM.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Zj/ZjK1fvOKdajGTfU5pRn8x2UWgX8GWvuTXo24RENXREM.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Zt/Zt_8JRM9d25lTIoWOG4CGD0D-8V7piPlpY-LSLY9zp0.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/_U/_Uz5da-URnRhVpIycPwOq3dvEZay17seoAYyPNNT_d4.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/_v/_vHhLuv_HO3ndie5PLld1rfmAfh8Y54vtbj14lnA97w.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/_z/_zt32LQMzUJ0s5mgC5VE6A9U3nNudIL-CQ2CUbSP2jE.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/a7/a72HuHs9A4s8WqPxyhKbkKSzJUdgikYwmfJyixbjZGA.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/aQ/aQL0CNPS5ESzN5XcS9o8NF7i4bv4pCm0xdrA7vfw5fc.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/b8/b86NyU0f7kebqkFxncuEOBtaTD6wBX-sxudb3wLDQpo.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/bD/bDIuRJAlDi98cyI-tv6gf95cK6b2lDclVk6gw7-4yQE.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/bL/bLkqyRwp_AqHB5D3TbRQOPco-SC_NfsOa3SwEkbBFVY.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/bX/bXAKVbDDLCbJ33E_zQXJIBZoz5899kzzfq_Q3PndD0o.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/bl/blP7I9wrpMZirmqxSinkxvHgn7dwfxBAvHlUkCTQf9Q.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/c7/c7CooReQb2ejxEumMNCGRid6lhlPFxxlYhiSx0BnFf4.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/cB/cBfQ4Z7iTpfUfA-bM4vTRBezdD2EgnfnxuZHq7RC1EM.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/cn/cnhAFPFfinOAskt9hrkQ2LTHThvc9sSrdTSrl_Io0ds.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/cu/cuW8s9P2oOvuK0LrnxPNNcYzPUUgAWMg33M8kT-td6k.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dG/dG2st3mUGsh-8yC115nqU2IltElHJVNhu2vRfijxs20.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dH/dHbb8VsMsr9XdHfbPspVNcQNDmKHyHv90O3s_n_wVVw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dZ/dZ8aIUTQl_V08dRUgErYxIBZ0py5MjHDdTfCSKQf0gM.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dZ/dZtoL2N-kuka3HWX3PhlY8j-ITKs4bNxiFOkhsIjMjw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dl/dlBTWxsKYOOgn44yc6vGybDehP1pRNfOWN5-r5cvMl4.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dt/dtZXNx3vKNUUUnM0rFpgoUWIag_mxLlY48n9l6HJ7R8.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/e3/e3c0WJrAcOOtTCdVYS9y2BPGklYG_5zH-2VPRCad990.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/e7/e7udXkUqgnnEl6_gMnpAC_5eiuEcUZM3D7BP7elrN00.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ek/ekV-kLj0Y6c5a9bVLMSA1guKtOfsB7Gsn1qxuyb3ejg.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/el/elYS15GAoe--COYSC8vXUOxTrMFONIJN82xLCodoiIc.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fR/fRbCj1aNB38O-9pznPKZJ-EZoFXBeVilAs0WroTkIEM.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fq/fqqy6XMocl_Tx0nWsOC1LQ_uj3jUrV-CN8kMgtDR0Bc.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fv/fvftxvByD8vR3z32V1RKnvqbA5bFlgvdN7wtxLBuISo.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/gH/gHc5zZFGo93R1QKNijIJYz0bT4g7jRda_CxttyITNrY.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/gy/gyZPzWUmhSQhTuuyRou2UonnbpuuFSvMPySAe8RUE3g.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/h2/h2105zpTSZpcHFRSflO76h8HYkCNszW9lJyzCw-eLQ0.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/h2/h2Z8WDQyX5n1-QdXQ91K4YEEwB06lFUpr4uOjr__uyc.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/hf/hfti6m6fT1lCAGxukz24_HRQJ_Yxy55m0W2dyeHuVe4.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/iB/iBotPTXLWAzSQjo1wRT9wQilhr4-7c6OGOm50z0Nw_E.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/i_/i_s59CkDPBCbkVzR2yxiT9kpEI1B0pO0OYOIwTGpkcI.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/jK/jKHqW1VBzFtw_WgOZ-5WFrod_nbiYJ_Duey1VZXs3Mo.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/k3/k31C_Rf-ifBroR-8rtNJzKv97oyxKKk2s5njNhp-yKE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/kD/kDartayL6A6j26rd-NkFIU9yqvIIJh9IUdiLsbuHoPY.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/kQ/kQO5QnfECSRFs7omWBm6nggWngVK5Wac3_dKMjgxHtk.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/lS/lStvx9Beg2l4s8L-QdTSKuc5_qQPQAZPnIcRI7JkpPE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/lV/lVQpEtZBWKuLzLechjY8ESgnO0bkoqFBs2WMM0TjaGE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/la/laei9qw2p6gQIRT1xHJFT4GhOTjIvqoHiTNV9G4GQzw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ls/lssw4HuF9TbG50gCrqs6T8LGQWwDMSqRC3Wp8FqqMpo.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nF/nFcmGFEHfCPMj4z356tmGsemget1Vq-QoxxIyaZWiGk.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/n_/n_xYqQYhwEMQknb3jFQnjlxxBE9TzMNHCdJ-bEyZFIw.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nq/nqBvCfX72u2EvAyNfHt3upjIFz009V5YYgwPmmaNRH4.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nt/ntry6y5LOGB3mXS76ylx-eIcul__UqoQoqB4-0eaNnI.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nw/nwkcTJn2Q2Psx4XjKjgxw-Q-7ANbZ2E9yH_HCK50oxQ.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nx/nxTv3sKVUQZADJyM3dPaVmUA78MIsMLD_K279yN_GsI.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ny/nyncywtu30BHeG-vizWSdXxNakMEjE66N78If2y6vNY.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/o3/o3KriyUH_Oim5tx6IQaMksR5QXoplqfIdBx_q8FuGJ8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/o9/o9uark_TmW5KZtMyRyxh2nJCW_McyLavKG81CQwo3R0.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/o_/o_sbBYPtSI5HJ3xoreWOKzbaPHCBOQLIbA-tD93Iw9I.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/pB/pBan2_e-mmViTiLjuRhKq3JBDzG6roNOXULsGuvnbg8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/pB/pBfE-Z1ByE48wvW5zYFu7h11vNxp2ICAJZO2Q1FeoYM.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/pQ/pQkUK6Yu2rT3Jm0utfTnzItK16hzeDJffNXExAjJr7A.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/px/pxTPoRetayDOk6WMniYis0WROOw0YcTZbH8lu9-itHg.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qJ/qJ5Sgj2xpuC8q-I2Jb1eBu-sGWL9oVeX7NS-HeFo8DA.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qN/qNfQYqDd98wAJnH5g_7uRNAcgdxuC-aB-zdYvF3788g.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qY/qYGQ7_x90s8we-9-JKA2DhBWgvlgLXUzB-7mowVImlQ.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qj/qjs-t5igalSCJwoa3mOZImVnSBYVdKap1x0jwveJ_vI.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qq/qqeUBxpDPTNXL2hYWXX8t_E_jxRkRpjhJR-FcdiLWr0.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/r3/r3ous1Avo09j8KN-CDZEfwUGP8XkHPAJ6w0yF_JZZ1A.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/r9/r90r3TkyWqdl0bLxLsG8rjjqqLW_Wk2WCGkS0SADkbI.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sL/sLfo-t4UFr-WaYFPc6tf_yrL1g9htJCKdURpb0OzgFE.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/si/si8itwNDYuY2nxBFi_m0z4WVJBnvSN9fAhC94U9qz9A.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sj/sjdps2NJkERt-eWGF-YPxHTICplfxo6HdJo1FNRt6xQ.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sm/smkjNAEzX7uLiRZnQA38poQvnhHE5uHIlMpkirr_K04.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sp/speHfQOY_enyaPBbQt1HLH3tTkb9rb0Q_R6rCYcZBpY.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ts/ts0TLKjOH1oInP5UXG1fPkdae8SUzbXjyNUP_UH6zks.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/u4/u4-Kvxm2FBM0KKxXE_uvG6tJiJ2vUpmeh0Fi9jv8vyw.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/uL/uLGtgHwju6gj8GsTS57M-n35Vb1PiYYKGRZIkq2tEg4.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/uk/ukUZ2QewmCuQxvGJXf2qmAcazsbm4adK0-7wYxbwguQ.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/v3/v3R5MQnqQlTH98cIm3XeSPbo9f58dk3q_3oqGtvgiEY.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/vG/vG3d0UMPiYsK4f-N8LXN-5Y59kvC4Whc56Y_aKuT2To.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/v_/v_O7CAdXG7icZucqoA971FxfXpz7XWC8PtjH-Z1HIFU.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/vw/vw4hWcAaXGLEo2E8KRM86fVgJAvs7q3qkZYmkI2UYG0.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/w8/w8XS90xe44-zLTirkVNvEMgky0Iu-y4R4tWoQTHOkWA.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wE/wERepdikKyD943SdHeb45vidAQ-3GVSJjeViMG-Wv0M.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wF/wFKZmATPBEEioBG1pZ_krFy7Cg5XizpOrJb5Ir7XPDA.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wi/win_v0ZNu-l7AoRx8w3ls1xcy0mUExLBVMCSr5oaJFc.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wn/wnqbc4jNHFLn9fcdGEkW7hGDGjU5quwOPh5T4cpPJgE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xq/xqwpimufxHDB-2mekCyXcPLODfRzSv8qGGxRtbqq6PM.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yS/yShblMN24-kCKLNputE13zX6PfZweJ_bmHBJT_6-duI.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yq/yqxTsMP8kmCSie9aYhLgHs_Db7h-sSa5vmqZZJUtwv0.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yr/yrp_60uUSk5SlU1028XR4AIpun11BkJJOvIgatVUYBQ.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/zP/zP1aZgVygnGx1-SZ3DE55BIPhL-NmyL6U0t2IEYLfgc.cache +1 -0
- data/spec/dummy/tmp/development_secret.txt +1 -0
- data/spec/factories/cmor_tags_taggings.rb +6 -0
- data/spec/factories/cmor_tags_tags.rb +6 -0
- data/spec/features/cmor/tags/search_spec.rb +26 -0
- data/spec/models/cmor/tags/search_spec.rb +35 -0
- data/spec/models/generic_spec.rb +50 -0
- data/spec/models/i18n_spec.rb +41 -0
- data/spec/rails_helper.rb +62 -0
- data/spec/rails_helper.rb~ +57 -0
- data/spec/spec_helper.rb +96 -0
- data/spec/spec_helper.rb~ +90 -0
- data/spec/support/capybara.rb +1 -0
- data/spec/support/factory_bot.rb +12 -0
- data/spec/support/formulaic.rb~ +5 -0
- data/spec/support/rao-shoulda_matchers.rb +5 -0
- data/spec/support/shoulda_matchers.rb +8 -0
- data/spec/support~/capybara.rb +1 -0
- data/spec/support~/factory_girl_rails.rb +5 -0
- data/spec/support~/shoulda_matchers.rb +8 -0
- metadata +639 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c498d9c739541de6cf559d242a44786976b92f8700a44dfe1a59219335370602
|
4
|
+
data.tar.gz: e3e180c0bb3a43ad89430bd86f7e3da0b477eb43e5094d8b171e75156156ebd3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c0c1e4feca553afe661e8d609d71b9226c99239fb0cadb12d4f0aee7fa62d81ddd836ab8548f99cdff7a4c76f858d7c4c22f54e78831d641655879c893c15b84
|
7
|
+
data.tar.gz: 69394c64a1fb8cbaa5637beb197cf143e7aaadcf74c7c53df357ee3d7ecf0e028585743e24d87987d6a5687e649c22e00e273cf32cf8b04ebb72f90ec7cec3f8
|
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/README.rdoc
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
= Cmor::Tags
|
2
|
+
|
3
|
+
= Installation
|
4
|
+
|
5
|
+
Add it to your gemfile:
|
6
|
+
|
7
|
+
# Gemfile
|
8
|
+
gem 'cmor_tags'
|
9
|
+
|
10
|
+
Add migrations:
|
11
|
+
|
12
|
+
$ rake cmor_tags:install:migrations
|
13
|
+
|
14
|
+
Migrate:
|
15
|
+
|
16
|
+
$ rake db:migrate
|
17
|
+
|
18
|
+
|
19
|
+
= How do I run tests?
|
20
|
+
|
21
|
+
$ RAILS_ENV=test rake db:migrate
|
22
|
+
$ guard
|
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::Tags'
|
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'
|
File without changes
|
@@ -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 ./application
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require ./cmor/tags/application
|
@@ -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 ./application
|
13
|
+
*= require_self
|
14
|
+
*/
|
@@ -0,0 +1,8 @@
|
|
1
|
+
class TagListRenderer < ResourceRenderer::AttributeRenderer::Base
|
2
|
+
def display(attribute_name, _label, _options = {}, &_block)
|
3
|
+
tag_list = value_for_attribute(attribute_name)
|
4
|
+
output = tag_list.collect do |tag|
|
5
|
+
h.content_tag(:span, tag, class: 'label label-default')
|
6
|
+
end.join(' ').html_safe
|
7
|
+
end
|
8
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Cmor
|
2
|
+
module Tags
|
3
|
+
class SearchsController < Cmor::Tags::Configuration.base_controller.constantize
|
4
|
+
include Rao::ServiceController::ServiceConcern
|
5
|
+
include Rao::ServiceController::RestActionsConcern
|
6
|
+
include Rao::ServiceController::RestServiceUrlsConcern
|
7
|
+
include Rao::ServiceController::ServiceInflectionsConcern
|
8
|
+
include Rao::ServiceController::LocationHistoryConcern
|
9
|
+
|
10
|
+
helper Twitter::Bootstrap::Components::Rails::V4::ComponentsHelper
|
11
|
+
|
12
|
+
def self.service_class
|
13
|
+
Cmor::Tags::Search
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def permitted_params
|
19
|
+
return {tag_list: params[:tag_list] } if params.has_key?(:tag_list)
|
20
|
+
params.require(:search).permit(:tag_list, :taggable_classes, :exact)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Cmor
|
2
|
+
module Tags
|
3
|
+
module ApplicationHelper
|
4
|
+
def tags_search_box
|
5
|
+
@tag_search ||= Cmor::Tags::TagSearch.new
|
6
|
+
render partial: 'cmor/tags/search_box'
|
7
|
+
end
|
8
|
+
|
9
|
+
def tag_labels_for(resource)
|
10
|
+
render 'cmor/tags/tag_labels_for_resource', resource: resource
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
module Cmor::Tags
|
2
|
+
class Search < Rao::Service::Base
|
3
|
+
class Result < Rao::Service::Result::Base
|
4
|
+
attr_accessor :tag_list, :taggable_classes, :exact, :found
|
5
|
+
end
|
6
|
+
|
7
|
+
attr_accessor :tag_list, :taggable_classes, :exact
|
8
|
+
|
9
|
+
validates :tag_list, presence: true
|
10
|
+
|
11
|
+
def tag_list
|
12
|
+
@tag_list ||= ''
|
13
|
+
end
|
14
|
+
|
15
|
+
def taggable_classes
|
16
|
+
@taggable_classes ||= Cmor::Tags::Tagging.distinct.pluck(:taggable_type)
|
17
|
+
end
|
18
|
+
|
19
|
+
def exact
|
20
|
+
@exact ||= Cmor::Tags::Configuration.tag_search_exact_default_value
|
21
|
+
end
|
22
|
+
|
23
|
+
def exact=(value)
|
24
|
+
if Rails.version < '5.1'
|
25
|
+
@exact = ActiveRecord::Type::Boolean.new.type_cast_from_database(value)
|
26
|
+
else
|
27
|
+
@exact = ActiveRecord::Type::Boolean.new.cast(value)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def _perform
|
34
|
+
@result.found = search!
|
35
|
+
end
|
36
|
+
|
37
|
+
def wild
|
38
|
+
@wild ||= !exact
|
39
|
+
end
|
40
|
+
|
41
|
+
def any
|
42
|
+
@any ||= !exact
|
43
|
+
end
|
44
|
+
|
45
|
+
def search!
|
46
|
+
taggable_classes.each_with_object({}) { |klass, result| result[klass] = klass.constantize.tagged_with(tag_list.split(', '), any: any, wild: wild) }
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Cmor::Tags
|
2
|
+
class Tagging < ActsAsTaggableOn::Tagging
|
3
|
+
self.table_name = 'taggings'
|
4
|
+
|
5
|
+
def human
|
6
|
+
"#{taggable} - #{tag}"
|
7
|
+
end
|
8
|
+
|
9
|
+
def taggable=(taggable)
|
10
|
+
if taggable.is_a?(String)
|
11
|
+
super(GlobalID::Locator.locate(taggable))
|
12
|
+
else
|
13
|
+
super
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def tagger=(tagger)
|
18
|
+
if tagger.is_a?(String)
|
19
|
+
super(GlobalID::Locator.locate(tagger))
|
20
|
+
else
|
21
|
+
super
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,4 @@
|
|
1
|
+
= simple_form_for(@tag_search, url: cmor_tags.tag_searchs_path, html: { class: 'navbar-form navbar-left' }) do |f|
|
2
|
+
= f.input :tag_list, label: false, placeholder: t('.search')
|
3
|
+
- if Cmor::Tags::Configuration.add_submit_button_to_search_box
|
4
|
+
= f.button :submit, class: 'btn btn-success', id: 'new_tag_search_submit'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
= simple_form_for(@service, url: url_for(action: :create, only_path: true)) do |form|
|
2
|
+
= render partial: 'form', locals: { form: form }
|
3
|
+
|
4
|
+
#tag_search_result
|
5
|
+
- @result.found.each do |class_name, resources|
|
6
|
+
- if resources.any?
|
7
|
+
%h2= class_name.constantize.model_name.human(count: :other)
|
8
|
+
= render partial: "#{class_name.tableize}/#{class_name.demodulize.underscore}", collection: resources, as: class_name.demodulize.underscore.to_sym
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Tags</title>
|
5
|
+
<%= stylesheet_link_tag "cmor/tags/application", media: "all" %>
|
6
|
+
<%= javascript_include_tag "cmor/tags/application" %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
File without changes
|
@@ -0,0 +1,48 @@
|
|
1
|
+
de:
|
2
|
+
classes:
|
3
|
+
cmor/tags/engine: Tags
|
4
|
+
attributes:
|
5
|
+
tag_list: Tags
|
6
|
+
activerecord:
|
7
|
+
models:
|
8
|
+
cmor/tags/tag:
|
9
|
+
one: Tag
|
10
|
+
other: Tags
|
11
|
+
cmor/tags/tagging:
|
12
|
+
one: Tagging
|
13
|
+
other: Taggings
|
14
|
+
attributes:
|
15
|
+
cmor/tags/tag:
|
16
|
+
id: ID
|
17
|
+
color: Farbe
|
18
|
+
name: Name
|
19
|
+
taggings_count: Getagte Objekte
|
20
|
+
created_at: Erstellt am
|
21
|
+
updated_at: Aktualisiert am
|
22
|
+
cmor/tags/tagging:
|
23
|
+
id: ID
|
24
|
+
color: Farbe
|
25
|
+
context: Kontext
|
26
|
+
tag_id: Tag
|
27
|
+
tag: Tag
|
28
|
+
taggable_id: Getagtes Objekt
|
29
|
+
taggable: Getagtes Objekt
|
30
|
+
taggable_type: Getagtes Objekt-Typ
|
31
|
+
tagger_id: Ersteller
|
32
|
+
tagger: Ersteller
|
33
|
+
tagger_type: Ersteller-Typ
|
34
|
+
created_at: Erstellt am
|
35
|
+
updated_at: Aktualisiert am
|
36
|
+
cmor/tags/search:
|
37
|
+
exact: Wortgenau
|
38
|
+
tag_list: Tags
|
39
|
+
cmor:
|
40
|
+
tags:
|
41
|
+
search_box:
|
42
|
+
search: "Katzen, Baum, grün, ..."
|
43
|
+
helpers:
|
44
|
+
submit:
|
45
|
+
search:
|
46
|
+
create: 'Suchen'
|
47
|
+
routes:
|
48
|
+
cmor_tags_engine: tags
|
@@ -0,0 +1,48 @@
|
|
1
|
+
en:
|
2
|
+
classes:
|
3
|
+
cmor/tags/engine: Tags
|
4
|
+
attributes:
|
5
|
+
tag_list: Tags
|
6
|
+
activerecord:
|
7
|
+
models:
|
8
|
+
cmor/tags/tag:
|
9
|
+
one: Tag
|
10
|
+
other: Tags
|
11
|
+
cmor/tags/tagging:
|
12
|
+
one: Tagging
|
13
|
+
other: Taggings
|
14
|
+
attributes:
|
15
|
+
cmor/tags/tag:
|
16
|
+
id: ID
|
17
|
+
color: Color
|
18
|
+
name: Name
|
19
|
+
taggings_count: Tagged Items
|
20
|
+
created_at: Created at
|
21
|
+
updated_at: Updated at
|
22
|
+
cmor/tags/tagging:
|
23
|
+
id: ID
|
24
|
+
color: Color
|
25
|
+
context: Context
|
26
|
+
tag_id: Tag
|
27
|
+
tag: Tag
|
28
|
+
taggable_id: Taggable
|
29
|
+
taggable: Taggable
|
30
|
+
taggable_type: Taggable type
|
31
|
+
tagger_id: Tagger
|
32
|
+
tagger_type: Tagger type
|
33
|
+
tagger: Tagger
|
34
|
+
created_at: Created at
|
35
|
+
updated_at: Updated at
|
36
|
+
cmor/tags/tag_search:
|
37
|
+
exact: Exact
|
38
|
+
tag_list: Tags
|
39
|
+
cmor:
|
40
|
+
tags:
|
41
|
+
search_box:
|
42
|
+
search: "cats, tree, green, ..."
|
43
|
+
helpers:
|
44
|
+
submit:
|
45
|
+
tag_search:
|
46
|
+
create: 'Search'
|
47
|
+
routes:
|
48
|
+
cmor_tags_engine: tags
|
data/config/routes.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
Cmor::Tags::Engine.routes.draw do
|
2
|
+
localized do
|
3
|
+
scope :cmor_tags_engine do
|
4
|
+
resources :searchs, only: [:new, :create]
|
5
|
+
# resources :tag_searchs, only: [:new, :create] do
|
6
|
+
# get '/', on: :collection, to: "tag_searchs#create"
|
7
|
+
# end
|
8
|
+
|
9
|
+
get '/:tag_list', to: "searchs#create" # , as: 'tag'
|
10
|
+
|
11
|
+
root to: 'searchs#new'
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'active_support/core_ext/module/delegation'
|
2
|
+
require 'active_support/core_ext/module/attribute_accessors'
|
3
|
+
require 'active_support/hash_with_indifferent_access'
|
4
|
+
|
5
|
+
module Cmor
|
6
|
+
module Tags
|
7
|
+
module Configuration
|
8
|
+
def configure
|
9
|
+
yield self
|
10
|
+
end
|
11
|
+
mattr_accessor(:base_controller) { 'FrontendController' }
|
12
|
+
mattr_accessor(:add_submit_button_to_search_box) { true }
|
13
|
+
mattr_accessor(:tag_search_exact_default_value) { false }
|
14
|
+
mattr_accessor(:taggable_class_names) { [] }
|
15
|
+
|
16
|
+
def self.taggable_classes
|
17
|
+
@@taggable_class_names.map(&:constantize)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/cmor/tags.rb
ADDED
data/lib/cmor_tags.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'cmor_core'
|
2
|
+
require 'acts-as-taggable-on'
|
3
|
+
require 'rao-service'
|
4
|
+
require 'rao-service_controller'
|
5
|
+
|
6
|
+
require 'cmor/tags'
|
7
|
+
|
8
|
+
# require 'acts_as_taggable_on/tag'
|
9
|
+
# module ActsAsTaggableOn
|
10
|
+
# class Tag
|
11
|
+
# self.table_name = 'cmor_tags_tags'
|
12
|
+
# end
|
13
|
+
# end
|
14
|
+
|
15
|
+
# require 'acts_as_taggable_on/tagging'
|
16
|
+
# module ActsAsTaggableOn
|
17
|
+
# class Tagging
|
18
|
+
# self.table_name = 'cmor_tags_taggings'
|
19
|
+
# end
|
20
|
+
# end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Cmor
|
2
|
+
module Tags
|
3
|
+
module Generators
|
4
|
+
class InstallGenerator < Rails::Generators::Base
|
5
|
+
desc 'Generates the initializer'
|
6
|
+
|
7
|
+
source_root File.expand_path('../templates', __FILE__)
|
8
|
+
|
9
|
+
attr_reader :base_controller_class_name
|
10
|
+
|
11
|
+
def initialize(*args)
|
12
|
+
super
|
13
|
+
@base_controller_class_name = ENV.fetch('BASE_CONTROLLER_CLASS_NAME') { '::ApplicationController' }
|
14
|
+
end
|
15
|
+
|
16
|
+
def generate_initializer
|
17
|
+
template 'initializer.rb', 'config/initializers/cmor_tags.rb'
|
18
|
+
end
|
19
|
+
|
20
|
+
def generate_routes
|
21
|
+
route File.read(File.join(File.expand_path('../templates', __FILE__), 'routes.source'))
|
22
|
+
end
|
23
|
+
|
24
|
+
def add_helpers_to_application_controller
|
25
|
+
inject_into_file 'app/controllers/application_controller.rb', before: "\nend" do
|
26
|
+
File.read(File.join(File.expand_path('../templates', __FILE__), 'application_controller.source'))
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
Cmor::Tags.configure do |config|
|
2
|
+
# Set the base controller
|
3
|
+
#
|
4
|
+
# Default: config.base_controller = '<%= base_controller_class_name %>'
|
5
|
+
#
|
6
|
+
config.base_controller = '<%= base_controller_class_name %>'
|
7
|
+
|
8
|
+
# Add a submit button to the tag search box.
|
9
|
+
#
|
10
|
+
# Default: config.add_submit_button_to_search_box = true
|
11
|
+
#
|
12
|
+
config.add_submit_button_to_search_box = true
|
13
|
+
|
14
|
+
# Use exact search by default or not.
|
15
|
+
#
|
16
|
+
# Default: config.tag_search_exact_default_value = false
|
17
|
+
#
|
18
|
+
config.tag_search_exact_default_value = false
|
19
|
+
|
20
|
+
# Specify the models to be tagged.
|
21
|
+
#
|
22
|
+
# Default: config.taggable_class_names = %w()
|
23
|
+
#
|
24
|
+
config.taggable_class_names = %w()
|
25
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// Action Cable provides the framework to deal with WebSockets in Rails.
|
2
|
+
// You can generate new channels where WebSocket features live using the `rails generate channel` command.
|
3
|
+
//
|
4
|
+
//= require action_cable
|
5
|
+
//= require_self
|
6
|
+
//= require_tree ./channels
|
7
|
+
|
8
|
+
(function() {
|
9
|
+
this.App || (this.App = {});
|
10
|
+
|
11
|
+
App.cable = ActionCable.createConsumer();
|
12
|
+
|
13
|
+
}).call(this);
|