From ce6650fdec554c36fb4a107bcca77185ec8f36a0 Mon Sep 17 00:00:00 2001 From: Denny de la Haye <2021@denny.me> Date: Wed, 28 Apr 2021 01:11:10 +0100 Subject: [PATCH 01/10] Update active storage data to include variants --- plugins/ShinyCMS/db/demo_site_data.rb | 67 ++++++++++++------ .../lib/tasks/support/demo_site_task.rb | 1 + public/images/pic01.jpg | Bin 2727 -> 0 bytes public/images/pic02.jpg | Bin 2929 -> 0 bytes public/images/pic03.jpg | Bin 2817 -> 0 bytes public/images/pic04.jpg | Bin 2934 -> 0 bytes 6 files changed, 48 insertions(+), 20 deletions(-) delete mode 100644 public/images/pic01.jpg delete mode 100644 public/images/pic02.jpg delete mode 100644 public/images/pic03.jpg delete mode 100644 public/images/pic04.jpg diff --git a/plugins/ShinyCMS/db/demo_site_data.rb b/plugins/ShinyCMS/db/demo_site_data.rb index 7afab43fd..c59b3f90a 100644 --- a/plugins/ShinyCMS/db/demo_site_data.rb +++ b/plugins/ShinyCMS/db/demo_site_data.rb @@ -167,26 +167,53 @@ {id: 10, tag_id: 6, taggable_type: "ShinyBlog::Post", taggable_id: 2, tagger_type: nil, tagger_id: nil, context: "tags"} ]) ActiveStorage::Blob.create!([ - {id: 1, key: "895rvyi7qj4ualqt88luf96va7m8", filename: "spiral.png", content_type: "image/png", metadata: {"identified"=>true}, byte_size: 14483, checksum: "Rs5sddWFZwP6wSO4YWE1Yg==", service_name: "local"}, - {id: 2, key: "oowwayhz329vwcbtuzxpitu5z5n8", filename: "banner.png", content_type: "image/png", metadata: {"identified"=>true}, byte_size: 203393, checksum: "vxj9Z514JggEw282O3QH+g==", service_name: "local"}, - {id: 3, key: "hbyoxqbk9mvqy8mv502ltmam0p7m", filename: "pages.png", content_type: "image/png", metadata: {"identified"=>true}, byte_size: 176087, checksum: "hrMduxxNxkV26EkKlhimwg==", service_name: "local"}, - {id: 4, key: "9011khp94z80gtlgvyko3dawis9y", filename: "blog.png", content_type: "image/png", metadata: {"identified"=>true}, byte_size: 391167, checksum: "YaaNOr7GWayfoJSLRQpJUA==", service_name: "local"}, - {id: 5, key: "9hdpixublgkvhvfsiwfvedfwsfn3", filename: "nested-comments.png", content_type: "image/png", metadata: {"identified"=>true}, byte_size: 76843, checksum: "ogOwEnzdJBY82zYiWYH/tQ==", service_name: "local"}, - {id: 6, key: "126zjg7e0toqp1l6em0viojbmnzt", filename: "spam-comment-moderation.png", content_type: "image/png", metadata: {"identified"=>true}, byte_size: 102164, checksum: "Hfbp6FOjcENdbnyYpgHVbw==", service_name: "local"}, - {id: 7, key: "qh356fq0wryhuq2ztszxkcij1tv7", filename: "pic05.jpg", content_type: "image/jpeg", metadata: {"identified"=>true}, byte_size: 3303, checksum: "ertDUTfVVXCzN7LyXVIwhg==", service_name: "local"}, - {id: 8, key: "294ggc7m54j3ctwdm9kb7iwcudrk", filename: "pic06.jpg", content_type: "image/jpeg", metadata: {"identified"=>true}, byte_size: 1557, checksum: "ZNUE+uSMU2cXw1RusWPZDg==", service_name: "local"}, - {id: 9, key: "6two6sr5sst8ooq3z5niy52zp909", filename: "pic07.jpg", content_type: "image/jpeg", metadata: {"identified"=>true}, byte_size: 1594, checksum: "mYzPOdIEPlSxliI3ap23wQ==", service_name: "local"}, - {id: 10, key: "7z2smstul4ri2t0h7ke9a1hi81db", filename: "pic08.jpg", content_type: "image/jpeg", metadata: {"identified"=>true}, byte_size: 1672, checksum: "2NFqN8YfXdXKw0IUsXGU1Q==", service_name: "local"} + {id: 1, key: "1gnjgo1fpt0jr8xwbxwcmrnft16c", filename: "banner.png", content_type: "image/png", metadata: {"identified"=>true}, byte_size: 203393, checksum: "vxj9Z514JggEw282O3QH+g==", service_name: "local"}, + {id: 2, key: "pkq90885cmh9n5k6i2dke3v1h33w", filename: "pages.png", content_type: "image/png", metadata: {"identified"=>true}, byte_size: 176087, checksum: "hrMduxxNxkV26EkKlhimwg==", service_name: "local"}, + {id: 3, key: "hs8682kbfu6y13ky78wyui775nod", filename: "blog.png", content_type: "image/png", metadata: {"identified"=>true}, byte_size: 391167, checksum: "YaaNOr7GWayfoJSLRQpJUA==", service_name: "local"}, + {id: 4, key: "w112m1libndpm9hdjlz419xe7mka", filename: "nested-comments.png", content_type: "image/png", metadata: {"identified"=>true}, byte_size: 76843, checksum: "ogOwEnzdJBY82zYiWYH/tQ==", service_name: "local"}, + {id: 5, key: "3geflemmivc3y0p4cpdbiyklwpkp", filename: "spam-comment-moderation.png", content_type: "image/png", metadata: {"identified"=>true}, byte_size: 102164, checksum: "Hfbp6FOjcENdbnyYpgHVbw==", service_name: "local"}, + {id: 6, key: "wikgprk4p1wkh83p0nt1t37zedyj", filename: "pic05.jpg", content_type: "image/jpeg", metadata: {"identified"=>true}, byte_size: 3303, checksum: "ertDUTfVVXCzN7LyXVIwhg==", service_name: "local"}, + {id: 7, key: "m2g7wu7p44dlc4bc8maqfnitv3qq", filename: "pic06.jpg", content_type: "image/jpeg", metadata: {"identified"=>true}, byte_size: 1557, checksum: "ZNUE+uSMU2cXw1RusWPZDg==", service_name: "local"}, + {id: 8, key: "7yacs020k8xa52zi0nl2353muak0", filename: "pic07.jpg", content_type: "image/jpeg", metadata: {"identified"=>true}, byte_size: 1594, checksum: "mYzPOdIEPlSxliI3ap23wQ==", service_name: "local"}, + {id: 9, key: "zmbbq0ntamge31841f0bffhmh9zl", filename: "pic08.jpg", content_type: "image/jpeg", metadata: {"identified"=>true}, byte_size: 1672, checksum: "2NFqN8YfXdXKw0IUsXGU1Q==", service_name: "local"}, + {id: 10, key: "b861szoxlgr1z3rz1egybxgd8rm5", filename: "banner.png", content_type: "image/png", metadata: {"identified"=>true}, byte_size: 24871, checksum: "byL48+0tUs5yXTK1zJYOIA==", service_name: "local"}, + {id: 11, key: "mu27bjj29nwdyxefaukg83fevnt8", filename: "nested-comments.png", content_type: "image/png", metadata: {"identified"=>true}, byte_size: 10930, checksum: "BfkSrfQEoZpF8DzoihACPg==", service_name: "local"}, + {id: 12, key: "4m82xc7dtium86hnkviqh58ojwsx", filename: "pages.png", content_type: "image/png", metadata: {"identified"=>true}, byte_size: 18751, checksum: "eGAsBavMVZywy6oaVGTZWg==", service_name: "local"}, + {id: 13, key: "jzw56txm9vab03wr22azeu7huhbh", filename: "spam-comment-moderation.png", content_type: "image/png", metadata: {"identified"=>true}, byte_size: 22435, checksum: "g/HKkLG7Mgf/8B8Z8ovWpg==", service_name: "local"}, + {id: 14, key: "ustal8qqk9lfbd9xyv7kfuycbke5", filename: "blog.png", content_type: "image/png", metadata: {"identified"=>true}, byte_size: 29065, checksum: "LuZVRztP6i+n3oJXa6QytA==", service_name: "local"}, + {id: 15, key: "rcxg77k9tjhg7wel2d4qix5awp7i", filename: "pic06.jpg", content_type: "image/jpeg", metadata: {"identified"=>true}, byte_size: 1607, checksum: "0GgwDYSHxvN3mRjYvNjZ6w==", service_name: "local"}, + {id: 16, key: "2tunomfqz1nc3mxsftok5lbz977h", filename: "pic08.jpg", content_type: "image/jpeg", metadata: {"identified"=>true}, byte_size: 1749, checksum: "ttW8MAOQOouuvr7OiLnYNw==", service_name: "local"}, + {id: 17, key: "avuugui09f93yylid47dqtwioqjl", filename: "pic07.jpg", content_type: "image/jpeg", metadata: {"identified"=>true}, byte_size: 1648, checksum: "kmM3kLvcCkWGBnpdXEFAdg==", service_name: "local"}, + {id: 18, key: "bimea576udvoexjyr3r98l5b4sxh", filename: "pic05.jpg", content_type: "image/jpeg", metadata: {"identified"=>true}, byte_size: 3555, checksum: "hVVguOvnFkmKluo0SEhV+A==", service_name: "local"} +]) +ActiveStorage::VariantRecord.create!([ + {id: 1, blob_id: 1, variation_digest: "uRxKmuVZ1tDHW8nIVUApI9rTCa8="}, + {id: 2, blob_id: 4, variation_digest: "uRxKmuVZ1tDHW8nIVUApI9rTCa8="}, + {id: 3, blob_id: 2, variation_digest: "uRxKmuVZ1tDHW8nIVUApI9rTCa8="}, + {id: 4, blob_id: 5, variation_digest: "uRxKmuVZ1tDHW8nIVUApI9rTCa8="}, + {id: 5, blob_id: 3, variation_digest: "uRxKmuVZ1tDHW8nIVUApI9rTCa8="}, + {id: 6, blob_id: 7, variation_digest: "1rYecvTNqece8xQeSStXDFfdaUM="}, + {id: 7, blob_id: 9, variation_digest: "1rYecvTNqece8xQeSStXDFfdaUM="}, + {id: 8, blob_id: 8, variation_digest: "1rYecvTNqece8xQeSStXDFfdaUM="}, + {id: 9, blob_id: 6, variation_digest: "1rYecvTNqece8xQeSStXDFfdaUM="} ]) ActiveStorage::Attachment.create!([ - {id: 1, name: "profile_pic", record_type: "ShinyProfiles::Profile", record_id: 1, blob_id: 1}, - {id: 2, name: "image", record_type: "ShinyPages::PageElement", record_id: 4, blob_id: 2}, - {id: 3, name: "image", record_type: "ShinyPages::PageElement", record_id: 5, blob_id: 3}, - {id: 4, name: "image", record_type: "ShinyPages::PageElement", record_id: 8, blob_id: 4}, - {id: 5, name: "image", record_type: "ShinyPages::PageElement", record_id: 11, blob_id: 5}, - {id: 6, name: "image", record_type: "ShinyPages::PageElement", record_id: 14, blob_id: 6}, - {id: 7, name: "image", record_type: "ShinyPages::PageElement", record_id: 17, blob_id: 7}, - {id: 8, name: "image", record_type: "ShinyPages::PageElement", record_id: 18, blob_id: 8}, - {id: 9, name: "image", record_type: "ShinyPages::PageElement", record_id: 19, blob_id: 9}, - {id: 10, name: "image", record_type: "ShinyPages::PageElement", record_id: 20, blob_id: 10} + {id: 1, name: "image", record_type: "ShinyPages::PageElement", record_id: 4, blob_id: 1}, + {id: 2, name: "image", record_type: "ShinyPages::PageElement", record_id: 5, blob_id: 2}, + {id: 3, name: "image", record_type: "ShinyPages::PageElement", record_id: 8, blob_id: 3}, + {id: 4, name: "image", record_type: "ShinyPages::PageElement", record_id: 11, blob_id: 4}, + {id: 5, name: "image", record_type: "ShinyPages::PageElement", record_id: 14, blob_id: 5}, + {id: 6, name: "image", record_type: "ShinyPages::PageElement", record_id: 17, blob_id: 6}, + {id: 7, name: "image", record_type: "ShinyPages::PageElement", record_id: 18, blob_id: 7}, + {id: 8, name: "image", record_type: "ShinyPages::PageElement", record_id: 19, blob_id: 8}, + {id: 9, name: "image", record_type: "ShinyPages::PageElement", record_id: 20, blob_id: 9}, + {id: 10, name: "image", record_type: "ActiveStorage::VariantRecord", record_id: 1, blob_id: 10}, + {id: 11, name: "image", record_type: "ActiveStorage::VariantRecord", record_id: 2, blob_id: 11}, + {id: 12, name: "image", record_type: "ActiveStorage::VariantRecord", record_id: 3, blob_id: 12}, + {id: 13, name: "image", record_type: "ActiveStorage::VariantRecord", record_id: 4, blob_id: 13}, + {id: 14, name: "image", record_type: "ActiveStorage::VariantRecord", record_id: 5, blob_id: 14}, + {id: 15, name: "image", record_type: "ActiveStorage::VariantRecord", record_id: 6, blob_id: 15}, + {id: 16, name: "image", record_type: "ActiveStorage::VariantRecord", record_id: 7, blob_id: 16}, + {id: 17, name: "image", record_type: "ActiveStorage::VariantRecord", record_id: 8, blob_id: 17}, + {id: 18, name: "image", record_type: "ActiveStorage::VariantRecord", record_id: 9, blob_id: 18} ]) diff --git a/plugins/ShinyCMS/lib/tasks/support/demo_site_task.rb b/plugins/ShinyCMS/lib/tasks/support/demo_site_task.rb index 95a9f92aa..b4bb9f964 100644 --- a/plugins/ShinyCMS/lib/tasks/support/demo_site_task.rb +++ b/plugins/ShinyCMS/lib/tasks/support/demo_site_task.rb @@ -31,6 +31,7 @@ def other_models ActsAsTaggableOn::Tagging, ActiveStorage::Blob, + ActiveStorage::VariantRecord, ActiveStorage::Attachment ] end diff --git a/public/images/pic01.jpg b/public/images/pic01.jpg deleted file mode 100644 index a4a9881c1e2df9b3df20625f424f6ca99e40a000..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2727 zcmb7E3s6&M7XJU67mp+o11jL-Zp5e*5^hLhh#(h8P*gNU3HS!dg+%gd5=>CXxtZPB zUF}$-_(Chj!Bx7VrQ#z#ig!D%g3oGwqSm-Y+gf~2>)pO08u?4`~n9^cJi9AXc5@AWB^}$4r~e+*eIH zqs?V=8f|toXND3TQ)IFlY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F2`4tj6dWPC4_f!ib~Q|Haw~MF*SGv@{0n}DJ!8_ za^d=2zSsn|ei!{g9VG4fBbFM-JOD_m>S#TZz5Q16Bt@M8LYv)AJjH_L{~k{RH%Z{|vL!~uDZ^awE zvv!<%#w?n2J?sGflTUpNUb&_d`KzN?!ALwD%&UU>Ix4X>g1odRfjy5TV9|Lp@nmpb zN#sAlrk4%FULgBeqgMqP)~r7ofBY7fgj32Lz_N#I41rNGTU$j|rXF8;(yzr=)Zr^n zq19_<7f0fQKh|ERGlobuz(J&p+?`JmG!6OZ$>6K$H?p%>oy_)c)(qN7X}r0+<^an} q(7ryvyhDb!1ckua#f)FBL=HvkvyW7MBADZykN?~db9iFt#(w|@Bd}!v diff --git a/public/images/pic02.jpg b/public/images/pic02.jpg deleted file mode 100644 index 5b5f0b4e066a7f415f75d8577c6b8c06ec3a92c7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2929 zcmb7E3s6&M7XI(Oc|bx4@3KVcZIDH}B#?xJBp3;g#42EEw4hKbF$oX?Nt!3G!p+Xw zuC#X3b*x%NvFa8VQP3iEqxJ68DpOmll`57fbcR_)5mrPgD6kg_wlmx5?4HS;```1Q z?|kQ(+1}Y7K)9k(Ukt$N)h_}c@UzSggTM^C#!v+yKqAyD0GRy&=_<9^%+mOHqm`@H znl|gW8dF7lrP>_N<0iy|6)BZwwZ@>cp__FjdZUaz>N(3s^;#J_PneyMZBEyf>R+n1 z=+;%QU9YJ&Xe3&8%1U%arL?lbT%oh6(aMT)qg7fdW6wL666ZN}JR6-iu^D9S)Hzmk zLv{|DZnEf5Ay>fBB=C5sNW|qO3PmDb9Li7N@#7PSpNPXtlnO;seiFJMY=X_AEtaY> zlnY$MmyErTl+)?tIt5&lr6iswkx1rz@cA6Vf@7^R+SHXCqcv*LLx#?(vFOb8+SEpkZjN*gtN$4*_)V-d-J(<5OqTT~ zQ~BaF<&>IiCTpq5jHa&>q0961My<(djh$;X;hRV`Lub)DbXujwRDsS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I&Jk-!dq4DQ>D$8_NI{x+oMrSOTmS9+PZd&qwqklDtdBaub2sMXV0nG&TQ z(ozrE-H~qO+b%4!U54f3zMFbnT}ZX-rhND{X3bO?r7o);wQQj1nl=}7Q;Ut@#%^%z z<`^hE0SfnG&y_qTO>`kO(>QAb+%bqu)a66bNzjq0KfZlP*?!b5i|VGuvYgP+@8E{@ z)WfOF4LBno>uILv|LE%48n6vtifosG+eF7D0=FQkQHTWLf?|+cL^a$?CKAI!M^VOT z4>&Ubb>RE1--Yt0W&xpTCL5srwi;}or*6t8axbI+)p{(pDP-OErx(H=v)yw58S>w(U8!JqUMVyqhM57{T*h5mA}@C0@C#(x0FO)i%J diff --git a/public/images/pic03.jpg b/public/images/pic03.jpg deleted file mode 100644 index ea854352d016fdc2e7b136314ef4f204403d47a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2817 zcmb7E4Ny~87QXkrmzM+y5EZm#*?GiuwWW}}00Bay2}!V)qEsy!tqO(^G9h^}iTwG) zOWReuTf1!Au{sJy>$dKW)N})af0*5M6-Ni?%J5?lu*+7f{3wfES1j2Zs_0A|XZK9r z%f08F?|kQ+d(I7X1+IhH+A>oi0E-vD40zy)1O|anvq^6*2M`cQtpXr$9d9ghI&E^X z*y>2gFJLwp67-BkT$XPW(+LtWcy(c!EnjaoIH?T=qsgiejhs3wqD%z}(aPj(Nw!UG zC^EfPVK*$VSh7N2Vb-S=h!!rOUM-WCS!@=AGoLE66k8qgGKFZ;xg4#7YO#o#G;x|0 zB2|!;T9utcsTsS0N=`_O*Gp)clF1V2q-2?leua`sXsK9&ezJHvNuDf|OH-&vB0_BT zf6mi<%!=73ZG!ndMrCI|A7QafSv#D|3{Qf8 zrhmtZa+^WC%-~=)+4TlwKIbW_=Mx1DALSs=&bONl=oB;aiyel^582uBr6_olHNRNH z=r>smR_9`kLbPdeP|=SaJPkx#2?Yq7 znUpEbRB2LWGL@R9wMnUIGFp|KNhc<&GBv45sgJRXtqy0tRc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>JqwNCc&Z;b zxQemZUO{XRT6~k0+B-qF+;*?@+M4De)FkS)Dx(@EfMqXp%8rawF)hc~yfJ*(PCpZ8 zYZ@2ZT6?9z&JRHyC^2F27f;~BbD&`jtqy7J1`Uml+SE2&*A2TB4y(%@*>)?W1b^B~ z#ohQCYbbTvT*H-J@UhFa?Edv9@QrgM41tm>v^pts@?}cWvcQU-k^l*5I+agcp*4<0 z<>Oxpf;-5P7r}ye4EeA#_$0RV!UJ1t3wvVE?z*+dd0iFcah|JAS#YTIbx?4~DA<>? zd33G3G zoIiJsZF(>(RoCVMjd_8(yPZrT?z{0jC#4tXE;0R}1B6c_dpc7RdMDAZFYhM#Ggp?e NU3(nw#Y_EH{{?k@PAdQa From 27b907eaa8fb81560ccb256bb1c5d051134958e8 Mon Sep 17 00:00:00 2001 From: Denny de la Haye <2021@denny.me> Date: Wed, 28 Apr 2021 17:28:07 +0100 Subject: [PATCH 02/10] Add alt attribute to image tags --- plugins/ShinyCMS/db/demo_site_data.rb | 88 +++++++++++-------- .../views/shiny_pages/pages/index.html.erb | 18 ++-- 2 files changed, 62 insertions(+), 44 deletions(-) diff --git a/plugins/ShinyCMS/db/demo_site_data.rb b/plugins/ShinyCMS/db/demo_site_data.rb index c59b3f90a..9c7a7b4ec 100644 --- a/plugins/ShinyCMS/db/demo_site_data.rb +++ b/plugins/ShinyCMS/db/demo_site_data.rb @@ -49,22 +49,6 @@ {id: 2, name: "banner_button_url", content: "", element_type: "short_text", position: 2, template_id: 1, deleted_at: nil}, {id: 3, name: "banner_button_text", content: "", element_type: "short_text", position: 3, template_id: 1, deleted_at: nil}, {id: 4, name: "banner_image", content: "", element_type: "image", position: 4, template_id: 1, deleted_at: nil}, - {id: 5, name: "image1", content: "", element_type: "image", position: 5, template_id: 1, deleted_at: nil}, - {id: 6, name: "heading1", content: "", element_type: "short_text", position: 6, template_id: 1, deleted_at: nil}, - {id: 7, name: "paragraph1", content: "", element_type: "long_text", position: 7, template_id: 1, deleted_at: nil}, - {id: 8, name: "image2", content: "", element_type: "image", position: 8, template_id: 1, deleted_at: nil}, - {id: 9, name: "heading2", content: "", element_type: "short_text", position: 9, template_id: 1, deleted_at: nil}, - {id: 10, name: "paragraph2", content: "", element_type: "long_text", position: 10, template_id: 1, deleted_at: nil}, - {id: 11, name: "image3", content: "", element_type: "image", position: 11, template_id: 1, deleted_at: nil}, - {id: 12, name: "heading3", content: "", element_type: "short_text", position: 12, template_id: 1, deleted_at: nil}, - {id: 13, name: "paragraph3", content: "", element_type: "long_text", position: 13, template_id: 1, deleted_at: nil}, - {id: 14, name: "image4", content: "", element_type: "image", position: 14, template_id: 1, deleted_at: nil}, - {id: 15, name: "heading4", content: "", element_type: "short_text", position: 15, template_id: 1, deleted_at: nil}, - {id: 16, name: "paragraph4", content: "", element_type: "long_text", position: 16, template_id: 1, deleted_at: nil}, - {id: 17, name: "image5", content: "", element_type: "image", position: 17, template_id: 1, deleted_at: nil}, - {id: 18, name: "image6", content: "", element_type: "image", position: 18, template_id: 1, deleted_at: nil}, - {id: 19, name: "image7", content: "", element_type: "image", position: 19, template_id: 1, deleted_at: nil}, - {id: 20, name: "image8", content: "", element_type: "image", position: 20, template_id: 1, deleted_at: nil}, {id: 21, name: "heading", content: nil, element_type: "short_text", position: 1, template_id: 2, deleted_at: nil}, {id: 22, name: "subheading", content: nil, element_type: "short_text", position: 2, template_id: 2, deleted_at: nil}, {id: 23, name: "text_content", content: nil, element_type: "long_text", position: 3, template_id: 2, deleted_at: nil}, @@ -76,7 +60,32 @@ {id: 29, name: "text_content", content: nil, element_type: "long_text", position: 3, template_id: 4, deleted_at: nil}, {id: 30, name: "heading", content: nil, element_type: "short_text", position: 1, template_id: 5, deleted_at: nil}, {id: 31, name: "subheading", content: nil, element_type: "short_text", position: 2, template_id: 5, deleted_at: nil}, - {id: 32, name: "text_content", content: nil, element_type: "long_text", position: 3, template_id: 5, deleted_at: nil} + {id: 32, name: "text_content", content: nil, element_type: "long_text", position: 3, template_id: 5, deleted_at: nil}, + {id: 20, name: "image8", content: "", element_type: "image", position: 28, template_id: 1, deleted_at: nil}, + {id: 9, name: "heading2", content: "", element_type: "short_text", position: 12, template_id: 1, deleted_at: nil}, + {id: 5, name: "image1", content: "", element_type: "image", position: 6, template_id: 1, deleted_at: nil}, + {id: 10, name: "paragraph2", content: "", element_type: "long_text", position: 13, template_id: 1, deleted_at: nil}, + {id: 11, name: "image3", content: "", element_type: "image", position: 14, template_id: 1, deleted_at: nil}, + {id: 33, name: "banner_img_alt", content: "", element_type: "short_text", position: 5, template_id: 1, deleted_at: nil}, + {id: 34, name: "img1_alt", content: "", element_type: "short_text", position: 7, template_id: 1, deleted_at: nil}, + {id: 36, name: "img2_alt", content: "", element_type: "short_text", position: 11, template_id: 1, deleted_at: nil}, + {id: 37, name: "img3_alt", content: "", element_type: "short_text", position: 15, template_id: 1, deleted_at: nil}, + {id: 38, name: "img4_alt", content: "", element_type: "short_text", position: 19, template_id: 1, deleted_at: nil}, + {id: 39, name: "img5_alt", content: "", element_type: "short_text", position: 23, template_id: 1, deleted_at: nil}, + {id: 40, name: "img6_alt", content: "", element_type: "short_text", position: 25, template_id: 1, deleted_at: nil}, + {id: 41, name: "img7_alt", content: "", element_type: "short_text", position: 26, template_id: 1, deleted_at: nil}, + {id: 12, name: "heading3", content: "", element_type: "short_text", position: 16, template_id: 1, deleted_at: nil}, + {id: 13, name: "paragraph3", content: "", element_type: "long_text", position: 17, template_id: 1, deleted_at: nil}, + {id: 14, name: "image4", content: "", element_type: "image", position: 18, template_id: 1, deleted_at: nil}, + {id: 6, name: "heading1", content: "", element_type: "short_text", position: 8, template_id: 1, deleted_at: nil}, + {id: 7, name: "paragraph1", content: "", element_type: "long_text", position: 9, template_id: 1, deleted_at: nil}, + {id: 8, name: "image2", content: "", element_type: "image", position: 10, template_id: 1, deleted_at: nil}, + {id: 42, name: "img8_alt", content: "", element_type: "short_text", position: 29, template_id: 1, deleted_at: nil}, + {id: 15, name: "heading4", content: "", element_type: "short_text", position: 20, template_id: 1, deleted_at: nil}, + {id: 16, name: "paragraph4", content: "", element_type: "long_text", position: 21, template_id: 1, deleted_at: nil}, + {id: 17, name: "image5", content: "", element_type: "image", position: 22, template_id: 1, deleted_at: nil}, + {id: 18, name: "image6", content: "", element_type: "image", position: 24, template_id: 1, deleted_at: nil}, + {id: 19, name: "image7", content: "", element_type: "image", position: 26, template_id: 1, deleted_at: nil} ]) ShinyNewsletters::Edition.create!([ {id: 1, internal_name: "First Post", public_name: "", slug: "first", description: "Our first newsletter!", from_name: nil, from_email: nil, subject: nil, show_on_site: true, template_id: 1, published_at: nil, deleted_at: nil} @@ -100,23 +109,6 @@ {id: 1, name: "banner_text", content: "

ShinyCMS is a free and open source content-management system. This new version is built with Ruby on Rails (the original version is built with Perl and Catalyst).

\r\n", element_type: "html", position: 1, page_id: 1, deleted_at: nil}, {id: 2, name: "banner_button_url", content: "https://github.com/denny/ShinyCMS-ruby", element_type: "short_text", position: 2, page_id: 1, deleted_at: nil}, {id: 3, name: "banner_button_text", content: "ShinyCMS on GitHub", element_type: "short_text", position: 3, page_id: 1, deleted_at: nil}, - {id: 4, name: "banner_image", content: "", element_type: "image", position: 4, page_id: 1, deleted_at: nil}, - {id: 5, name: "image1", content: "", element_type: "image", position: 5, page_id: 1, deleted_at: nil}, - {id: 6, name: "heading1", content: "Pages", element_type: "short_text", position: 6, page_id: 1, deleted_at: nil}, - {id: 7, name: "paragraph1", content: "Template-drive brochure pages with a simple, easy to use admin interface - safely edit the content areas without any risk of disturbing the page layout. Can be organised into nested sections for larger, more complicated sites.", element_type: "long_text", position: 7, page_id: 1, deleted_at: nil}, - {id: 8, name: "image2", content: "", element_type: "image", position: 8, page_id: 1, deleted_at: nil}, - {id: 9, name: "heading2", content: "Blog", element_type: "short_text", position: 9, page_id: 1, deleted_at: nil}, - {id: 10, name: "paragraph2", content: "Add posts now, backdate them, or schedule them to appear in the future. Hide/show/edit/delete posts. Decide whether to allow/disable discussion feature (comments) by default, overridable on a per-post basis.", element_type: "long_text", position: 10, page_id: 1, deleted_at: nil}, - {id: 11, name: "image3", content: "", element_type: "image", position: 11, page_id: 1, deleted_at: nil}, - {id: 12, name: "heading3", content: "Discussions / Comments", element_type: "short_text", position: 12, page_id: 1, deleted_at: nil}, - {id: 13, name: "paragraph3", content: "Currently enabled on blog posts and news posts, but can be added to any type of content. Show/hide and lock/unlock whole discussions or individual comments.", element_type: "long_text", position: 13, page_id: 1, deleted_at: nil}, - {id: 14, name: "image4", content: "", element_type: "image", position: 14, page_id: 1, deleted_at: nil}, - {id: 15, name: "heading4", content: "Anti-spam features", element_type: "short_text", position: 15, page_id: 1, deleted_at: nil}, - {id: 16, name: "paragraph4", content: "Uses reCAPTCHA to detect and block bots. Uses Akismet to flag and hide potential spam comments. Moderation queue for flagged comments, with decisions fed back to Akismet to improve their accuracy.", element_type: "long_text", position: 16, page_id: 1, deleted_at: nil}, - {id: 17, name: "image5", content: "", element_type: "image", position: 17, page_id: 1, deleted_at: nil}, - {id: 18, name: "image6", content: "", element_type: "image", position: 18, page_id: 1, deleted_at: nil}, - {id: 19, name: "image7", content: "", element_type: "image", position: 19, page_id: 1, deleted_at: nil}, - {id: 20, name: "image8", content: "", element_type: "image", position: 20, page_id: 1, deleted_at: nil}, {id: 21, name: "heading", content: "", element_type: "short_text", position: 1, page_id: 2, deleted_at: nil}, {id: 22, name: "subheading", content: "", element_type: "short_text", position: 2, page_id: 2, deleted_at: nil}, {id: 23, name: "text_content", content: "", element_type: "long_text", position: 3, page_id: 2, deleted_at: nil}, @@ -128,7 +120,33 @@ {id: 29, name: "text_content", content: "", element_type: "long_text", position: 3, page_id: 4, deleted_at: nil}, {id: 30, name: "heading", content: "", element_type: "short_text", position: 1, page_id: 5, deleted_at: nil}, {id: 31, name: "subheading", content: "", element_type: "short_text", position: 2, page_id: 5, deleted_at: nil}, - {id: 32, name: "text_content", content: "", element_type: "long_text", position: 3, page_id: 5, deleted_at: nil} + {id: 32, name: "text_content", content: "", element_type: "long_text", position: 3, page_id: 5, deleted_at: nil}, + {id: 4, name: "banner_image", content: "", element_type: "image", position: 4, page_id: 1, deleted_at: nil}, + {id: 34, name: "img1_alt", content: "Screenshot of page admin interface", element_type: "short_text", position: 7, page_id: 1, deleted_at: nil}, + {id: 6, name: "heading1", content: "Pages", element_type: "short_text", position: 8, page_id: 1, deleted_at: nil}, + {id: 7, name: "paragraph1", content: "Template-drive brochure pages with a simple, easy to use admin interface - safely edit the content areas without any risk of disturbing the page layout. Can be organised into nested sections for larger, more complicated sites.", element_type: "long_text", position: 9, page_id: 1, deleted_at: nil}, + {id: 36, name: "img2_alt", content: "Screenshot of blog feature", element_type: "short_text", position: 11, page_id: 1, deleted_at: nil}, + {id: 12, name: "heading3", content: "Discussions / Comments", element_type: "short_text", position: 16, page_id: 1, deleted_at: nil}, + {id: 13, name: "paragraph3", content: "Currently enabled on blog posts and news posts, but can be added to any type of content. Show/hide and lock/unlock whole discussions or individual comments.", element_type: "long_text", position: 17, page_id: 1, deleted_at: nil}, + {id: 37, name: "img3_alt", content: "Screenshot of comment thread, showing multi-level nesting", element_type: "short_text", position: 15, page_id: 1, deleted_at: nil}, + {id: 38, name: "img4_alt", content: "Screenshot showing spam moderation interface", element_type: "short_text", position: 19, page_id: 1, deleted_at: nil}, + {id: 39, name: "img5_alt", content: "placeholder image", element_type: "short_text", position: 23, page_id: 1, deleted_at: nil}, + {id: 40, name: "img6_alt", content: "placeholder image", element_type: "short_text", position: 25, page_id: 1, deleted_at: nil}, + {id: 15, name: "heading4", content: "Anti-spam features", element_type: "short_text", position: 20, page_id: 1, deleted_at: nil}, + {id: 16, name: "paragraph4", content: "Uses reCAPTCHA to detect and block bots. Uses Akismet to flag and hide potential spam comments. Moderation queue for flagged comments, with decisions fed back to Akismet to improve their accuracy.", element_type: "long_text", position: 21, page_id: 1, deleted_at: nil}, + {id: 41, name: "img7_alt", content: "placeholder image", element_type: "short_text", position: 27, page_id: 1, deleted_at: nil}, + {id: 42, name: "img8_alt", content: "placeholder image", element_type: "short_text", position: 29, page_id: 1, deleted_at: nil}, + {id: 5, name: "image1", content: "", element_type: "image", position: 6, page_id: 1, deleted_at: nil}, + {id: 9, name: "heading2", content: "Blog", element_type: "short_text", position: 12, page_id: 1, deleted_at: nil}, + {id: 10, name: "paragraph2", content: "Add posts now, backdate them, or schedule them to appear in the future. Hide/show/edit/delete posts. Decide whether to allow/disable discussion feature (comments) by default, overridable on a per-post basis.", element_type: "long_text", position: 13, page_id: 1, deleted_at: nil}, + {id: 33, name: "banner_img_alt", content: "Screenshot of ShinyCMS user admin page, with ACL", element_type: "short_text", position: 5, page_id: 1, deleted_at: nil}, + {id: 8, name: "image2", content: "", element_type: "image", position: 10, page_id: 1, deleted_at: nil}, + {id: 11, name: "image3", content: "", element_type: "image", position: 14, page_id: 1, deleted_at: nil}, + {id: 14, name: "image4", content: "", element_type: "image", position: 18, page_id: 1, deleted_at: nil}, + {id: 17, name: "image5", content: "", element_type: "image", position: 22, page_id: 1, deleted_at: nil}, + {id: 18, name: "image6", content: "", element_type: "image", position: 24, page_id: 1, deleted_at: nil}, + {id: 19, name: "image7", content: "", element_type: "image", position: 26, page_id: 1, deleted_at: nil}, + {id: 20, name: "image8", content: "", element_type: "image", position: 28, page_id: 1, deleted_at: nil} ]) ShinyNewsletters::Send.create!([ {id: 1, edition_id: 1, list_id: 1, send_at: nil, started_sending_at: nil, finished_sending_at: nil, deleted_at: nil} diff --git a/themes/halcyonic/views/shiny_pages/pages/index.html.erb b/themes/halcyonic/views/shiny_pages/pages/index.html.erb index 2ff66ae07..65137a7df 100644 --- a/themes/halcyonic/views/shiny_pages/pages/index.html.erb +++ b/themes/halcyonic/views/shiny_pages/pages/index.html.erb @@ -8,7 +8,7 @@ <%= banner_button_text %>
- <%= link_to image_tag( banner_image, class: 'banner-image' ), url_for( banner_image ) if banner_image.attached? %> + <%= link_to image_tag( banner_image, alt: banner_img_alt, class: 'banner-image' ), url_for( banner_image ) if banner_image.attached? %>
@@ -23,7 +23,7 @@
- <%= link_to image_tag( image1, class: 'bordered-feature-image' ), url_for( image1 ) if image1.attached? %> + <%= link_to image_tag( image1, alt: img1_alt, class: 'bordered-feature-image' ), url_for( image1 ) if image1.attached? %>

<%= heading1 %>

@@ -35,7 +35,7 @@
- <%= link_to image_tag( image2, class: 'bordered-feature-image' ), url_for( image2 ) if image2.attached? %> + <%= link_to image_tag( image2, alt: img4_alt, class: 'bordered-feature-image' ), url_for( image2 ) if image2.attached? %>

<%= heading2 %>

@@ -47,7 +47,7 @@
- <%= link_to image_tag( image3, class: 'bordered-feature-image' ), url_for( image3 ) if image3.attached? %> + <%= link_to image_tag( image3, alt: img4_alt, class: 'bordered-feature-image' ), url_for( image3 ) if image3.attached? %>

<%= heading3 %>

@@ -59,7 +59,7 @@
- <%= link_to image_tag( image4, class: 'bordered-feature-image' ), url_for( image4 ) if image4.attached? %> + <%= link_to image_tag( image4, alt: img4_alt, class: 'bordered-feature-image' ), url_for( image4 ) if image4.attached? %>

<%= heading4 %>

@@ -83,7 +83,7 @@

Who We Are

A subheading about who we are

- <%= image_tag image5 if image5.attached? %> + <%= image_tag image5, alt: img5_alt if image5.attached? %>

Duis neque nisi, dapibus sed mattis quis, rutrum accumsan magna sed. Suspendisse eu varius nibh. Suspendisse vitae magna eget odio amet mollis @@ -120,17 +120,17 @@

  • - <%= image_tag image6 if image6.attached? %> + <%= image_tag image6, alt: img6_alt if image6.attached? %>

    "Neque nisidapibus mattis"

    Jane Doe, CEO of UntitledCorp
  • - <%= image_tag image7 if image7.attached? %> + <%= image_tag image7, alt: img7_alt if image7.attached? %>

    "Lorem ipsum consequat!"

    John Doe, President of FakeBiz
  • - <%= image_tag image8 if image8.attached? %> + <%= image_tag image8, alt: img8_alt if image8.attached? %>

    "Magna veroeros amet tempus"

    Mary Smith, CFO of UntitledBiz
  • From 402841456af5682ff0dd087e82b98309bc0294d6 Mon Sep 17 00:00:00 2001 From: Denny de la Haye <2021@denny.me> Date: Wed, 28 Apr 2021 17:32:22 +0100 Subject: [PATCH 03/10] I think this is causing deployment issues for new installs --- plugins/ShinyCMS/lib/shinycms/version.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/ShinyCMS/lib/shinycms/version.rb b/plugins/ShinyCMS/lib/shinycms/version.rb index 71184f771..852a5ce7f 100644 --- a/plugins/ShinyCMS/lib/shinycms/version.rb +++ b/plugins/ShinyCMS/lib/shinycms/version.rb @@ -12,6 +12,6 @@ module ShinyCMS public_constant :VERSION # Use the start of the git commit SHA as a release identifier - RELEASE = `git show --abbrev=4 --pretty=%h -q`.chomp - public_constant :RELEASE + # RELEASE = `git show --abbrev=4 --pretty=%h -q`.chomp + # public_constant :RELEASE end From ce605a947f46a77b8c67812f17046f0244e3e367 Mon Sep 17 00:00:00 2001 From: Denny de la Haye <2021@denny.me> Date: Wed, 28 Apr 2021 18:47:10 +0100 Subject: [PATCH 04/10] RELEASE not being set currently --- .../app/views/shinycms/admin/includes/_sidebar.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ShinyCMS/app/views/shinycms/admin/includes/_sidebar.html.erb b/plugins/ShinyCMS/app/views/shinycms/admin/includes/_sidebar.html.erb index 83c835d71..ad969c22a 100644 --- a/plugins/ShinyCMS/app/views/shinycms/admin/includes/_sidebar.html.erb +++ b/plugins/ShinyCMS/app/views/shinycms/admin/includes/_sidebar.html.erb @@ -8,6 +8,6 @@ From b952121b95c29bd93bebdc0cb564676a9313d2a0 Mon Sep 17 00:00:00 2001 From: Denny de la Haye <2021@denny.me> Date: Wed, 28 Apr 2021 19:01:24 +0100 Subject: [PATCH 05/10] Fix multi_json gemfile glitch here too --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 2be52a0ff..d67ed4879 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -248,7 +248,6 @@ GEM mime-types-data (3.2021.0225) mini_magick (4.11.0) mjml-rails (4.6.1) - multi_json (1.15.0) multi_xml (0.6.0) netaddr (2.0.4) numerizer (0.1.1) @@ -516,6 +515,7 @@ GEM mini_mime (1.0.3) mini_portile2 (2.5.0) minitest (5.14.4) + multi_json (1.15.0) multipart-post (2.1.1) nio4r (2.5.7) nokogiri (1.11.2) From 50a0239e20f2567e9ef34cb2b2532f3051b38030 Mon Sep 17 00:00:00 2001 From: Denny de la Haye <2021@denny.me> Date: Wed, 28 Apr 2021 21:41:59 +0100 Subject: [PATCH 06/10] bundle update --- Gemfile.lock | 294 +++++++++++++++++----------------- plugins/ShinyCMS/.rubocop.yml | 10 +- 2 files changed, 151 insertions(+), 153 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index d67ed4879..9d9232f7c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -172,134 +172,6 @@ PATH GEM specs: - activerecord-session_store (2.0.0) - actionpack (>= 5.2.4.1) - activerecord (>= 5.2.4.1) - multi_json (~> 1.11, >= 1.11.2) - rack (>= 2.0.8, < 3) - railties (>= 5.2.4.1) - acts_as_list (1.0.3) - activerecord (>= 4.2) - acts_as_votable (0.13.1) - airbrake (11.0.1) - airbrake-ruby (~> 5.1) - airbrake-ruby (5.2.0) - rbtree3 (~> 0.5) - akismet (3.0.0) - algoliasearch (1.27.5) - httpclient (~> 2.8, >= 2.8.3) - json (>= 1.5.1) - algoliasearch-rails (1.25.0) - algoliasearch (>= 1.26.0, < 2.0.0) - json (>= 1.5.1) - amazing_print (1.3.0) - aws-eventstream (1.1.1) - aws-partitions (1.442.0) - aws-sdk-core (3.113.1) - aws-eventstream (~> 1, >= 1.0.2) - aws-partitions (~> 1, >= 1.239.0) - aws-sigv4 (~> 1.1) - jmespath (~> 1.0) - aws-sdk-kms (1.43.0) - aws-sdk-core (~> 3, >= 3.112.0) - aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.93.0) - aws-sdk-core (~> 3, >= 3.112.0) - aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.1) - aws-sigv4 (1.2.3) - aws-eventstream (~> 1, >= 1.0.2) - bcrypt (3.1.16) - bugsnag (6.20.0) - concurrent-ruby (~> 1.0) - chronic_duration (0.10.6) - numerizer (~> 0.1.1) - cloudflare-rails (2.0.0) - actionpack (>= 5.0, < 6.2.0) - activesupport (>= 5.0, < 6.2.0) - httparty - railties (>= 5.0, < 6.2.0) - coderay (1.1.3) - connection_pool (2.2.3) - devise (4.7.3) - bcrypt (~> 3.0) - orm_adapter (~> 0.1) - railties (>= 4.1.0) - responders - warden (~> 1.2.3) - devise-pwned_password (0.1.9) - devise (~> 4) - pwned (~> 2.0.0) - email_address (0.1.20) - netaddr (>= 2.0.4, < 3) - simpleidn - hamster (3.0.0) - concurrent-ruby (~> 1.0) - httparty (0.18.1) - mime-types (~> 3.0) - multi_xml (>= 0.5.2) - httpclient (2.8.3) - image_processing (1.12.1) - mini_magick (>= 4.9.5, < 5) - ruby-vips (>= 2.0.17, < 3) - jmespath (1.4.0) - mime-types (3.3.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2021.0225) - mini_magick (4.11.0) - mjml-rails (4.6.1) - multi_xml (0.6.0) - netaddr (2.0.4) - numerizer (0.1.1) - persistent-dmnd (2.0.2) - hamster (~> 3.0) - pg_search (2.3.5) - activerecord (>= 5.2) - activesupport (>= 5.2) - pry (0.14.0) - coderay (~> 1.1) - method_source (~> 1.0) - pry-rails (0.3.9) - pry (>= 0.10.4) - pwned (2.0.2) - rack-proxy (0.6.5) - rack - rbtree3 (0.6.0) - recaptcha (5.7.0) - json - responders (3.0.1) - actionpack (>= 5.0) - railties (>= 5.0) - rss (0.2.9) - rexml - ruby-vips (2.1.0) - ffi (~> 1.12) - seed_dump (3.3.1) - activerecord (>= 4) - activesupport (>= 4) - semantic_range (3.0.0) - sidekiq (6.2.0) - connection_pool (>= 2.2.2) - rack (~> 2.0) - redis (>= 4.2.0) - sidekiq-status (1.1.4) - chronic_duration - sidekiq (>= 3.0) - simpleidn (0.2.1) - unf (~> 0.1.4) - sitemap_generator (6.1.2) - builder (~> 3.0) - unf (0.1.4) - unf_ext - unf_ext (0.0.7.7) - warden (1.2.9) - rack (>= 2.0.9) - webpacker (5.2.1) - activesupport (>= 5.2) - rack-proxy (>= 0.6.1) - railties (>= 5.2) - semantic_range (>= 2.3.0) - zxcvbn-ruby (1.2.0) GEM remote: https://rubygems.org/ @@ -350,8 +222,14 @@ GEM activerecord (6.1.3.1) activemodel (= 6.1.3.1) activesupport (= 6.1.3.1) - activerecord-analyze (0.6.0) + activerecord-analyze (0.9.1) rails (>= 5.1.0) + activerecord-session_store (2.0.0) + actionpack (>= 5.2.4.1) + activerecord (>= 5.2.4.1) + multi_json (~> 1.11, >= 1.11.2) + rack (>= 2.0.8, < 3) + railties (>= 5.2.4.1) activestorage (6.1.3.1) actionpack (= 6.1.3.1) activejob (= 6.1.3.1) @@ -367,9 +245,12 @@ GEM zeitwerk (~> 2.3) acts-as-taggable-on (7.0.0) activerecord (>= 5.0, < 6.2) - acts_as_paranoid (0.7.1) + acts_as_list (1.0.4) + activerecord (>= 4.2) + acts_as_paranoid (0.7.2) activerecord (>= 5.2, < 7.0) activesupport (>= 5.2, < 7.0) + acts_as_votable (0.13.1) addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) ahoy_email (1.1.1) @@ -382,11 +263,40 @@ GEM device_detector geocoder (>= 1.4.5) safely_block (>= 0.2.1) + airbrake (11.0.1) + airbrake-ruby (~> 5.1) + airbrake-ruby (5.2.0) + rbtree3 (~> 0.5) + akismet (3.0.0) + algoliasearch (1.27.5) + httpclient (~> 2.8, >= 2.8.3) + json (>= 1.5.1) + algoliasearch-rails (1.25.0) + algoliasearch (>= 1.26.0, < 2.0.0) + json (>= 1.5.1) + amazing_print (1.3.0) ast (2.4.2) + aws-eventstream (1.1.1) + aws-partitions (1.449.0) + aws-sdk-core (3.114.0) + aws-eventstream (~> 1, >= 1.0.2) + aws-partitions (~> 1, >= 1.239.0) + aws-sigv4 (~> 1.1) + jmespath (~> 1.0) + aws-sdk-kms (1.43.0) + aws-sdk-core (~> 3, >= 3.112.0) + aws-sigv4 (~> 1.1) + aws-sdk-s3 (1.94.0) + aws-sdk-core (~> 3, >= 3.112.0) + aws-sdk-kms (~> 1) + aws-sigv4 (~> 1.1) + aws-sigv4 (1.2.3) + aws-eventstream (~> 1, >= 1.0.2) axiom-types (0.1.1) descendants_tracker (~> 0.0.4) ice_nine (~> 0.11.0) thread_safe (~> 0.3, >= 0.3.1) + bcrypt (3.1.16) better_html (1.0.16) actionview (>= 4.0) activesupport (>= 4.0) @@ -400,7 +310,9 @@ GEM chartkick (>= 3.2) railties (>= 5) safely_block (>= 0.1.1) - brakeman (5.0.0) + brakeman (5.0.1) + bugsnag (6.20.0) + concurrent-ruby (~> 1.0) builder (3.2.4) bullet (6.1.4) activesupport (>= 3.0.0) @@ -416,17 +328,26 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - chartkick (4.0.2) + chartkick (4.0.3) childprocess (4.0.0) + chronic_duration (0.10.6) + numerizer (~> 0.1.1) ckeditor (5.1.0) orm_adapter (~> 0.5.0) + cloudflare-rails (2.0.0) + actionpack (>= 5.0, < 6.2.0) + activesupport (>= 5.0, < 6.2.0) + httparty + railties (>= 5.0, < 6.2.0) code_analyzer (0.5.2) sexp_processor - codecov (0.5.1) + codecov (0.5.2) simplecov (>= 0.15, < 0.22) + coderay (1.1.3) coercible (1.0.0) descendants_tracker (~> 0.0.1) concurrent-ruby (1.1.8) + connection_pool (2.2.5) constant_resolver (0.1.5) coverband (5.1.0) redis @@ -440,12 +361,24 @@ GEM descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) device_detector (1.0.5) + devise (4.7.3) + bcrypt (~> 3.0) + orm_adapter (~> 0.1) + railties (>= 4.1.0) + responders + warden (~> 1.2.3) + devise-pwned_password (0.1.9) + devise (~> 4) + pwned (~> 2.0.0) diff-lcs (1.4.4) docile (1.3.5) dotenv (2.7.6) dotenv-rails (2.7.6) dotenv (= 2.7.6) railties (>= 3.2) + email_address (0.1.20) + netaddr (>= 2.0.4, < 3) + simpleidn equalizer (0.0.11) errbase (0.2.1) erubi (1.10.0) @@ -457,11 +390,15 @@ GEM railties (>= 5.0.0) faker (2.17.0) i18n (>= 1.6, < 2) - faraday (1.3.0) + faraday (1.4.1) + faraday-excon (~> 1.1) faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.1) multipart-post (>= 1.2, < 3) - ruby2_keywords + ruby2_keywords (>= 0.0.4) + faraday-excon (1.1.0) faraday-net_http (1.0.1) + faraday-net_http_persistent (1.1.0) ffi (1.15.0) flay (2.12.1) erubis (~> 2.7.0) @@ -472,12 +409,18 @@ GEM path_expander (~> 1.0) ruby_parser (~> 3.1, > 3.1.0) sexp_processor (~> 4.8) - geocoder (1.6.6) + geocoder (1.6.7) globalid (0.4.2) activesupport (>= 4.2.0) + hamster (3.0.0) + concurrent-ruby (~> 1.0) hashdiff (1.0.1) highline (2.0.3) html_tokenizer (0.0.7) + httparty (0.18.1) + mime-types (~> 3.0) + multi_xml (>= 0.5.2) + httpclient (2.8.3) i18n (1.8.10) concurrent-ruby (~> 1.0) i18n-tasks (0.9.34) @@ -491,7 +434,11 @@ GEM rainbow (>= 2.2.2, < 4.0) terminal-table (>= 1.5.1) ice_nine (0.11.2) + image_processing (1.12.1) + mini_magick (>= 4.9.5, < 5) + ruby-vips (>= 2.0.17, < 3) iniparse (1.5.0) + jmespath (1.4.0) json (2.5.1) kwalify (0.7.2) launchy (2.5.0) @@ -512,15 +459,23 @@ GEM mini_mime (>= 0.1.1) marcel (1.0.1) method_source (1.0.0) + mime-types (3.3.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2021.0225) + mini_magick (4.11.0) mini_mime (1.0.3) mini_portile2 (2.5.0) minitest (5.14.4) + mjml-rails (4.6.1) multi_json (1.15.0) + multi_xml (0.6.0) multipart-post (2.1.1) + netaddr (2.0.4) nio4r (2.5.7) - nokogiri (1.11.2) + nokogiri (1.11.3) mini_portile2 (~> 2.5.0) racc (~> 1.4) + numerizer (0.1.1) orm_adapter (0.5.0) overcommit (0.57.0) childprocess (>= 0.6.3, < 5) @@ -532,22 +487,35 @@ GEM constant_resolver parser sorbet-runtime - pagy (4.1.0) + pagy (4.3.0) parallel (1.20.1) - parallel_tests (3.6.0) + parallel_tests (3.7.0) parallel parser (3.0.1.0) ast (~> 2.4.1) path_expander (1.1.0) + persistent-dmnd (2.0.2) + hamster (~> 3.0) pg (1.2.3) + pg_search (2.3.5) + activerecord (>= 5.2) + activesupport (>= 5.2) + pry (0.14.1) + coderay (~> 1.1) + method_source (~> 1.0) + pry-rails (0.3.9) + pry (>= 0.10.4) psych (3.3.1) public_suffix (4.0.6) puma (5.2.2) nio4r (~> 2.0) pundit (2.1.0) activesupport (>= 3.0.0) + pwned (2.0.2) racc (1.5.2) rack (2.2.3) + rack-proxy (0.6.5) + rack rack-test (1.1.0) rack (>= 1.0, < 3) rails (6.1.3.1) @@ -600,8 +568,11 @@ GEM rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) + rbtree3 (0.6.0) + recaptcha (5.7.0) + json redis (4.2.5) - reek (6.0.3) + reek (6.0.4) kwalify (~> 0.7.0) parser (~> 3.0.0) psych (~> 3.1) @@ -610,6 +581,9 @@ GEM request_store (1.5.0) rack (>= 1.4) require_all (3.0.0) + responders (3.0.1) + actionpack (>= 5.0) + railties (>= 5.0) rexml (3.2.5) rspec (3.10.0) rspec-core (~> 3.10.0) @@ -636,7 +610,9 @@ GEM rspec-support (3.10.2) rspec_junit_formatter (0.4.1) rspec-core (>= 2, < 4, != 2.12.0) - rubocop (1.12.1) + rss (0.2.9) + rexml + rubocop (1.13.0) parallel (~> 1.10) parser (>= 3.0.0.0) rainbow (>= 2.2.2, < 4.0) @@ -647,14 +623,14 @@ GEM unicode-display_width (>= 1.4.0, < 3.0) rubocop-ast (1.4.1) parser (>= 2.7.1.5) - rubocop-performance (1.10.2) - rubocop (>= 0.90.0, < 2.0) + rubocop-performance (1.11.0) + rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) rubocop-rails (2.9.1) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 0.90.0, < 2.0) - rubocop-rspec (2.2.0) + rubocop-rspec (2.3.0) rubocop (~> 1.0) rubocop-ast (>= 1.1.0) rubocop-thread_safety (0.4.2) @@ -663,6 +639,8 @@ GEM pg terminal-table ruby-progressbar (1.11.0) + ruby-vips (2.1.0) + ffi (~> 1.12) ruby2_keywords (0.0.4) ruby_parser (3.15.1) sexp_processor (~> 4.9) @@ -687,6 +665,10 @@ GEM sprockets (> 3.0) sprockets-rails tilt + seed_dump (3.3.1) + activerecord (>= 4) + activesupport (>= 4) + semantic_range (3.0.0) sentry-rails (4.3.4) railties (>= 5.0) sentry-ruby-core (~> 4.3.0) @@ -698,14 +680,25 @@ GEM concurrent-ruby faraday sexp_processor (4.15.2) + sidekiq (6.2.1) + connection_pool (>= 2.2.2) + rack (~> 2.0) + redis (>= 4.2.0) + sidekiq-status (1.1.4) + chronic_duration + sidekiq (>= 3.0) simplecov (0.21.2) docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.2) + simpleidn (0.2.1) + unf (~> 0.1.4) + sitemap_generator (6.1.2) + builder (~> 3.0) smart_properties (1.15.0) - sorbet-runtime (0.5.6366) + sorbet-runtime (0.5.6393) sprockets (4.0.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) @@ -724,6 +717,9 @@ GEM turbolinks-source (5.2.0) tzinfo (2.0.4) concurrent-ruby (~> 1.0) + unf (0.1.4) + unf_ext + unf_ext (0.0.7.7) unicode-display_width (1.7.0) uniform_notifier (1.14.2) virtus (1.0.5) @@ -731,16 +727,24 @@ GEM coercible (~> 1.0) descendants_tracker (~> 0.0, >= 0.0.3) equalizer (~> 0.0, >= 0.0.9) + warden (1.2.9) + rack (>= 2.0.9) webmock (3.12.2) addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) + webpacker (5.3.0) + activesupport (>= 5.2) + rack-proxy (>= 0.6.1) + railties (>= 5.2) + semantic_range (>= 2.3.0) websocket-driver (0.7.3) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) zeitwerk (2.4.2) + zxcvbn-ruby (1.2.0) PLATFORMS ruby diff --git a/plugins/ShinyCMS/.rubocop.yml b/plugins/ShinyCMS/.rubocop.yml index c77d61602..a256ef047 100644 --- a/plugins/ShinyCMS/.rubocop.yml +++ b/plugins/ShinyCMS/.rubocop.yml @@ -191,14 +191,6 @@ Style/IpAddresses: Style/RegexpLiteral: Enabled: false -# Disabling these for now, as part of the first run at enforcing boundaries with Packwerk -Style/StaticClass: - Exclude: - - app/public/models/shinycms/interface/*.rb -Naming/PredicateName: - Exclude: - - app/public/models/shinycms/interface/*.rb - # Whitespace Considered Helpful Layout/ExtraSpacing: Enabled: false @@ -216,6 +208,8 @@ Layout/SpaceInsidePercentLiteralDelimiters: Enabled: false Layout/SpaceInsideReferenceBrackets: Enabled: false +Layout/RedundantLineBreak: + Enabled: false # Alignment also considered helpful. And aesthetically pleasing. Layout/HashAlignment: From a1052b531a3d2d5775d7eff76e701ea35479b127 Mon Sep 17 00:00:00 2001 From: Denny de la Haye <2021@denny.me> Date: Thu, 29 Apr 2021 00:01:18 +0100 Subject: [PATCH 07/10] Add language attribute to tag --- themes/halcyonic/views/layouts/main_site.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/halcyonic/views/layouts/main_site.html.erb b/themes/halcyonic/views/layouts/main_site.html.erb index ace3e49e6..ae7cee9e1 100644 --- a/themes/halcyonic/views/layouts/main_site.html.erb +++ b/themes/halcyonic/views/layouts/main_site.html.erb @@ -6,7 +6,7 @@ html5up.net/license --> - + <%= render partial: 'includes/head' %> class="subpage"<% end %>> From 0472a695cad5ceeac565c6498df4cefacbfc2b61 Mon Sep 17 00:00:00 2001 From: Denny de la Haye <2021@denny.me> Date: Thu, 29 Apr 2021 00:10:56 +0100 Subject: [PATCH 08/10] Fix copypasta errors --- themes/halcyonic/views/shiny_pages/pages/index.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/halcyonic/views/shiny_pages/pages/index.html.erb b/themes/halcyonic/views/shiny_pages/pages/index.html.erb index 65137a7df..e0aa0a320 100644 --- a/themes/halcyonic/views/shiny_pages/pages/index.html.erb +++ b/themes/halcyonic/views/shiny_pages/pages/index.html.erb @@ -35,7 +35,7 @@
    - <%= link_to image_tag( image2, alt: img4_alt, class: 'bordered-feature-image' ), url_for( image2 ) if image2.attached? %> + <%= link_to image_tag( image2, alt: img2_alt, class: 'bordered-feature-image' ), url_for( image2 ) if image2.attached? %>

    <%= heading2 %>

    @@ -47,7 +47,7 @@
    - <%= link_to image_tag( image3, alt: img4_alt, class: 'bordered-feature-image' ), url_for( image3 ) if image3.attached? %> + <%= link_to image_tag( image3, alt: img3_alt, class: 'bordered-feature-image' ), url_for( image3 ) if image3.attached? %>

    <%= heading3 %>

    From 58ab9bedd632ee8263e6e3fc15f212239be8c941 Mon Sep 17 00:00:00 2001 From: Denny de la Haye <2021@denny.me> Date: Thu, 29 Apr 2021 00:34:44 +0100 Subject: [PATCH 09/10] Add accessibly-hidden labels to login/search/subscribe forms --- .../app/assets/stylesheets/shinycms/main_site.scss | 11 +++++++++++ .../app/views/shiny_search/search/_form.html.erb | 2 +- themes/halcyonic/stylesheets/halcyonic/shinycms.scss | 11 +++++++++++ themes/halcyonic/views/includes/_footer.html.erb | 4 ++-- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/plugins/ShinyCMS/app/assets/stylesheets/shinycms/main_site.scss b/plugins/ShinyCMS/app/assets/stylesheets/shinycms/main_site.scss index 27b9ea1fa..420148a27 100644 --- a/plugins/ShinyCMS/app/assets/stylesheets/shinycms/main_site.scss +++ b/plugins/ShinyCMS/app/assets/stylesheets/shinycms/main_site.scss @@ -99,3 +99,14 @@ body { .clear-both { clear: both; } + +.a11y-hidden { + border: 0; + clip: rect( 0 0 0 0 ); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} diff --git a/plugins/ShinySearch/app/views/shiny_search/search/_form.html.erb b/plugins/ShinySearch/app/views/shiny_search/search/_form.html.erb index 33f29295e..1631de995 100644 --- a/plugins/ShinySearch/app/views/shiny_search/search/_form.html.erb +++ b/plugins/ShinySearch/app/views/shiny_search/search/_form.html.erb @@ -1,5 +1,5 @@ <% name ||= 'search_form' %> <%= form_with name: name, url: shiny_search.search_path, method: :get, local: true do |f| %> - <%= f.text_field 'query' %>  + <%= f.label 'query', class: 'a11y-hidden' %><%= f.text_field 'query' %>  <%= f.submit t( 'shiny_search.search.form.search' ), name: nil, class: 'button' %> <% end %> diff --git a/themes/halcyonic/stylesheets/halcyonic/shinycms.scss b/themes/halcyonic/stylesheets/halcyonic/shinycms.scss index 69e69ee84..41f6deaab 100644 --- a/themes/halcyonic/stylesheets/halcyonic/shinycms.scss +++ b/themes/halcyonic/stylesheets/halcyonic/shinycms.scss @@ -118,6 +118,17 @@ input.long { width: 30em; } +.a11y-hidden { + border: 0; + clip: rect( 0 0 0 0 ); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} + // ===== ( undoing sweeping style resets ) ===== blockquote { diff --git a/themes/halcyonic/views/includes/_footer.html.erb b/themes/halcyonic/views/includes/_footer.html.erb index b33ecb3fb..be492b68f 100644 --- a/themes/halcyonic/views/includes/_footer.html.erb +++ b/themes/halcyonic/views/includes/_footer.html.erb @@ -16,10 +16,10 @@

    Log in

    <%= form_for( :user, url: shinycms.user_session_path, method: :post ) do |f| %>
    - <%= f.text_field :login, autocomplete: 'email', placeholder: 'Username or email' %> + <%= f.label :login, class: 'a11y-hidden' %><%= f.text_field :login, autocomplete: 'email', placeholder: 'Username or email' %>
    - <%= f.password_field :password, autocomplete: "current-password", placeholder: 'Password' %> + <%= f.label :password, class: 'a11y-hidden' %><%= f.password_field :password, autocomplete: "current-password", placeholder: 'Password' %>
    <%= f.check_box :remember_me %> <%= f.label :remember_me %> From 2e1af41242fb9bd17a00bf6030d8ad8f59361a12 Mon Sep 17 00:00:00 2001 From: Denny de la Haye <2021@denny.me> Date: Thu, 29 Apr 2021 00:56:22 +0100 Subject: [PATCH 10/10] More form labels for accessibility --- .../views/shiny_lists/includes/_subscription_form.html.erb | 4 ++-- .../ShinySearch/app/views/shiny_search/search/_form.html.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/ShinyLists/app/views/shiny_lists/includes/_subscription_form.html.erb b/plugins/ShinyLists/app/views/shiny_lists/includes/_subscription_form.html.erb index d0b450ad1..36bdece5e 100644 --- a/plugins/ShinyLists/app/views/shiny_lists/includes/_subscription_form.html.erb +++ b/plugins/ShinyLists/app/views/shiny_lists/includes/_subscription_form.html.erb @@ -6,9 +6,9 @@ <%= form_for :subscription, url: shiny_lists.list_subscribe_path( list.slug ), method: :post, class: 'subscription_form' do |f| %> <% unless user_signed_in? %> <% if show_name_field %> - <%= f.text_field :name, placeholder: t( 'shiny_lists.name' ) %>
    + <%= f.label :name, class: 'a11y-hidden' %><%= f.text_field :name, placeholder: t( 'shiny_lists.name' ) %>
    <% end %> - <%= f.text_field :email, placeholder: t( 'shiny_lists.email_address' ) %> + <%= f.label :email, class: 'a11y-hidden' %><%= f.text_field :email, placeholder: t( 'shiny_lists.email_address' ) %> <% if show_name_field %>
    <% end %> <% end %> <%= f.submit t( 'shiny_lists.subscribe' ), name: nil, class: 'button' %> diff --git a/plugins/ShinySearch/app/views/shiny_search/search/_form.html.erb b/plugins/ShinySearch/app/views/shiny_search/search/_form.html.erb index 1631de995..b500c4111 100644 --- a/plugins/ShinySearch/app/views/shiny_search/search/_form.html.erb +++ b/plugins/ShinySearch/app/views/shiny_search/search/_form.html.erb @@ -1,5 +1,5 @@ <% name ||= 'search_form' %> <%= form_with name: name, url: shiny_search.search_path, method: :get, local: true do |f| %> - <%= f.label 'query', class: 'a11y-hidden' %><%= f.text_field 'query' %>  + <%= f.label :query, 'Search', class: 'a11y-hidden' %><%= f.text_field :query %>  <%= f.submit t( 'shiny_search.search.form.search' ), name: nil, class: 'button' %> <% end %>