From 156079b1cbca1d7787e7279d37298dec2d330e22 Mon Sep 17 00:00:00 2001 From: f Date: Wed, 6 Mar 2024 13:49:07 -0300 Subject: [PATCH 1/7] ci: assets [skip ci] --- .../.sprockets-manifest-a1cbb907961024fc033716a7d30668dd.json | 4 ++-- ...5b4444349f4c0175aa88fb76292284e1c68bfc4724151ceaf5113a.css | 3 +++ ...444349f4c0175aa88fb76292284e1c68bfc4724151ceaf5113a.css.gz | 3 +++ ...62d0e1dddd67798890b5d321b4c04051d5de02fe65c7469ef9c28a.css | 3 --- ...0e1dddd67798890b5d321b4c04051d5de02fe65c7469ef9c28a.css.gz | 3 --- ...25b766eda449e80715f9e51238c5defc9e38e60f02c31e11207839.css | 3 +++ ...766eda449e80715f9e51238c5defc9e38e60f02c31e11207839.css.gz | 3 +++ public/packs/js/application-886df482a133d55527f8.js | 3 --- public/packs/js/application-886df482a133d55527f8.js.br | 3 --- public/packs/js/application-886df482a133d55527f8.js.gz | 3 --- public/packs/js/application-886df482a133d55527f8.js.map | 3 --- public/packs/js/application-886df482a133d55527f8.js.map.br | 3 --- public/packs/js/application-886df482a133d55527f8.js.map.gz | 3 --- public/packs/js/application-eff7e393ce95ecf9b900.js | 3 +++ ...SE.txt => application-eff7e393ce95ecf9b900.js.LICENSE.txt} | 0 public/packs/js/application-eff7e393ce95ecf9b900.js.br | 3 +++ public/packs/js/application-eff7e393ce95ecf9b900.js.gz | 3 +++ public/packs/js/application-eff7e393ce95ecf9b900.js.map | 3 +++ public/packs/js/application-eff7e393ce95ecf9b900.js.map.br | 3 +++ public/packs/js/application-eff7e393ce95ecf9b900.js.map.gz | 3 +++ public/packs/manifest.json | 2 +- public/packs/manifest.json.br | 4 ++-- public/packs/manifest.json.gz | 2 +- 23 files changed, 36 insertions(+), 30 deletions(-) create mode 100644 public/assets/application-5c98ae5b7e5b4444349f4c0175aa88fb76292284e1c68bfc4724151ceaf5113a.css create mode 100644 public/assets/application-5c98ae5b7e5b4444349f4c0175aa88fb76292284e1c68bfc4724151ceaf5113a.css.gz delete mode 100644 public/assets/application-bf587b120762d0e1dddd67798890b5d321b4c04051d5de02fe65c7469ef9c28a.css delete mode 100644 public/assets/application-bf587b120762d0e1dddd67798890b5d321b4c04051d5de02fe65c7469ef9c28a.css.gz create mode 100644 public/assets/dark-591813c5ed25b766eda449e80715f9e51238c5defc9e38e60f02c31e11207839.css create mode 100644 public/assets/dark-591813c5ed25b766eda449e80715f9e51238c5defc9e38e60f02c31e11207839.css.gz delete mode 100644 public/packs/js/application-886df482a133d55527f8.js delete mode 100644 public/packs/js/application-886df482a133d55527f8.js.br delete mode 100644 public/packs/js/application-886df482a133d55527f8.js.gz delete mode 100644 public/packs/js/application-886df482a133d55527f8.js.map delete mode 100644 public/packs/js/application-886df482a133d55527f8.js.map.br delete mode 100644 public/packs/js/application-886df482a133d55527f8.js.map.gz create mode 100644 public/packs/js/application-eff7e393ce95ecf9b900.js rename public/packs/js/{application-886df482a133d55527f8.js.LICENSE.txt => application-eff7e393ce95ecf9b900.js.LICENSE.txt} (100%) create mode 100644 public/packs/js/application-eff7e393ce95ecf9b900.js.br create mode 100644 public/packs/js/application-eff7e393ce95ecf9b900.js.gz create mode 100644 public/packs/js/application-eff7e393ce95ecf9b900.js.map create mode 100644 public/packs/js/application-eff7e393ce95ecf9b900.js.map.br create mode 100644 public/packs/js/application-eff7e393ce95ecf9b900.js.map.gz diff --git a/public/assets/.sprockets-manifest-a1cbb907961024fc033716a7d30668dd.json b/public/assets/.sprockets-manifest-a1cbb907961024fc033716a7d30668dd.json index 4d14a3ae..247f6c56 100644 --- a/public/assets/.sprockets-manifest-a1cbb907961024fc033716a7d30668dd.json +++ b/public/assets/.sprockets-manifest-a1cbb907961024fc033716a7d30668dd.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d13b9bdec29a674c105944271d94bc7bff67e416cb452c8962d7990b2365dddc -size 14818 +oid sha256:1fb42e911e5a7b4fed24660e36b1702ff6995aaa506e6da6a9df0078251e34d7 +size 15111 diff --git a/public/assets/application-5c98ae5b7e5b4444349f4c0175aa88fb76292284e1c68bfc4724151ceaf5113a.css b/public/assets/application-5c98ae5b7e5b4444349f4c0175aa88fb76292284e1c68bfc4724151ceaf5113a.css new file mode 100644 index 00000000..1945b981 --- /dev/null +++ b/public/assets/application-5c98ae5b7e5b4444349f4c0175aa88fb76292284e1c68bfc4724151ceaf5113a.css @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:84981ad08b14786d825a89f6de709c8951b403f7dd5f5fa88f6a77e16760f284 +size 237180 diff --git a/public/assets/application-5c98ae5b7e5b4444349f4c0175aa88fb76292284e1c68bfc4724151ceaf5113a.css.gz b/public/assets/application-5c98ae5b7e5b4444349f4c0175aa88fb76292284e1c68bfc4724151ceaf5113a.css.gz new file mode 100644 index 00000000..01e72c45 --- /dev/null +++ b/public/assets/application-5c98ae5b7e5b4444349f4c0175aa88fb76292284e1c68bfc4724151ceaf5113a.css.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3df707f1055c66159e723d71cbfa6d501df539538a27e9fc63e789ff7df11e39 +size 32845 diff --git a/public/assets/application-bf587b120762d0e1dddd67798890b5d321b4c04051d5de02fe65c7469ef9c28a.css b/public/assets/application-bf587b120762d0e1dddd67798890b5d321b4c04051d5de02fe65c7469ef9c28a.css deleted file mode 100644 index a3e7b5d3..00000000 --- a/public/assets/application-bf587b120762d0e1dddd67798890b5d321b4c04051d5de02fe65c7469ef9c28a.css +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3c5f8a91f8c54f53251449658b86be3ec6b3413e62df65fbe2b3a345bd523585 -size 236051 diff --git a/public/assets/application-bf587b120762d0e1dddd67798890b5d321b4c04051d5de02fe65c7469ef9c28a.css.gz b/public/assets/application-bf587b120762d0e1dddd67798890b5d321b4c04051d5de02fe65c7469ef9c28a.css.gz deleted file mode 100644 index b7cc9a34..00000000 --- a/public/assets/application-bf587b120762d0e1dddd67798890b5d321b4c04051d5de02fe65c7469ef9c28a.css.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2b03cf49aab868da9abbb8e105f5af74dc259756d31793386281a7dde7c93937 -size 32754 diff --git a/public/assets/dark-591813c5ed25b766eda449e80715f9e51238c5defc9e38e60f02c31e11207839.css b/public/assets/dark-591813c5ed25b766eda449e80715f9e51238c5defc9e38e60f02c31e11207839.css new file mode 100644 index 00000000..ec99e712 --- /dev/null +++ b/public/assets/dark-591813c5ed25b766eda449e80715f9e51238c5defc9e38e60f02c31e11207839.css @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df567b9eefa4ec9a50433a8e572abc260ed033b21bf7befd0ad52822270c28b6 +size 312 diff --git a/public/assets/dark-591813c5ed25b766eda449e80715f9e51238c5defc9e38e60f02c31e11207839.css.gz b/public/assets/dark-591813c5ed25b766eda449e80715f9e51238c5defc9e38e60f02c31e11207839.css.gz new file mode 100644 index 00000000..f384cf5a --- /dev/null +++ b/public/assets/dark-591813c5ed25b766eda449e80715f9e51238c5defc9e38e60f02c31e11207839.css.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:771de7cf116906bf574d88d9138a236e4725dfdcc8a007d8a02573b3661528ed +size 162 diff --git a/public/packs/js/application-886df482a133d55527f8.js b/public/packs/js/application-886df482a133d55527f8.js deleted file mode 100644 index ed76fc79..00000000 --- a/public/packs/js/application-886df482a133d55527f8.js +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2252ec5b0a709ccc33511a5b28723964791f1f618a6ad294e075b6c72840db25 -size 1516360 diff --git a/public/packs/js/application-886df482a133d55527f8.js.br b/public/packs/js/application-886df482a133d55527f8.js.br deleted file mode 100644 index 346ffcda..00000000 --- a/public/packs/js/application-886df482a133d55527f8.js.br +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d0fa88fa553f73bc2102864f6954a4f474e184f200b441f131fad9747559f0cd -size 333267 diff --git a/public/packs/js/application-886df482a133d55527f8.js.gz b/public/packs/js/application-886df482a133d55527f8.js.gz deleted file mode 100644 index 40687a33..00000000 --- a/public/packs/js/application-886df482a133d55527f8.js.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:211d9791a9c91e3e83c574c8c689cf62e507cd95587ba8d3cf925232acfb4482 -size 441098 diff --git a/public/packs/js/application-886df482a133d55527f8.js.map b/public/packs/js/application-886df482a133d55527f8.js.map deleted file mode 100644 index 9e20b3ed..00000000 --- a/public/packs/js/application-886df482a133d55527f8.js.map +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c57b761842347f6f8d76fcaec5d297a93882d88e49be65088166f446c3dbed5a -size 5988215 diff --git a/public/packs/js/application-886df482a133d55527f8.js.map.br b/public/packs/js/application-886df482a133d55527f8.js.map.br deleted file mode 100644 index 490b78d2..00000000 --- a/public/packs/js/application-886df482a133d55527f8.js.map.br +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:33f257673c4ababb6bef1a67f59cb5384ee053990d23cac18cc725a708073778 -size 1278959 diff --git a/public/packs/js/application-886df482a133d55527f8.js.map.gz b/public/packs/js/application-886df482a133d55527f8.js.map.gz deleted file mode 100644 index 9ded6964..00000000 --- a/public/packs/js/application-886df482a133d55527f8.js.map.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:938b2b5cfbe8bc2f88977706c840e11ecc71cf7f86cd0e974e90629a713e6dad -size 1583987 diff --git a/public/packs/js/application-eff7e393ce95ecf9b900.js b/public/packs/js/application-eff7e393ce95ecf9b900.js new file mode 100644 index 00000000..913f7ed6 --- /dev/null +++ b/public/packs/js/application-eff7e393ce95ecf9b900.js @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3440b36c5db64c1084ff4984ad0ff0e440f9e7f96ef6c1a6d23dd46fcc4fc34 +size 1523013 diff --git a/public/packs/js/application-886df482a133d55527f8.js.LICENSE.txt b/public/packs/js/application-eff7e393ce95ecf9b900.js.LICENSE.txt similarity index 100% rename from public/packs/js/application-886df482a133d55527f8.js.LICENSE.txt rename to public/packs/js/application-eff7e393ce95ecf9b900.js.LICENSE.txt diff --git a/public/packs/js/application-eff7e393ce95ecf9b900.js.br b/public/packs/js/application-eff7e393ce95ecf9b900.js.br new file mode 100644 index 00000000..c98d3dd6 --- /dev/null +++ b/public/packs/js/application-eff7e393ce95ecf9b900.js.br @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b13ef3d5e0792eb59d5e63d224fb20f37952eeca26223bd3d523d3adc18de9fc +size 333769 diff --git a/public/packs/js/application-eff7e393ce95ecf9b900.js.gz b/public/packs/js/application-eff7e393ce95ecf9b900.js.gz new file mode 100644 index 00000000..f9cf565f --- /dev/null +++ b/public/packs/js/application-eff7e393ce95ecf9b900.js.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a0602a43649ddafbebd01d991451f7ef6b1ce5d2d33a58a60fb8ace6935f0d47 +size 441624 diff --git a/public/packs/js/application-eff7e393ce95ecf9b900.js.map b/public/packs/js/application-eff7e393ce95ecf9b900.js.map new file mode 100644 index 00000000..522d68e2 --- /dev/null +++ b/public/packs/js/application-eff7e393ce95ecf9b900.js.map @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f76a22d1218344755aad1b6feaaff4027cdcf8dc8a36e40057039fbce1191535 +size 5993093 diff --git a/public/packs/js/application-eff7e393ce95ecf9b900.js.map.br b/public/packs/js/application-eff7e393ce95ecf9b900.js.map.br new file mode 100644 index 00000000..59e88021 --- /dev/null +++ b/public/packs/js/application-eff7e393ce95ecf9b900.js.map.br @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed1577e4439cfa1a829d2ebfa90a242a35c0f6b3552aa7c157c7aba416e1ea4c +size 1281600 diff --git a/public/packs/js/application-eff7e393ce95ecf9b900.js.map.gz b/public/packs/js/application-eff7e393ce95ecf9b900.js.map.gz new file mode 100644 index 00000000..6fd917d3 --- /dev/null +++ b/public/packs/js/application-eff7e393ce95ecf9b900.js.map.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc349e2e206c9ab8c809f5b3c65408abe4366b1d4b9d9fd4e12e02f9eb313978 +size 1585028 diff --git a/public/packs/manifest.json b/public/packs/manifest.json index 4109d5df..2dcf2333 100644 --- a/public/packs/manifest.json +++ b/public/packs/manifest.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7198b7e0061bdb7f3b844ddeb3d10c97b410bc653fb8634e540dd82d27eb22d6 +oid sha256:75288aa35e3342e83e5afeb0e324f251b19259954163412c2b259183d1be2bb8 size 1426 diff --git a/public/packs/manifest.json.br b/public/packs/manifest.json.br index 6d85ce3e..d182a62b 100644 --- a/public/packs/manifest.json.br +++ b/public/packs/manifest.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:55a30ed30ae4b527a6d20f567b9afe5a1c11af8e64f66ed037bc0d14cf190088 -size 319 +oid sha256:30acde91e7a69507c9297823826161ada92641837b5df30edb50f3900ae3718a +size 320 diff --git a/public/packs/manifest.json.gz b/public/packs/manifest.json.gz index 96d59963..46da36ce 100644 --- a/public/packs/manifest.json.gz +++ b/public/packs/manifest.json.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e75a152cd8dcd1a048e8a9a36fc02053a676886b684806dde9c402dfd66ae567 +oid sha256:e3b87c3e6311e1f3d15ecd5b88d15e1f87b6bd582f3a29f91a38901e323ee48b size 365 From 453798dcc7b33cd32a27e358eef5b9cf0acf2434 Mon Sep 17 00:00:00 2001 From: f Date: Thu, 7 Mar 2024 16:38:26 -0300 Subject: [PATCH 2/7] =?UTF-8?q?fix:=20el=20m=C3=A9todo=20es=20p=C3=BAblico?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/site/repository.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/models/site/repository.rb b/app/models/site/repository.rb index 687ced12..c7056eaa 100644 --- a/app/models/site/repository.rb +++ b/app/models/site/repository.rb @@ -169,6 +169,12 @@ class Site git_sh('git', 'lfs', 'push', remote.name, default_branch) end + # Hace limpieza de LFS + def lfs_cleanup + git_sh("git", "lfs", "prune") + git_sh("git", "lfs", "dedup") + end + private # @deprecated @@ -235,10 +241,5 @@ class Site r&.success? end - - def lfs_cleanup - git_sh("git", "lfs", "prune") - git_sh("git", "lfs", "dedup") - end end end From ff84423891cff5a6398a791aeb1315f5395efd27 Mon Sep 17 00:00:00 2001 From: f Date: Thu, 7 Mar 2024 16:38:26 -0300 Subject: [PATCH 3/7] =?UTF-8?q?fix:=20el=20m=C3=A9todo=20es=20p=C3=BAblico?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 453798dcc7b33cd32a27e358eef5b9cf0acf2434) --- app/models/site/repository.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/models/site/repository.rb b/app/models/site/repository.rb index eeca72c4..d41e76f5 100644 --- a/app/models/site/repository.rb +++ b/app/models/site/repository.rb @@ -194,6 +194,12 @@ class Site git_sh('git', 'lfs', 'push', remote.name, default_branch) end + # Hace limpieza de LFS + def lfs_cleanup + git_sh("git", "lfs", "prune") + git_sh("git", "lfs", "dedup") + end + private # @deprecated @@ -260,10 +266,5 @@ class Site r&.success? end - - def lfs_cleanup - git_sh("git", "lfs", "prune") - git_sh("git", "lfs", "dedup") - end end end From 643641b763b33493d0d2c724b8e86031aef61c86 Mon Sep 17 00:00:00 2001 From: f Date: Thu, 21 Mar 2024 18:23:02 -0300 Subject: [PATCH 4/7] build: assets --- .../.sprockets-manifest-a1cbb907961024fc033716a7d30668dd.json | 2 +- ...e55aa7c5b39fafd98674b63637ac6f38a896dbb79597f51adfbfdd1.css | 3 +++ ...aa7c5b39fafd98674b63637ac6f38a896dbb79597f51adfbfdd1.css.gz | 3 +++ ...0f1ddba4b6d570ac1bc4318f0e84d522fe2c02eb6fbb594ece6f7a5.css | 3 --- ...ddba4b6d570ac1bc4318f0e84d522fe2c02eb6fbb594ece6f7a5.css.gz | 3 --- 5 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 public/assets/application-df0385d47e55aa7c5b39fafd98674b63637ac6f38a896dbb79597f51adfbfdd1.css create mode 100644 public/assets/application-df0385d47e55aa7c5b39fafd98674b63637ac6f38a896dbb79597f51adfbfdd1.css.gz delete mode 100644 public/assets/application-e103c526f0f1ddba4b6d570ac1bc4318f0e84d522fe2c02eb6fbb594ece6f7a5.css delete mode 100644 public/assets/application-e103c526f0f1ddba4b6d570ac1bc4318f0e84d522fe2c02eb6fbb594ece6f7a5.css.gz diff --git a/public/assets/.sprockets-manifest-a1cbb907961024fc033716a7d30668dd.json b/public/assets/.sprockets-manifest-a1cbb907961024fc033716a7d30668dd.json index 247f6c56..416af292 100644 --- a/public/assets/.sprockets-manifest-a1cbb907961024fc033716a7d30668dd.json +++ b/public/assets/.sprockets-manifest-a1cbb907961024fc033716a7d30668dd.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1fb42e911e5a7b4fed24660e36b1702ff6995aaa506e6da6a9df0078251e34d7 +oid sha256:37a80248d53c089ef603dbf365c2d3c5281a23d72843f270f4b198ed29fb77bc size 15111 diff --git a/public/assets/application-df0385d47e55aa7c5b39fafd98674b63637ac6f38a896dbb79597f51adfbfdd1.css b/public/assets/application-df0385d47e55aa7c5b39fafd98674b63637ac6f38a896dbb79597f51adfbfdd1.css new file mode 100644 index 00000000..35f61aec --- /dev/null +++ b/public/assets/application-df0385d47e55aa7c5b39fafd98674b63637ac6f38a896dbb79597f51adfbfdd1.css @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d9a0b60c18452d62be9bb14d88398124b4edee2aa76d4bb6c529b18042b62ca7 +size 238837 diff --git a/public/assets/application-df0385d47e55aa7c5b39fafd98674b63637ac6f38a896dbb79597f51adfbfdd1.css.gz b/public/assets/application-df0385d47e55aa7c5b39fafd98674b63637ac6f38a896dbb79597f51adfbfdd1.css.gz new file mode 100644 index 00000000..66470122 --- /dev/null +++ b/public/assets/application-df0385d47e55aa7c5b39fafd98674b63637ac6f38a896dbb79597f51adfbfdd1.css.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a72678068488f0074c34beea6297b0663e74fba1147dbd664fbc6d688cd4b814 +size 33071 diff --git a/public/assets/application-e103c526f0f1ddba4b6d570ac1bc4318f0e84d522fe2c02eb6fbb594ece6f7a5.css b/public/assets/application-e103c526f0f1ddba4b6d570ac1bc4318f0e84d522fe2c02eb6fbb594ece6f7a5.css deleted file mode 100644 index c79ec1f0..00000000 --- a/public/assets/application-e103c526f0f1ddba4b6d570ac1bc4318f0e84d522fe2c02eb6fbb594ece6f7a5.css +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ba248b242410bc53b4f4ad49b40a6e80f27c1c1586465e3cebf6ff085ec9ba51 -size 236004 diff --git a/public/assets/application-e103c526f0f1ddba4b6d570ac1bc4318f0e84d522fe2c02eb6fbb594ece6f7a5.css.gz b/public/assets/application-e103c526f0f1ddba4b6d570ac1bc4318f0e84d522fe2c02eb6fbb594ece6f7a5.css.gz deleted file mode 100644 index ab063359..00000000 --- a/public/assets/application-e103c526f0f1ddba4b6d570ac1bc4318f0e84d522fe2c02eb6fbb594ece6f7a5.css.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:24baa40e59b12846a5f48ca19176e606fa5fa9b6ef58f3a6e45a22c0a88b6d68 -size 32740 From fb38600884faffea66a9ff832d854fec3eb5dc03 Mon Sep 17 00:00:00 2001 From: f Date: Fri, 22 Mar 2024 18:34:24 -0300 Subject: [PATCH 5/7] =?UTF-8?q?feat:=20recargar=20autom=C3=A1ticamente=20e?= =?UTF-8?q?l=20estado=20de=20publicaci=C3=B3n=20#13611?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/sites_controller.rb | 7 +++++ app/javascript/packs/application.js | 2 ++ app/views/sites/_status.haml | 41 ++++++++++++++++------------- app/views/sites/status.haml | 1 + config/locales/en.yml | 2 +- config/locales/es.yml | 2 +- config/routes.rb | 2 ++ package.json | 3 ++- yarn.lock | 5 ++++ 9 files changed, 43 insertions(+), 22 deletions(-) create mode 100644 app/views/sites/status.haml diff --git a/app/controllers/sites_controller.rb b/app/controllers/sites_controller.rb index bec42b39..49527cf7 100644 --- a/app/controllers/sites_controller.rb +++ b/app/controllers/sites_controller.rb @@ -15,6 +15,13 @@ class SitesController < ApplicationController fresh_when @sites end + # Genera la caja del estado para HTMX + def status + authorize site + + render('sites/status', layout: false) if stale? site + end + # No tenemos propiedades de un sitio aún, así que vamos al listado de # artículos def show diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js index 9cbc30bf..9ddc9753 100644 --- a/app/javascript/packs/application.js +++ b/app/javascript/packs/application.js @@ -33,3 +33,5 @@ import 'chartkick/chart.js' Rails.start() Turbolinks.start() ActiveStorage.start() + +window.htmx = require('htmx.org/dist/htmx') diff --git a/app/views/sites/_status.haml b/app/views/sites/_status.haml index 6a610e73..47bed657 100644 --- a/app/views/sites/_status.haml +++ b/app/views/sites/_status.haml @@ -1,21 +1,24 @@ -- link = nil -- if site.not_published_yet? - - message = t('.not_published_yet') -- elsif site.awaiting_publication? - - message = t('.awaiting_publication') -- elsif site.building? - - if site.average_publication_time_calculable? - - average_building_time = site.average_publication_time - - elsif !site.similar_sites? - - average_building_time = 60 +- cache site do + - link = nil + - if site.not_published_yet? + - message = t('.not_published_yet') + - elsif site.awaiting_publication? + - message = t('.awaiting_publication') + - elsif site.building? + - if site.average_publication_time_calculable? + - average_building_time = site.average_publication_time + - elsif !site.similar_sites? + - average_building_time = 60 + - else + - average_building_time = site.average_publication_time_for_similar_sites + + - average_publication_time_human = distance_of_time_in_words average_building_time + - message = t('.building', average_time: average_publication_time_human, seconds: average_building_time) - else - - average_building_time = site.average_publication_time_for_similar_sites + - message = t('.available') + - link = true - - average_publication_time_human = distance_of_time_in_words average_building_time - - message = t('.building', average_time: average_publication_time_human, seconds: average_building_time) -- else - - message = t('.available') - - link = true - -= render 'bootstrap/alert' do - = link_to_if link, message.html_safe, site_build_stats_path(site), class: 'alert-link' + -# TODO: Calcular cada cuanto sería óptimo recargar + %div{ 'hx-get': site_status_path(site), 'hx-trigger': 'every 10s', 'hx-swap': 'outerHTML' } + = render 'bootstrap/alert' do + = link_to_if link, message.html_safe, site_build_stats_path(site), class: 'alert-link' diff --git a/app/views/sites/status.haml b/app/views/sites/status.haml new file mode 100644 index 00000000..3d9793a5 --- /dev/null +++ b/app/views/sites/status.haml @@ -0,0 +1 @@ += render 'sites/status', site: @site diff --git a/config/locales/en.yml b/config/locales/en.yml index fc9d4894..720f784a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -389,7 +389,7 @@ en: static_file_migration: 'File migration' find_and_replace: 'Search and replace' status: - building: "Your site is building, refresh this page in ." + building: "Your site is building, it will be ready in ." not_published_yet: "Your site is being published for the first time, please wait up to 1 minute..." available: "Your site is available! Click here to find all the different ways to visit it." awaiting_publication: "There are unpublished changes. Click the button below and wait a moment to find them on your site." diff --git a/config/locales/es.yml b/config/locales/es.yml index 4bda4982..e7ff0864 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -394,7 +394,7 @@ es: static_file_migration: 'Migración de archivos' find_and_replace: 'Búsqueda y reemplazo' status: - building: "Tu sitio se está publicando, recargá esta página en ." + building: "Tu sitio se está publicando, estará listo en ." not_published_yet: "Tu sitio se está publicando por primera vez, por favor espera hasta un minuto..." available: "¡Tu sitio está disponible! Cliqueá aquí para encontrar todas las formas en que podés visitarlo." awaiting_publication: "Hay cambios sin publicar, cliqueá el botón debajo y espera un momento para encontrarlos en tu sitio." diff --git a/config/routes.rb b/config/routes.rb index 635be07a..557439e9 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -37,6 +37,8 @@ Rails.application.routes.draw do get 'pull', to: 'sites#fetch' post 'pull', to: 'sites#merge' + get 'status', to: 'sites#status' + # Gestionar usuaries get 'usuaries/invite', to: 'usuaries#invite' post 'usuaries/invite', to: 'usuaries#send_invitations' diff --git a/package.json b/package.json index 7901ad41..871c9d9b 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "zepto": "^1.2.0" }, "devDependencies": { - "@types/rails__activestorage": "^6.0.0" + "@types/rails__activestorage": "^6.0.0", + "htmx.org": "^1.9.11" } } diff --git a/yarn.lock b/yarn.lock index 0c52b9d3..4619169e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4548,6 +4548,11 @@ html-entities@^1.3.1: resolved "https://registry.npmjs.org/html-entities/-/html-entities-1.4.0.tgz" integrity sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA== +htmx.org@^1.9.11: + version "1.9.11" + resolved "https://registry.yarnpkg.com/htmx.org/-/htmx.org-1.9.11.tgz#00192041ee682d6ca7146d0fbd901169ffe72d87" + integrity sha512-WlVuICn8dfNOOgYmdYzYG8zSnP3++AdHkMHooQAzGZObWpVXYathpz/I37ycF4zikR6YduzfCvEcxk20JkIUsw== + http-deceiver@^1.2.7: version "1.2.7" resolved "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz" From 736f0552f73e9a88a81552da1725b87dfeea33e4 Mon Sep 17 00:00:00 2001 From: f Date: Fri, 22 Mar 2024 18:46:21 -0300 Subject: [PATCH 6/7] =?UTF-8?q?fix:=20poder=20importar=20htmx=20en=20produ?= =?UTF-8?q?cci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/javascript/packs/application.js | 2 +- package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js index 9ddc9753..d8ff0dd1 100644 --- a/app/javascript/packs/application.js +++ b/app/javascript/packs/application.js @@ -34,4 +34,4 @@ Rails.start() Turbolinks.start() ActiveStorage.start() -window.htmx = require('htmx.org/dist/htmx') +window.htmx = require('htmx.org/dist/htmx.js') diff --git a/package.json b/package.json index 871c9d9b..870b8e9b 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "commonmark": "^0.29.0", "fork-awesome": "^1.1.7", "fork-ts-checker-webpack-plugin": "^6.1.0", + "htmx.org": "^1.9.11", "input-map": "git+https://0xacab.org/sutty/input-map.git", "input-tag": "git+https://0xacab.org/sutty/input-tag.git", "leaflet": "^1.7.1", @@ -34,7 +35,6 @@ "zepto": "^1.2.0" }, "devDependencies": { - "@types/rails__activestorage": "^6.0.0", - "htmx.org": "^1.9.11" + "@types/rails__activestorage": "^6.0.0" } } From 19d9c0b6c959cbccb56eda2b899a8e89f8f1c44d Mon Sep 17 00:00:00 2001 From: f Date: Fri, 22 Mar 2024 18:50:14 -0300 Subject: [PATCH 7/7] ci: assets [skip ci] --- .../.sprockets-manifest-a1cbb907961024fc033716a7d30668dd.json | 4 ++-- public/packs/js/application-8ce9779d857bfff53532.js | 3 +++ ...SE.txt => application-8ce9779d857bfff53532.js.LICENSE.txt} | 0 public/packs/js/application-8ce9779d857bfff53532.js.br | 3 +++ public/packs/js/application-8ce9779d857bfff53532.js.gz | 3 +++ public/packs/js/application-8ce9779d857bfff53532.js.map | 3 +++ public/packs/js/application-8ce9779d857bfff53532.js.map.br | 3 +++ public/packs/js/application-8ce9779d857bfff53532.js.map.gz | 3 +++ public/packs/js/application-eff7e393ce95ecf9b900.js | 3 --- public/packs/js/application-eff7e393ce95ecf9b900.js.br | 3 --- public/packs/js/application-eff7e393ce95ecf9b900.js.gz | 3 --- public/packs/js/application-eff7e393ce95ecf9b900.js.map | 3 --- public/packs/js/application-eff7e393ce95ecf9b900.js.map.br | 3 --- public/packs/js/application-eff7e393ce95ecf9b900.js.map.gz | 3 --- public/packs/manifest.json | 2 +- public/packs/manifest.json.br | 2 +- public/packs/manifest.json.gz | 2 +- 17 files changed, 23 insertions(+), 23 deletions(-) create mode 100644 public/packs/js/application-8ce9779d857bfff53532.js rename public/packs/js/{application-eff7e393ce95ecf9b900.js.LICENSE.txt => application-8ce9779d857bfff53532.js.LICENSE.txt} (100%) create mode 100644 public/packs/js/application-8ce9779d857bfff53532.js.br create mode 100644 public/packs/js/application-8ce9779d857bfff53532.js.gz create mode 100644 public/packs/js/application-8ce9779d857bfff53532.js.map create mode 100644 public/packs/js/application-8ce9779d857bfff53532.js.map.br create mode 100644 public/packs/js/application-8ce9779d857bfff53532.js.map.gz delete mode 100644 public/packs/js/application-eff7e393ce95ecf9b900.js delete mode 100644 public/packs/js/application-eff7e393ce95ecf9b900.js.br delete mode 100644 public/packs/js/application-eff7e393ce95ecf9b900.js.gz delete mode 100644 public/packs/js/application-eff7e393ce95ecf9b900.js.map delete mode 100644 public/packs/js/application-eff7e393ce95ecf9b900.js.map.br delete mode 100644 public/packs/js/application-eff7e393ce95ecf9b900.js.map.gz diff --git a/public/assets/.sprockets-manifest-a1cbb907961024fc033716a7d30668dd.json b/public/assets/.sprockets-manifest-a1cbb907961024fc033716a7d30668dd.json index 416af292..45b7c422 100644 --- a/public/assets/.sprockets-manifest-a1cbb907961024fc033716a7d30668dd.json +++ b/public/assets/.sprockets-manifest-a1cbb907961024fc033716a7d30668dd.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:37a80248d53c089ef603dbf365c2d3c5281a23d72843f270f4b198ed29fb77bc -size 15111 +oid sha256:d15ecdd304bac8be507dbba7a3d0aa522e7b6f0e7d6a357df4d3a8d828b618c2 +size 10243 diff --git a/public/packs/js/application-8ce9779d857bfff53532.js b/public/packs/js/application-8ce9779d857bfff53532.js new file mode 100644 index 00000000..134f014c --- /dev/null +++ b/public/packs/js/application-8ce9779d857bfff53532.js @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:632234e427da97d723efe4061b3f432aade159b51949167abeca34826bcff5ea +size 1581325 diff --git a/public/packs/js/application-eff7e393ce95ecf9b900.js.LICENSE.txt b/public/packs/js/application-8ce9779d857bfff53532.js.LICENSE.txt similarity index 100% rename from public/packs/js/application-eff7e393ce95ecf9b900.js.LICENSE.txt rename to public/packs/js/application-8ce9779d857bfff53532.js.LICENSE.txt diff --git a/public/packs/js/application-8ce9779d857bfff53532.js.br b/public/packs/js/application-8ce9779d857bfff53532.js.br new file mode 100644 index 00000000..610a9646 --- /dev/null +++ b/public/packs/js/application-8ce9779d857bfff53532.js.br @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ac34b76ab95f467a2ffb3c8689266f7706ca00172d130302386ee08b22dede2 +size 347614 diff --git a/public/packs/js/application-8ce9779d857bfff53532.js.gz b/public/packs/js/application-8ce9779d857bfff53532.js.gz new file mode 100644 index 00000000..5886b434 --- /dev/null +++ b/public/packs/js/application-8ce9779d857bfff53532.js.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:73c9f3bd667a29d7026309e5d31ab91e45b9e10e186d9b8abfa3e3a12ff3bf0c +size 458426 diff --git a/public/packs/js/application-8ce9779d857bfff53532.js.map b/public/packs/js/application-8ce9779d857bfff53532.js.map new file mode 100644 index 00000000..e6c66405 --- /dev/null +++ b/public/packs/js/application-8ce9779d857bfff53532.js.map @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2bb17fb9d66535cf55c84efb3c56242050c1e7bc168f44b3ff496df9fe0beb67 +size 6205529 diff --git a/public/packs/js/application-8ce9779d857bfff53532.js.map.br b/public/packs/js/application-8ce9779d857bfff53532.js.map.br new file mode 100644 index 00000000..5eeaead6 --- /dev/null +++ b/public/packs/js/application-8ce9779d857bfff53532.js.map.br @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0598c9fd4ddf8878e5ed6ee980ac35586b305eb9b359605d713283bfbeb19b68 +size 1328792 diff --git a/public/packs/js/application-8ce9779d857bfff53532.js.map.gz b/public/packs/js/application-8ce9779d857bfff53532.js.map.gz new file mode 100644 index 00000000..48ae8089 --- /dev/null +++ b/public/packs/js/application-8ce9779d857bfff53532.js.map.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b9a2ba478f9e5abf2712b9b68a9994f668acb52006aac34189a813b67f4be657 +size 1640525 diff --git a/public/packs/js/application-eff7e393ce95ecf9b900.js b/public/packs/js/application-eff7e393ce95ecf9b900.js deleted file mode 100644 index 913f7ed6..00000000 --- a/public/packs/js/application-eff7e393ce95ecf9b900.js +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e3440b36c5db64c1084ff4984ad0ff0e440f9e7f96ef6c1a6d23dd46fcc4fc34 -size 1523013 diff --git a/public/packs/js/application-eff7e393ce95ecf9b900.js.br b/public/packs/js/application-eff7e393ce95ecf9b900.js.br deleted file mode 100644 index c98d3dd6..00000000 --- a/public/packs/js/application-eff7e393ce95ecf9b900.js.br +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b13ef3d5e0792eb59d5e63d224fb20f37952eeca26223bd3d523d3adc18de9fc -size 333769 diff --git a/public/packs/js/application-eff7e393ce95ecf9b900.js.gz b/public/packs/js/application-eff7e393ce95ecf9b900.js.gz deleted file mode 100644 index f9cf565f..00000000 --- a/public/packs/js/application-eff7e393ce95ecf9b900.js.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a0602a43649ddafbebd01d991451f7ef6b1ce5d2d33a58a60fb8ace6935f0d47 -size 441624 diff --git a/public/packs/js/application-eff7e393ce95ecf9b900.js.map b/public/packs/js/application-eff7e393ce95ecf9b900.js.map deleted file mode 100644 index 522d68e2..00000000 --- a/public/packs/js/application-eff7e393ce95ecf9b900.js.map +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f76a22d1218344755aad1b6feaaff4027cdcf8dc8a36e40057039fbce1191535 -size 5993093 diff --git a/public/packs/js/application-eff7e393ce95ecf9b900.js.map.br b/public/packs/js/application-eff7e393ce95ecf9b900.js.map.br deleted file mode 100644 index 59e88021..00000000 --- a/public/packs/js/application-eff7e393ce95ecf9b900.js.map.br +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ed1577e4439cfa1a829d2ebfa90a242a35c0f6b3552aa7c157c7aba416e1ea4c -size 1281600 diff --git a/public/packs/js/application-eff7e393ce95ecf9b900.js.map.gz b/public/packs/js/application-eff7e393ce95ecf9b900.js.map.gz deleted file mode 100644 index 6fd917d3..00000000 --- a/public/packs/js/application-eff7e393ce95ecf9b900.js.map.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cc349e2e206c9ab8c809f5b3c65408abe4366b1d4b9d9fd4e12e02f9eb313978 -size 1585028 diff --git a/public/packs/manifest.json b/public/packs/manifest.json index 2dcf2333..189f4782 100644 --- a/public/packs/manifest.json +++ b/public/packs/manifest.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:75288aa35e3342e83e5afeb0e324f251b19259954163412c2b259183d1be2bb8 +oid sha256:1a206bab3fa22fb96428b3c46685fa61a059f9db62e3df47037537cd68782c1f size 1426 diff --git a/public/packs/manifest.json.br b/public/packs/manifest.json.br index d182a62b..7222d4cd 100644 --- a/public/packs/manifest.json.br +++ b/public/packs/manifest.json.br @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:30acde91e7a69507c9297823826161ada92641837b5df30edb50f3900ae3718a +oid sha256:923d3edcf9cd76e822ca27c1eafcbdaa8b3f1ed47d25ace25e19b6c416d958f5 size 320 diff --git a/public/packs/manifest.json.gz b/public/packs/manifest.json.gz index 46da36ce..bc4ea39d 100644 --- a/public/packs/manifest.json.gz +++ b/public/packs/manifest.json.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e3b87c3e6311e1f3d15ecd5b88d15e1f87b6bd582f3a29f91a38901e323ee48b +oid sha256:a73c5c3f9d5bbecd9a63d4088c029ea835becbd0a6496b7a6f6ca6505d2095c5 size 365