From 020b536003e71299cd6c458020f4507bf5ed170c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jan 2022 09:27:57 +0000 Subject: [PATCH 01/58] Bump devise from 4.8.0 to 4.8.1 Bumps [devise](https://github.com/heartcombo/devise) from 4.8.0 to 4.8.1. - [Release notes](https://github.com/heartcombo/devise/releases) - [Changelog](https://github.com/heartcombo/devise/blob/main/CHANGELOG.md) - [Commits](https://github.com/heartcombo/devise/compare/v4.8.0...v4.8.1) --- updated-dependencies: - dependency-name: devise dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index d914f35a..4adb27ed 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1295,7 +1295,7 @@ GEM db_text_search (0.3.2) activerecord (>= 4.1.15, < 7.0) debug_inspector (1.1.0) - devise (4.8.0) + devise (4.8.1) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) From 8d457c8daa707d3544cb012f9370ec2a815ee480 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jan 2022 12:02:53 +0000 Subject: [PATCH 02/58] Bump listen from 3.7.0 to 3.7.1 Bumps [listen](https://github.com/guard/listen) from 3.7.0 to 3.7.1. - [Release notes](https://github.com/guard/listen/releases) - [Commits](https://github.com/guard/listen/compare/v3.7.0...v3.7.1) --- updated-dependencies: - dependency-name: listen dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index d914f35a..bcae5094 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1324,7 +1324,7 @@ GEM faye-websocket (0.11.1) eventmachine (>= 0.12.0) websocket-driver (>= 0.5.1) - ffi (1.15.4) + ffi (1.15.5) ffi-compiler (1.0.1) ffi (>= 1.0.0) rake @@ -1401,7 +1401,7 @@ GEM language_filter (0.3.01) libv8-node (16.10.0.0) libv8-node (16.10.0.0-x86_64-linux) - listen (3.7.0) + listen (3.7.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) loofah (2.13.0) From 39db1222dfd6f029fb52111f8f987e9f1e07eaff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jan 2022 12:16:03 +0000 Subject: [PATCH 03/58] Bump active_storage_validations from 0.9.5 to 0.9.6 Bumps [active_storage_validations](https://github.com/igorkasyanchuk/active_storage_validations) from 0.9.5 to 0.9.6. - [Release notes](https://github.com/igorkasyanchuk/active_storage_validations/releases) - [Changelog](https://github.com/igorkasyanchuk/active_storage_validations/blob/master/CHANGES.md) - [Commits](https://github.com/igorkasyanchuk/active_storage_validations/commits) --- updated-dependencies: - dependency-name: active_storage_validations dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index d914f35a..f415fd80 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -81,8 +81,11 @@ GEM rails-html-sanitizer (~> 1.1, >= 1.2.0) active_record_union (1.3.0) activerecord (>= 4.0) - active_storage_validations (0.9.5) - rails (>= 5.2.0) + active_storage_validations (0.9.6) + activejob (>= 5.2.0) + activemodel (>= 5.2.0) + activestorage (>= 5.2.0) + activesupport (>= 5.2.0) activejob (6.1.4.1) activesupport (= 6.1.4.1) globalid (>= 0.3.6) @@ -1334,7 +1337,7 @@ GEM railties (>= 3.2, < 8.0) friendly_id (5.4.2) activerecord (>= 4.0.0) - globalid (0.5.2) + globalid (1.0.0) activesupport (>= 5.0) haml (5.2.2) temple (>= 0.8.0) @@ -1595,9 +1598,9 @@ GEM babel-source (>= 5.8.11) babel-transpiler sprockets (>= 3.0.0) - sprockets-rails (3.2.2) - actionpack (>= 4.0) - activesupport (>= 4.0) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) sprockets (>= 3.0.0) sqlite3 (1.4.2) stackprof (0.2.17) From 39e4cc579c79d564ffcdd0b534a44dade6ac3ea5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jan 2022 12:16:45 +0000 Subject: [PATCH 04/58] Bump bullet from 6.1.5 to 7.0.1 Bumps [bullet](https://github.com/flyerhzm/bullet) from 6.1.5 to 7.0.1. - [Release notes](https://github.com/flyerhzm/bullet/releases) - [Changelog](https://github.com/flyerhzm/bullet/blob/master/CHANGELOG.md) - [Commits](https://github.com/flyerhzm/bullet/compare/6.1.5...7.0.1) --- updated-dependencies: - dependency-name: bullet dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index d914f35a..5a599526 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1258,7 +1258,7 @@ GEM binding_of_caller (1.0.0) debug_inspector (>= 0.0.1) builder (3.2.4) - bullet (6.1.5) + bullet (7.0.1) activesupport (>= 3.0.0) uniform_notifier (~> 1.11) bundler-audit (0.9.0.1) From ea47cf2acdd1fd879c8c59c607c5c03c35af43d1 Mon Sep 17 00:00:00 2001 From: drusepth Date: Tue, 25 Jan 2022 23:35:14 -0800 Subject: [PATCH 05/58] don't float %-complete sidelinks badges, so they block-wrap properly on low resolutions --- app/views/content/display/sidebar/_categories.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/content/display/sidebar/_categories.html.erb b/app/views/content/display/sidebar/_categories.html.erb index ed78552e..760328a4 100644 --- a/app/views/content/display/sidebar/_categories.html.erb +++ b/app/views/content/display/sidebar/_categories.html.erb @@ -45,11 +45,11 @@ <%= category[:label].capitalize.presence || '(blank)' %> <% if editing && category[:percent_complete].present? %> <% if category[:percent_complete] == 100 %> - + check <% else %> - + <%= category[:percent_complete] %>% <% end %> From c792fa15f641ecb91ac0e1bae8be9d802d6a3b34 Mon Sep 17 00:00:00 2001 From: drusepth Date: Tue, 25 Jan 2022 23:41:26 -0800 Subject: [PATCH 06/58] adjust sidelinks padding a bit more --- app/assets/stylesheets/content.css.scss | 3 ++- app/views/content/display/sidebar/_categories.html.erb | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/content.css.scss b/app/assets/stylesheets/content.css.scss index 97363d86..c2b25ce3 100644 --- a/app/assets/stylesheets/content.css.scss +++ b/app/assets/stylesheets/content.css.scss @@ -34,7 +34,8 @@ p.long-form { a { display: block; - padding: 10px 20px; + padding: 10px; + padding-right: 0; } } diff --git a/app/views/content/display/sidebar/_categories.html.erb b/app/views/content/display/sidebar/_categories.html.erb index 760328a4..25e4c3a6 100644 --- a/app/views/content/display/sidebar/_categories.html.erb +++ b/app/views/content/display/sidebar/_categories.html.erb @@ -45,11 +45,11 @@ <%= category[:label].capitalize.presence || '(blank)' %> <% if editing && category[:percent_complete].present? %> <% if category[:percent_complete] == 100 %> - + check <% else %> - + <%= category[:percent_complete] %>% <% end %> From 3949da7a63a87748b3a4697f7b9a4e6da5b517d1 Mon Sep 17 00:00:00 2001 From: drusepth Date: Thu, 27 Jan 2022 13:27:51 -0800 Subject: [PATCH 07/58] require edit perms to view content changelogs --- app/controllers/content_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/content_controller.rb b/app/controllers/content_controller.rb index ec99a8d9..8d115431 100644 --- a/app/controllers/content_controller.rb +++ b/app/controllers/content_controller.rb @@ -301,6 +301,7 @@ class ContentController < ApplicationController @content = content_type.find_by(id: params[:id]) return redirect_to(root_path, notice: "You don't have permission to view that content.") if @content.nil? @serialized_content = ContentSerializer.new(@content) + return redirect_to(root_path, notice: "You don't have permission to view that content.") unless @content.updatable_by?(current_user || User.new) if user_signed_in? @navbar_actions << { From b2f3e691aa8fdf6ed9196b07c891ba343f9938c0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Feb 2022 12:03:57 +0000 Subject: [PATCH 08/58] Bump sidekiq from 6.2.2 to 6.4.1 Bumps [sidekiq](https://github.com/mperham/sidekiq) from 6.2.2 to 6.4.1. - [Release notes](https://github.com/mperham/sidekiq/releases) - [Changelog](https://github.com/mperham/sidekiq/blob/main/Changes.md) - [Commits](https://github.com/mperham/sidekiq/compare/v6.2.2...v6.4.1) --- updated-dependencies: - dependency-name: sidekiq dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index d914f35a..63c6220f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1578,7 +1578,7 @@ GEM rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2) semantic_range (3.0.0) - sidekiq (6.2.2) + sidekiq (6.4.1) connection_pool (>= 2.2.2) rack (~> 2.0) redis (>= 4.2.0) From 84b0ca488dbc5ab365731f081f29540373b7fa57 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Feb 2022 21:50:48 +0000 Subject: [PATCH 09/58] Bump puma from 5.5.1 to 5.6.2 Bumps [puma](https://github.com/puma/puma) from 5.5.1 to 5.6.2. - [Release notes](https://github.com/puma/puma/releases) - [Changelog](https://github.com/puma/puma/blob/master/History.md) - [Commits](https://github.com/puma/puma/compare/v5.5.1...v5.6.2) --- updated-dependencies: - dependency-name: puma dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index bf68a3e8..8e22e764 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ ruby "~> 2.7" # Server gem 'rails' -gem 'puma', '~> 5.5' +gem 'puma', '~> 5.6' gem 'puma-heroku' # gem 'bootsnap', require: false gem 'sprockets', '~> 3.7.2' diff --git a/Gemfile.lock b/Gemfile.lock index d914f35a..5c6c8717 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1472,7 +1472,7 @@ GEM coderay (~> 1.1) method_source (~> 1.0) public_suffix (4.0.6) - puma (5.5.1) + puma (5.6.2) nio4r (~> 2.0) puma-heroku (2.0.0) puma (>= 5.0, < 6.0) @@ -1693,7 +1693,7 @@ DEPENDENCIES paypal_client pg (~> 1.2) pry - puma (~> 5.5) + puma (~> 5.6) puma-heroku rack-mini-profiler rails From 30d8798bb8bed4cc12b0b90475ace40e7f47662a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Feb 2022 10:34:01 +0000 Subject: [PATCH 10/58] Bump follow-redirects from 1.14.7 to 1.14.8 Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 8f9354eb..a3379634 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3085,9 +3085,9 @@ flush-write-stream@^1.0.0: readable-stream "^2.3.6" follow-redirects@^1.0.0, follow-redirects@^1.14.0: - version "1.14.7" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685" - integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ== + version "1.14.8" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.8.tgz#016996fb9a11a100566398b1c6839337d7bfa8fc" + integrity sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA== for-in@^1.0.2: version "1.0.2" From 2aded5a6a0adc8451513dfa8c9f491e5e69c6802 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Feb 2022 12:03:05 +0000 Subject: [PATCH 11/58] Bump aws-sdk-s3 from 1.110.0 to 1.113.0 Bumps [aws-sdk-s3](https://github.com/aws/aws-sdk-ruby) from 1.110.0 to 1.113.0. - [Release notes](https://github.com/aws/aws-sdk-ruby/releases) - [Changelog](https://github.com/aws/aws-sdk-ruby/blob/version-3/gems/aws-sdk-s3/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-ruby/commits) --- updated-dependencies: - dependency-name: aws-sdk-s3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index d914f35a..fb3b6fad 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -117,7 +117,7 @@ GEM autoprefixer-rails (10.3.3.0) execjs (~> 2) aws-eventstream (1.2.0) - aws-partitions (1.543.0) + aws-partitions (1.558.0) aws-sdk (3.1.0) aws-sdk-resources (~> 3) aws-sdk-accessanalyzer (1.23.0) @@ -315,7 +315,7 @@ GEM aws-sdk-connectparticipant (1.14.0) aws-sdk-core (~> 3, >= 3.120.0) aws-sigv4 (~> 1.1) - aws-sdk-core (3.125.0) + aws-sdk-core (3.127.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.525.0) aws-sigv4 (~> 1.1) @@ -578,8 +578,8 @@ GEM aws-sdk-kinesisvideosignalingchannels (1.13.0) aws-sdk-core (~> 3, >= 3.120.0) aws-sigv4 (~> 1.1) - aws-sdk-kms (1.53.0) - aws-sdk-core (~> 3, >= 3.125.0) + aws-sdk-kms (1.55.0) + aws-sdk-core (~> 3, >= 3.127.0) aws-sigv4 (~> 1.1) aws-sdk-lakeformation (1.17.0) aws-sdk-core (~> 3, >= 3.120.0) @@ -1086,8 +1086,8 @@ GEM aws-sdk-route53resolver (1.30.0) aws-sdk-core (~> 3, >= 3.120.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.110.0) - aws-sdk-core (~> 3, >= 3.125.0) + aws-sdk-s3 (1.113.0) + aws-sdk-core (~> 3, >= 3.127.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.4) aws-sdk-s3control (1.40.0) @@ -1373,7 +1373,7 @@ GEM inline_svg (1.7.2) activesupport (>= 3.0) nokogiri (>= 1.6) - jmespath (1.4.0) + jmespath (1.6.0) jquery-rails (4.4.0) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) From f12e7f3b13764604a08a8ddf9c937fce09eee5da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 26 Feb 2022 21:58:56 +0000 Subject: [PATCH 12/58] Bump url-parse from 1.5.3 to 1.5.10 Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.3 to 1.5.10. - [Release notes](https://github.com/unshiftio/url-parse/releases) - [Commits](https://github.com/unshiftio/url-parse/compare/1.5.3...1.5.10) --- updated-dependencies: - dependency-name: url-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 8f9354eb..e1bfcaf3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6841,9 +6841,9 @@ urix@^0.1.0: integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= url-parse@^1.4.3, url-parse@^1.5.1: - version "1.5.3" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.3.tgz#71c1303d38fb6639ade183c2992c8cc0686df862" - integrity sha512-IIORyIQD9rvj0A4CLWsHkBBJuNqWpFQe224b6j9t/ABmquIS0qDU2pY6kl6AuOrL5OkCXHMCFNe1jBcuAggjvQ== + version "1.5.10" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" + integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== dependencies: querystringify "^2.1.1" requires-port "^1.0.0" From 69fb05e92e2c37f7105703be9cd38a55a17170ab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 26 Feb 2022 22:02:46 +0000 Subject: [PATCH 13/58] Bump rails from 6.1.4.1 to 6.1.4.6 Bumps [rails](https://github.com/rails/rails) from 6.1.4.1 to 6.1.4.6. - [Release notes](https://github.com/rails/rails/releases) - [Commits](https://github.com/rails/rails/compare/v6.1.4.1...v6.1.4.6) --- updated-dependencies: - dependency-name: rails dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 120 +++++++++++++++++++++++++-------------------------- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index c384649a..84022006 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -41,40 +41,40 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (6.1.4.1) - actionpack (= 6.1.4.1) - activesupport (= 6.1.4.1) + actioncable (6.1.4.6) + actionpack (= 6.1.4.6) + activesupport (= 6.1.4.6) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.4.1) - actionpack (= 6.1.4.1) - activejob (= 6.1.4.1) - activerecord (= 6.1.4.1) - activestorage (= 6.1.4.1) - activesupport (= 6.1.4.1) + actionmailbox (6.1.4.6) + actionpack (= 6.1.4.6) + activejob (= 6.1.4.6) + activerecord (= 6.1.4.6) + activestorage (= 6.1.4.6) + activesupport (= 6.1.4.6) mail (>= 2.7.1) - actionmailer (6.1.4.1) - actionpack (= 6.1.4.1) - actionview (= 6.1.4.1) - activejob (= 6.1.4.1) - activesupport (= 6.1.4.1) + actionmailer (6.1.4.6) + actionpack (= 6.1.4.6) + actionview (= 6.1.4.6) + activejob (= 6.1.4.6) + activesupport (= 6.1.4.6) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.4.1) - actionview (= 6.1.4.1) - activesupport (= 6.1.4.1) + actionpack (6.1.4.6) + actionview (= 6.1.4.6) + activesupport (= 6.1.4.6) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.4.1) - actionpack (= 6.1.4.1) - activerecord (= 6.1.4.1) - activestorage (= 6.1.4.1) - activesupport (= 6.1.4.1) + actiontext (6.1.4.6) + actionpack (= 6.1.4.6) + activerecord (= 6.1.4.6) + activestorage (= 6.1.4.6) + activesupport (= 6.1.4.6) nokogiri (>= 1.8.5) - actionview (6.1.4.1) - activesupport (= 6.1.4.1) + actionview (6.1.4.6) + activesupport (= 6.1.4.6) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -86,26 +86,26 @@ GEM activemodel (>= 5.2.0) activestorage (>= 5.2.0) activesupport (>= 5.2.0) - activejob (6.1.4.1) - activesupport (= 6.1.4.1) + activejob (6.1.4.6) + activesupport (= 6.1.4.6) globalid (>= 0.3.6) - activemodel (6.1.4.1) - activesupport (= 6.1.4.1) + activemodel (6.1.4.6) + activesupport (= 6.1.4.6) activemodel-serializers-xml (1.0.2) activemodel (> 5.x) activesupport (> 5.x) builder (~> 3.1) - activerecord (6.1.4.1) - activemodel (= 6.1.4.1) - activesupport (= 6.1.4.1) - activestorage (6.1.4.1) - actionpack (= 6.1.4.1) - activejob (= 6.1.4.1) - activerecord (= 6.1.4.1) - activesupport (= 6.1.4.1) + activerecord (6.1.4.6) + activemodel (= 6.1.4.6) + activesupport (= 6.1.4.6) + activestorage (6.1.4.6) + actionpack (= 6.1.4.6) + activejob (= 6.1.4.6) + activerecord (= 6.1.4.6) + activesupport (= 6.1.4.6) marcel (~> 1.0.0) mini_mime (>= 1.1.0) - activesupport (6.1.4.1) + activesupport (6.1.4.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -1357,7 +1357,7 @@ GEM http-form_data (2.3.0) http-parser (1.2.3) ffi-compiler (>= 1.0, < 2.0) - i18n (1.8.11) + i18n (1.10.0) concurrent-ruby (~> 1.0) ibm_cloud_sdk_core (1.1.3) concurrent-ruby (~> 1.0) @@ -1407,7 +1407,7 @@ GEM listen (3.7.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.13.0) + loofah (2.14.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) @@ -1429,7 +1429,7 @@ GEM rake mini_magick (4.11.0) mini_mime (1.1.2) - mini_portile2 (2.7.1) + mini_portile2 (2.8.0) mini_racer (0.6.2) libv8-node (~> 16.10.0.0) minitest (5.15.0) @@ -1440,10 +1440,10 @@ GEM netrc (0.11.0) newrelic_rpm (8.3.0) nio4r (2.5.8) - nokogiri (1.13.1) - mini_portile2 (~> 2.7.0) + nokogiri (1.13.3) + mini_portile2 (~> 2.8.0) racc (~> 1.4) - nokogiri (1.13.1-x86_64-linux) + nokogiri (1.13.3-x86_64-linux) racc (~> 1.4) onebox (2.2.19) addressable (~> 2.8.0) @@ -1492,20 +1492,20 @@ GEM rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.4.1) - actioncable (= 6.1.4.1) - actionmailbox (= 6.1.4.1) - actionmailer (= 6.1.4.1) - actionpack (= 6.1.4.1) - actiontext (= 6.1.4.1) - actionview (= 6.1.4.1) - activejob (= 6.1.4.1) - activemodel (= 6.1.4.1) - activerecord (= 6.1.4.1) - activestorage (= 6.1.4.1) - activesupport (= 6.1.4.1) + rails (6.1.4.6) + actioncable (= 6.1.4.6) + actionmailbox (= 6.1.4.6) + actionmailer (= 6.1.4.6) + actionpack (= 6.1.4.6) + actiontext (= 6.1.4.6) + actionview (= 6.1.4.6) + activejob (= 6.1.4.6) + activemodel (= 6.1.4.6) + activerecord (= 6.1.4.6) + activestorage (= 6.1.4.6) + activesupport (= 6.1.4.6) bundler (>= 1.15.0) - railties (= 6.1.4.1) + railties (= 6.1.4.6) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) @@ -1530,9 +1530,9 @@ GEM sassc-rails (>= 1.3, < 3) rails_gravatar (1.0.4) actionview - railties (6.1.4.1) - actionpack (= 6.1.4.1) - activesupport (= 6.1.4.1) + railties (6.1.4.6) + actionpack (= 6.1.4.6) + activesupport (= 6.1.4.6) method_source rake (>= 0.13) thor (~> 1.0) @@ -1648,7 +1648,7 @@ GEM websocket-extensions (0.1.5) word_count_analyzer (1.0.1) engtagger - zeitwerk (2.5.3) + zeitwerk (2.5.4) PLATFORMS ruby From 790dfeec6f55a34972144386631ca6c4bbdd5ba7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Feb 2022 12:01:13 +0000 Subject: [PATCH 14/58] Bump rack-mini-profiler from 2.3.3 to 3.0.0 Bumps [rack-mini-profiler](https://github.com/MiniProfiler/rack-mini-profiler) from 2.3.3 to 3.0.0. - [Release notes](https://github.com/MiniProfiler/rack-mini-profiler/releases) - [Changelog](https://github.com/MiniProfiler/rack-mini-profiler/blob/master/CHANGELOG.md) - [Commits](https://github.com/MiniProfiler/rack-mini-profiler/compare/v2.3.3...v3.0.0) --- updated-dependencies: - dependency-name: rack-mini-profiler dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 148bdd9e..4db43aa0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1483,7 +1483,7 @@ GEM activesupport (>= 3.0.0) racc (1.6.0) rack (2.2.3) - rack-mini-profiler (2.3.3) + rack-mini-profiler (3.0.0) rack (>= 1.2.0) rack-pjax (1.1.0) nokogiri (~> 1.5) From c41820281988081d28ce2cf78e0696a1d77f28ce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Feb 2022 12:01:55 +0000 Subject: [PATCH 15/58] Bump newrelic_rpm from 8.3.0 to 8.5.0 Bumps [newrelic_rpm](https://github.com/newrelic/newrelic-ruby-agent) from 8.3.0 to 8.5.0. - [Release notes](https://github.com/newrelic/newrelic-ruby-agent/releases) - [Changelog](https://github.com/newrelic/newrelic-ruby-agent/blob/dev/CHANGELOG.md) - [Commits](https://github.com/newrelic/newrelic-ruby-agent/compare/8.3.0...8.5.0) --- updated-dependencies: - dependency-name: newrelic_rpm dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 148bdd9e..c7c99f08 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1438,7 +1438,7 @@ GEM mustache (1.1.1) nested_form (0.3.2) netrc (0.11.0) - newrelic_rpm (8.3.0) + newrelic_rpm (8.5.0) nio4r (2.5.8) nokogiri (1.13.3) mini_portile2 (~> 2.8.0) From 855659fce6405514599e5a80e633ad25f0e7a052 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Feb 2022 12:02:38 +0000 Subject: [PATCH 16/58] Bump redis from 4.5.1 to 4.6.0 Bumps [redis](https://github.com/redis/redis-rb) from 4.5.1 to 4.6.0. - [Release notes](https://github.com/redis/redis-rb/releases) - [Changelog](https://github.com/redis/redis-rb/blob/master/CHANGELOG.md) - [Commits](https://github.com/redis/redis-rb/compare/v4.5.1...v4.6.0) --- updated-dependencies: - dependency-name: redis dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 148bdd9e..0b9e4320 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1547,7 +1547,7 @@ GEM railties (>= 3.2) tilt redcarpet (3.5.1) - redis (4.5.1) + redis (4.6.0) remotipart (1.4.4) responders (3.0.1) actionpack (>= 5.0) From 0d0560f4b9615bdf6931057836c4afbd81f18ba8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Feb 2022 12:03:14 +0000 Subject: [PATCH 17/58] Bump engtagger from 0.2.1 to 0.2.2 Bumps [engtagger](https://github.com/yohasebe/engtagger) from 0.2.1 to 0.2.2. - [Release notes](https://github.com/yohasebe/engtagger/releases) - [Commits](https://github.com/yohasebe/engtagger/compare/v0.2.1...v0.2.2) --- updated-dependencies: - dependency-name: engtagger dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 148bdd9e..2c5d5e4c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1315,7 +1315,7 @@ GEM docile (1.1.5) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) - engtagger (0.2.1) + engtagger (0.2.2) erubi (1.10.0) event_emitter (0.2.6) eventmachine (1.2.7) From f97de37ec8b9b05383b147986539202f3e795b78 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Feb 2022 12:04:33 +0000 Subject: [PATCH 18/58] Bump stackprof from 0.2.17 to 0.2.19 Bumps [stackprof](https://github.com/tmm1/stackprof) from 0.2.17 to 0.2.19. - [Release notes](https://github.com/tmm1/stackprof/releases) - [Changelog](https://github.com/tmm1/stackprof/blob/master/CHANGELOG.md) - [Commits](https://github.com/tmm1/stackprof/compare/v0.2.17...v0.2.19) --- updated-dependencies: - dependency-name: stackprof dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 148bdd9e..92a7dce0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1603,7 +1603,7 @@ GEM activesupport (>= 5.2) sprockets (>= 3.0.0) sqlite3 (1.4.2) - stackprof (0.2.17) + stackprof (0.2.19) statsd-ruby (1.5.0) stripe (5.42.0) stripe_event (2.3.1) From b719263e6c3f43ca51a37eac678977ee24919f92 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Feb 2022 12:07:14 +0000 Subject: [PATCH 19/58] Bump paranoia from 2.5.0 to 2.5.2 Bumps [paranoia](https://github.com/rubysherpas/paranoia) from 2.5.0 to 2.5.2. - [Release notes](https://github.com/rubysherpas/paranoia/releases) - [Changelog](https://github.com/rubysherpas/paranoia/blob/core/CHANGELOG.md) - [Commits](https://github.com/rubysherpas/paranoia/compare/v2.5.0...v2.5.2) --- updated-dependencies: - dependency-name: paranoia dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 148bdd9e..78601ac9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1461,7 +1461,7 @@ GEM mime-types mimemagic (~> 0.3.0) terrapin (~> 0.6.0) - paranoia (2.5.0) + paranoia (2.5.2) activerecord (>= 5.1, < 7.1) paypal-checkout-sdk (1.0.4) paypalhttp (~> 1.0.1) From 70f49030887f779ca0b670c72ec60bb3efb2a16b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Mar 2022 23:27:48 +0000 Subject: [PATCH 20/58] Bump image_processing from 1.12.1 to 1.12.2 Bumps [image_processing](https://github.com/janko/image_processing) from 1.12.1 to 1.12.2. - [Release notes](https://github.com/janko/image_processing/releases) - [Changelog](https://github.com/janko/image_processing/blob/master/CHANGELOG.md) - [Commits](https://github.com/janko/image_processing/compare/v1.12.1...v1.12.2) --- updated-dependencies: - dependency-name: image_processing dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 148bdd9e..46a24acd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1370,7 +1370,7 @@ GEM http (~> 4.4.0) ibm_cloud_sdk_core (~> 1.1.3) jwt (~> 2.2.1) - image_processing (1.12.1) + image_processing (1.12.2) mini_magick (>= 4.9.5, < 5) ruby-vips (>= 2.0.17, < 3) inline_svg (1.7.2) @@ -1560,8 +1560,8 @@ GEM rexml (3.2.5) rinku (2.0.6) rmagick (4.2.4) - ruby-vips (2.0.17) - ffi (~> 1.9) + ruby-vips (2.1.4) + ffi (~> 1.12) rubyzip (2.3.2) sanitize (6.0.0) crass (~> 1.0.2) From 964e9dfcae5becdbeb20908eab0c8a40bef5fc78 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Mar 2022 12:01:21 +0000 Subject: [PATCH 21/58] Bump stripe from 5.42.0 to 5.45.0 Bumps [stripe](https://github.com/stripe/stripe-ruby) from 5.42.0 to 5.45.0. - [Release notes](https://github.com/stripe/stripe-ruby/releases) - [Changelog](https://github.com/stripe/stripe-ruby/blob/master/CHANGELOG.md) - [Commits](https://github.com/stripe/stripe-ruby/compare/v5.42.0...v5.45.0) --- updated-dependencies: - dependency-name: stripe dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 148bdd9e..5e87243e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1605,7 +1605,7 @@ GEM sqlite3 (1.4.2) stackprof (0.2.17) statsd-ruby (1.5.0) - stripe (5.42.0) + stripe (5.45.0) stripe_event (2.3.1) activesupport (>= 3.1) stripe (>= 2.8, < 6) From e66764fcfc499aea02bcc1d271cb60b2bdc2c637 Mon Sep 17 00:00:00 2001 From: drusepth Date: Wed, 2 Mar 2022 23:39:59 -0800 Subject: [PATCH 22/58] remove tds --- app/services/technical_debt_service.rb | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 app/services/technical_debt_service.rb diff --git a/app/services/technical_debt_service.rb b/app/services/technical_debt_service.rb deleted file mode 100644 index e69de29b..00000000 From c4f0ce692fed6a1f564bb65bee38f89e2cc4d301 Mon Sep 17 00:00:00 2001 From: drusepth Date: Thu, 10 Mar 2022 12:44:19 -0800 Subject: [PATCH 23/58] Add premium storage space to prepaid activations (#1099) --- app/jobs/pay_pal_prepay_processing_job.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/jobs/pay_pal_prepay_processing_job.rb b/app/jobs/pay_pal_prepay_processing_job.rb index 3ca107af..cf88cd75 100644 --- a/app/jobs/pay_pal_prepay_processing_job.rb +++ b/app/jobs/pay_pal_prepay_processing_job.rb @@ -27,6 +27,13 @@ class PayPalPrepayProcessingJob < ApplicationJob unless invoice.status == 'COMPLETED' invoice.update(status: 'COMPLETED') invoice.generate_promo_code! + + # Add the extra Premium space + SubscriptionService.add_any_referral_bonuses(invoice.user, 'premium') + + # Rather than queueing up a job to run N months from now to reset space, + # we'll probably go with a worker that ensures everyone's space is correct + # every day. Worker TBD. end else From 33495e55ac8db9c765273fc0198b1ab60c3d4e6e Mon Sep 17 00:00:00 2001 From: drusepth Date: Thu, 10 Mar 2022 12:51:57 -0800 Subject: [PATCH 24/58] queue a downgrade job several months in the future to reset prepay storage, needs testing --- app/jobs/pay_pal_prepay_processing_job.rb | 5 +---- app/jobs/premium_downgrade_job.rb | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 app/jobs/premium_downgrade_job.rb diff --git a/app/jobs/pay_pal_prepay_processing_job.rb b/app/jobs/pay_pal_prepay_processing_job.rb index cf88cd75..5b025b37 100644 --- a/app/jobs/pay_pal_prepay_processing_job.rb +++ b/app/jobs/pay_pal_prepay_processing_job.rb @@ -30,10 +30,7 @@ class PayPalPrepayProcessingJob < ApplicationJob # Add the extra Premium space SubscriptionService.add_any_referral_bonuses(invoice.user, 'premium') - - # Rather than queueing up a job to run N months from now to reset space, - # we'll probably go with a worker that ensures everyone's space is correct - # every day. Worker TBD. + PremiumDowngradeJob.set(wait: (invoice.months).months).perform_later(invoice.user_id) end else diff --git a/app/jobs/premium_downgrade_job.rb b/app/jobs/premium_downgrade_job.rb new file mode 100644 index 00000000..c4ad07e2 --- /dev/null +++ b/app/jobs/premium_downgrade_job.rb @@ -0,0 +1,15 @@ +class PremiumDowngradeJob < ApplicationJob + queue_as :low_priority + + def perform(*args) + user_id = args.shift + + user = User.find_by(id: user_id) + raise "No user to downgrade; id=#{user_id}" if user.nil? + + # Remove any bonus bandwidth granted by the plan + premium_bandwidth_bonus = BillingPlan.find(4).bonus_bandwidth_kb + user.update!(upload_bandwidth_kb: user.upload_bandwidth_kb - premium_bandwidth_bonus) + end + +end \ No newline at end of file From 9232720a525ff9220960e4fe64e2331728a23102 Mon Sep 17 00:00:00 2001 From: drusepth Date: Thu, 10 Mar 2022 14:39:07 -0800 Subject: [PATCH 25/58] end creature promo --- app/models/page_types/creature.rb | 2 +- config/initializers/promos.rb | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/app/models/page_types/creature.rb b/app/models/page_types/creature.rb index 19ad5da3..61925486 100644 --- a/app/models/page_types/creature.rb +++ b/app/models/page_types/creature.rb @@ -20,7 +20,7 @@ class Creature < ApplicationRecord include Serendipitous::Concern include Authority::Abilities - self.authorizer_name = 'CoreContentAuthorizer' + self.authorizer_name = 'ExtendedContentAuthorizer' # Locations relates :habitats, with: :wildlifeships diff --git a/config/initializers/promos.rb b/config/initializers/promos.rb index 560d1547..b1b5cb9b 100644 --- a/config/initializers/promos.rb +++ b/config/initializers/promos.rb @@ -14,12 +14,3 @@ if Date.current >= 'March 1, 2020'.to_date Rails.application.config.content_types[:premium] -= [Lore] end end - -# Lore free during the month of October -# Need to change Creature.rb authorizer at the end -if Date.current >= 'October 1, 2021'.to_date - if Date.current < 'November 1, 2021'.to_date - Rails.application.config.content_types[:free] << Creature - Rails.application.config.content_types[:premium] -= [Creature] - end -end From 0375e46a08791ff3877d266f96655537365bf172 Mon Sep 17 00:00:00 2001 From: drusepth Date: Thu, 10 Mar 2022 14:41:10 -0800 Subject: [PATCH 26/58] add data integrity task for upload bandwidths --- lib/tasks/data_integrity.rake | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/tasks/data_integrity.rake b/lib/tasks/data_integrity.rake index 0f738259..bc59c93f 100644 --- a/lib/tasks/data_integrity.rake +++ b/lib/tasks/data_integrity.rake @@ -111,5 +111,23 @@ namespace :data_integrity do end end + + desc "Ensure all users have the correct upload bandwidth amounts" + task correct_bandwidths: :environment do + base_bandwidth = User.new.upload_bandwidth_kb # 50_000 + premium_bonus = BillingPlan.find(4).bonus_bandwidth_kb # 9_950_000 + premium_total = base_bandwidth + premium_bonus # 10_000_000 + + User.find_each do |user| + max_bandwidth = BillingPlan::PREMIUM_IDS.include?(user.selected_billing_plan_id) ? premium_total : base_bandwidth + used_bandwidth = user.image_uploads.sum(:src_file_size) + + remaining_bandwidth = max_bandwidth - used_bandwidth + if user.upload_bandwidth_kb != remaining_bandwidth + puts "Correcting user #{user.id} bandwidth: #{user.upload_bandwidth_kb} --> #{remaining_bandwidth}" + # user.update(upload_bandwidth_kb: remaining_bandwidth) + end + end + end end From bdd0c4769593353c8907c6d4ea8dc2778b934175 Mon Sep 17 00:00:00 2001 From: drusepth Date: Thu, 10 Mar 2022 15:05:01 -0800 Subject: [PATCH 27/58] incorporate referral bonuses in integrity task --- lib/tasks/data_integrity.rake | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/tasks/data_integrity.rake b/lib/tasks/data_integrity.rake index bc59c93f..0ee75b4f 100644 --- a/lib/tasks/data_integrity.rake +++ b/lib/tasks/data_integrity.rake @@ -117,17 +117,26 @@ namespace :data_integrity do base_bandwidth = User.new.upload_bandwidth_kb # 50_000 premium_bonus = BillingPlan.find(4).bonus_bandwidth_kb # 9_950_000 premium_total = base_bandwidth + premium_bonus # 10_000_000 + referral_bonus = 100_000 # per referral + + puts "Disabling SQL logging" + old_logger = ActiveRecord::Base.logger + ActiveRecord::Base.logger = nil User.find_each do |user| max_bandwidth = BillingPlan::PREMIUM_IDS.include?(user.selected_billing_plan_id) ? premium_total : base_bandwidth + referral_bonus = user.referrals.count * referral_bonus used_bandwidth = user.image_uploads.sum(:src_file_size) - remaining_bandwidth = max_bandwidth - used_bandwidth + remaining_bandwidth = max_bandwidth + referral_bonus - used_bandwidth if user.upload_bandwidth_kb != remaining_bandwidth puts "Correcting user #{user.id} bandwidth: #{user.upload_bandwidth_kb} --> #{remaining_bandwidth}" # user.update(upload_bandwidth_kb: remaining_bandwidth) end end + + puts "Re-enabling SQL logging" + ActiveRecord::Base.logger = old_logger end end From 81ff2b6436c774d85096828b1318b43e66a1a5af Mon Sep 17 00:00:00 2001 From: drusepth Date: Thu, 10 Mar 2022 15:14:54 -0800 Subject: [PATCH 28/58] debugging --- lib/tasks/data_integrity.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/data_integrity.rake b/lib/tasks/data_integrity.rake index 0ee75b4f..22aba9ab 100644 --- a/lib/tasks/data_integrity.rake +++ b/lib/tasks/data_integrity.rake @@ -130,7 +130,7 @@ namespace :data_integrity do remaining_bandwidth = max_bandwidth + referral_bonus - used_bandwidth if user.upload_bandwidth_kb != remaining_bandwidth - puts "Correcting user #{user.id} bandwidth: #{user.upload_bandwidth_kb} --> #{remaining_bandwidth}" + puts "Correcting user #{user.id} bandwidth: #{user.upload_bandwidth_kb} --> #{remaining_bandwidth} (#{used_bandwidth} used)" # user.update(upload_bandwidth_kb: remaining_bandwidth) end end From a82f7f6c9766ec2d5a119217ed50e8ff2714b8fa Mon Sep 17 00:00:00 2001 From: drusepth Date: Thu, 10 Mar 2022 15:54:38 -0800 Subject: [PATCH 29/58] handle free-for-lifers --- lib/tasks/data_integrity.rake | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/tasks/data_integrity.rake b/lib/tasks/data_integrity.rake index 22aba9ab..448a8dda 100644 --- a/lib/tasks/data_integrity.rake +++ b/lib/tasks/data_integrity.rake @@ -124,7 +124,17 @@ namespace :data_integrity do ActiveRecord::Base.logger = nil User.find_each do |user| - max_bandwidth = BillingPlan::PREMIUM_IDS.include?(user.selected_billing_plan_id) ? premium_total : base_bandwidth + max_bandwidth = case user.selected_billing_plan_id + when 1 + base_bandwidth + when 2 # free-for-lifers + 250_000 + when 4, 5, 6 # premium + premium_total + else + raise "User with funky billing plan id: U=#{user.id} BP=#{user.selected_billing_plan_id}" + end + referral_bonus = user.referrals.count * referral_bonus used_bandwidth = user.image_uploads.sum(:src_file_size) From d694381be3e2594e9b39c9db4fdb5cfd3e1d5f03 Mon Sep 17 00:00:00 2001 From: drusepth Date: Thu, 10 Mar 2022 16:42:52 -0800 Subject: [PATCH 30/58] no bp = starter --- lib/tasks/data_integrity.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/data_integrity.rake b/lib/tasks/data_integrity.rake index 448a8dda..fc555478 100644 --- a/lib/tasks/data_integrity.rake +++ b/lib/tasks/data_integrity.rake @@ -125,7 +125,7 @@ namespace :data_integrity do User.find_each do |user| max_bandwidth = case user.selected_billing_plan_id - when 1 + when nil, 1 base_bandwidth when 2 # free-for-lifers 250_000 From 9c0ca611f8609e733558b887a882febade988249 Mon Sep 17 00:00:00 2001 From: drusepth Date: Sun, 20 Mar 2022 16:07:49 -0700 Subject: [PATCH 31/58] add a default Description field on all new language templates --- config/attributes/language.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/attributes/language.yml b/config/attributes/language.yml index 0db82303..f4b9d605 100644 --- a/config/attributes/language.yml +++ b/config/attributes/language.yml @@ -7,6 +7,8 @@ :field_type: name - :name: other_names :label: Other names + - :name: description + :label: Description - :name: universe_id :label: Universe :field_type: universe From 89cb8ce9192b02fd42885d14d84af9585c63d669 Mon Sep 17 00:00:00 2001 From: drusepth Date: Sun, 20 Mar 2022 16:45:01 -0700 Subject: [PATCH 32/58] use description field as language byline --- app/models/page_types/language.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/page_types/language.rb b/app/models/page_types/language.rb index c2e94f6e..0ff155b0 100644 --- a/app/models/page_types/language.rb +++ b/app/models/page_types/language.rb @@ -16,8 +16,7 @@ class Language < ApplicationRecord self.authorizer_name = 'ExtendedContentAuthorizer' def description - num_speakers = Lingualism.where(spoken_language_id: id).count - "Language spoken by #{ActionController::Base.helpers.pluralize num_speakers, 'character'}" + overview_field_value('Description') end def self.color From 505d85dd77045eebb66c7cd3f336b6cec43b10d9 Mon Sep 17 00:00:00 2001 From: drusepth Date: Sun, 20 Mar 2022 16:58:03 -0700 Subject: [PATCH 33/58] unguard integrity rake task --- lib/tasks/data_integrity.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/data_integrity.rake b/lib/tasks/data_integrity.rake index fc555478..77a6bd2e 100644 --- a/lib/tasks/data_integrity.rake +++ b/lib/tasks/data_integrity.rake @@ -141,7 +141,7 @@ namespace :data_integrity do remaining_bandwidth = max_bandwidth + referral_bonus - used_bandwidth if user.upload_bandwidth_kb != remaining_bandwidth puts "Correcting user #{user.id} bandwidth: #{user.upload_bandwidth_kb} --> #{remaining_bandwidth} (#{used_bandwidth} used)" - # user.update(upload_bandwidth_kb: remaining_bandwidth) + user.update(upload_bandwidth_kb: remaining_bandwidth) end end From 8a461ee65af21ce778e5fb5e3ab6d2b71eca9e9a Mon Sep 17 00:00:00 2001 From: drusepth Date: Sun, 20 Mar 2022 19:47:38 -0700 Subject: [PATCH 34/58] rain replacement --- app/services/forum_replacement_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/forum_replacement_service.rb b/app/services/forum_replacement_service.rb index 7d0576f9..139941d6 100644 --- a/app/services/forum_replacement_service.rb +++ b/app/services/forum_replacement_service.rb @@ -243,7 +243,7 @@ class ForumReplacementService < Service 'prison' => 'hoosegow locker', 'raccoon' => 'trash burgler', 'radio' => 'magic musicbox', - 'rain' => 'cloudy waterdrops', + 'rain' => 'cloudy juice', 'recursion' => 'recursion', 'replaced' => 'improved', 'reverse' => 'esrever', From 292f136aa34c136549ff31c8a9df2975e2bb7fdf Mon Sep 17 00:00:00 2001 From: drusepth Date: Mon, 21 Mar 2022 00:10:26 -0700 Subject: [PATCH 35/58] remove old test --- test/controllers/page_tags_controller_test.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/controllers/page_tags_controller_test.rb b/test/controllers/page_tags_controller_test.rb index 2f89a08a..a3f2da9f 100644 --- a/test/controllers/page_tags_controller_test.rb +++ b/test/controllers/page_tags_controller_test.rb @@ -1,9 +1,5 @@ require 'test_helper' class PageTagsControllerTest < ActionDispatch::IntegrationTest - test "should get remove" do - get page_tags_remove_url - assert_response :success - end end From e5be71d5fbb257ecbc5d379fb3ae6a0d480df900 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Mar 2022 07:49:24 +0000 Subject: [PATCH 36/58] Bump stripe_event from 2.3.1 to 2.3.2 Bumps [stripe_event](https://github.com/integrallis/stripe_event) from 2.3.1 to 2.3.2. - [Release notes](https://github.com/integrallis/stripe_event/releases) - [Changelog](https://github.com/integrallis/stripe_event/blob/master/CHANGELOG.md) - [Commits](https://github.com/integrallis/stripe_event/compare/v2.3.1...v2.3.2) --- updated-dependencies: - dependency-name: stripe_event dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index ab767a41..b9a0aa43 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1606,7 +1606,7 @@ GEM stackprof (0.2.19) statsd-ruby (1.5.0) stripe (5.45.0) - stripe_event (2.3.1) + stripe_event (2.3.2) activesupport (>= 3.1) stripe (>= 2.8, < 6) temple (0.8.2) From 51049e9a6c3ba9d9eb311a731f07d750f73dd802 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Mar 2022 07:51:51 +0000 Subject: [PATCH 37/58] Bump pg from 1.2.3 to 1.3.4 Bumps [pg](https://github.com/ged/ruby-pg) from 1.2.3 to 1.3.4. - [Release notes](https://github.com/ged/ruby-pg/releases) - [Changelog](https://github.com/ged/ruby-pg/blob/master/History.rdoc) - [Commits](https://github.com/ged/ruby-pg/compare/v1.2.3...v1.3.4) --- updated-dependencies: - dependency-name: pg dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 8e22e764..4b0c689e 100644 --- a/Gemfile +++ b/Gemfile @@ -107,7 +107,7 @@ group :production do end group :test, :production do - gem 'pg', '~> 1.2' + gem 'pg', '~> 1.3' gem "mini_racer", "~> 0.6.2" end diff --git a/Gemfile.lock b/Gemfile.lock index 7e27e182..12fa3cc1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1470,7 +1470,7 @@ GEM faraday (~> 0.15) faraday_middleware (~> 0.12) paypalhttp (1.0.1) - pg (1.2.3) + pg (1.3.4) pry (0.14.1) coderay (~> 1.1) method_source (~> 1.0) @@ -1694,7 +1694,7 @@ DEPENDENCIES paranoia paypal-checkout-sdk paypal_client - pg (~> 1.2) + pg (~> 1.3) pry puma (~> 5.6) puma-heroku From 9e4fdf3426f82ea974dabe655a273cefc3dfe9ca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Mar 2022 07:51:54 +0000 Subject: [PATCH 38/58] Bump active_storage_validations from 0.9.6 to 0.9.7 Bumps [active_storage_validations](https://github.com/igorkasyanchuk/active_storage_validations) from 0.9.6 to 0.9.7. - [Release notes](https://github.com/igorkasyanchuk/active_storage_validations/releases) - [Changelog](https://github.com/igorkasyanchuk/active_storage_validations/blob/master/CHANGES.md) - [Commits](https://github.com/igorkasyanchuk/active_storage_validations/commits) --- updated-dependencies: - dependency-name: active_storage_validations dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 7e27e182..aad765ff 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -81,7 +81,7 @@ GEM rails-html-sanitizer (~> 1.1, >= 1.2.0) active_record_union (1.3.0) activerecord (>= 4.0) - active_storage_validations (0.9.6) + active_storage_validations (0.9.7) activejob (>= 5.2.0) activemodel (>= 5.2.0) activestorage (>= 5.2.0) @@ -1407,7 +1407,7 @@ GEM listen (3.7.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.14.0) + loofah (2.15.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) From 472610b4d98377c2d4f06cb98d0d11b60ae6b489 Mon Sep 17 00:00:00 2001 From: drusepth Date: Mon, 28 Mar 2022 11:30:44 -0700 Subject: [PATCH 39/58] clean up page references after deleting pages or fields --- app/models/concerns/has_page_references.rb | 8 +++++--- app/models/page_data/attribute_field.rb | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/models/concerns/has_page_references.rb b/app/models/concerns/has_page_references.rb index 8be704e4..cfc70595 100644 --- a/app/models/concerns/has_page_references.rb +++ b/app/models/concerns/has_page_references.rb @@ -6,8 +6,9 @@ module HasPageReferences included do # Pages that reference this one has_many :incoming_page_references, - as: :referenced_page, - class_name: PageReference.name + as: :referenced_page, + class_name: PageReference.name, + dependent: :destroy Rails.application.config.content_type_names[:all].each do |page_type| has_many "referencing_#{page_type.downcase}_pages".to_sym, through: :incoming_page_references, @@ -26,7 +27,8 @@ module HasPageReferences # Pages referenced by this one has_many :outgoing_page_references, as: :referencing_page, - class_name: PageReference.name + class_name: PageReference.name, + dependent: :destroy Rails.application.config.content_type_names[:all].each do |page_type| has_many "referenced_#{page_type.downcase}_pages".to_sym, through: :outgoing_page_references, diff --git a/app/models/page_data/attribute_field.rb b/app/models/page_data/attribute_field.rb index 5b4c34dc..4724503a 100644 --- a/app/models/page_data/attribute_field.rb +++ b/app/models/page_data/attribute_field.rb @@ -7,6 +7,8 @@ class AttributeField < ApplicationRecord belongs_to :attribute_category has_many :attribute_values, class_name: 'Attribute', dependent: :destroy + has_many :page_references, dependent: :destroy + validates_presence_of :user_id acts_as_list scope: [:user_id, :attribute_category_id] From 3875f3dc419b7b546149130a36f2f46631413e63 Mon Sep 17 00:00:00 2001 From: drusepth Date: Mon, 28 Mar 2022 11:44:11 -0700 Subject: [PATCH 40/58] rake task to murder orphan children --- lib/tasks/data_integrity.rake | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/tasks/data_integrity.rake b/lib/tasks/data_integrity.rake index 77a6bd2e..e88221c9 100644 --- a/lib/tasks/data_integrity.rake +++ b/lib/tasks/data_integrity.rake @@ -112,6 +112,23 @@ namespace :data_integrity do end + desc "Remove orphan page references" + task remove_orphan_page_references: :environment do + PageReference.find_each do |reference| + if reference.referencing_page.nil? + puts "Deleting reference #{reference.id}" + reference.destroy + next + end + + if reference.referenced_page.nil? + puts "Deleting reference #{reference.id}" + reference.destroy + next + end + end + end + desc "Ensure all users have the correct upload bandwidth amounts" task correct_bandwidths: :environment do base_bandwidth = User.new.upload_bandwidth_kb # 50_000 From f260e5604185d61b9c46020505072ff5660481c8 Mon Sep 17 00:00:00 2001 From: drusepth Date: Mon, 28 Mar 2022 15:44:59 -0700 Subject: [PATCH 41/58] optimize outline export --- app/controllers/export_controller.rb | 7 +- app/services/export_service.rb | 147 +++++++++++++++++++++++++++ config/sidekiq.yml | 1 + 3 files changed, 154 insertions(+), 1 deletion(-) create mode 100644 app/services/export_service.rb diff --git a/app/controllers/export_controller.rb b/app/controllers/export_controller.rb index b9a20063..1e284c17 100644 --- a/app/controllers/export_controller.rb +++ b/app/controllers/export_controller.rb @@ -2,6 +2,9 @@ class ExportController < ApplicationController before_action :authenticate_user! before_action :whitelist_pluralized_model, only: [:csv] + skip_before_action :cache_most_used_page_information, only: [:outline] + skip_before_action :cache_forums_unread_counts, only: [:outline] + def index @sidenav_expansion = 'my account' end @@ -11,7 +14,9 @@ class ExportController < ApplicationController end def outline - send_data content_to_outline, filename: "notebook-#{Date.today}.txt" + # old_outline_export = content_to_outline + new_outline_export = ExportService.text_outline_export(current_user.universes.pluck(:id)) + send_data new_outline_export, filename: "notebook-#{Date.today}.txt" end def notebook_json diff --git a/app/services/export_service.rb b/app/services/export_service.rb new file mode 100644 index 00000000..5226926a --- /dev/null +++ b/app/services/export_service.rb @@ -0,0 +1,147 @@ +class ExportService < Service + def self.text_outline_export(universe_ids) + page_types = Rails.application.config.content_types[:all] + temporary_user_id_reference = Universe.find_by(id: universe_ids).user_id + + export_text = StringIO.new + + categories = fetch_categories(user_id: temporary_user_id_reference) + fields = fetch_fields(category_ids: categories.map(&:id)) + values = fetch_values(field_ids: fields.map(&:id)) + + page_types.each do |page_type| + # Get all pages in the given universe(s) + pages = (page_type.name == 'Universe') ? page_type.where(id: universe_ids) + : page_type.where(universe_id: universe_ids) + if pages.any? + export_text << "# #{page_type.name.pluralize}\n" + + categories_for_this_page_type = categories.select { |c| c.entity_type == page_type.name.downcase } + fields_for_this_page_type = fields.select { |f| categories_for_this_page_type.map(&:id).include? f.attribute_category_id } + + pages.each do |page| + export_text << "* Name: #{page.name}\n" + export_text << " ID: #{page.id}\n" + + values_for_this_page = values.select { |v| v.entity_type == page_type.name && v.entity_id == page.id } + + categories_for_this_page_type.each do |category| + export_text << " #{category.label}\n" + + fields_for_this_category = fields_for_this_page_type.select { |f| f.attribute_category_id == category.id } + values_for_these_fields = values_for_this_page.select { |v| fields_for_this_category.map(&:id).include? v.attribute_field_id } + + fields_for_this_category.each do |field| + value_for_this_field = values_for_these_fields.detect do |value| + value.attribute_field_id == field.id && + value.entity_type == page_type.name && + value.entity_id == page.id + end + + case field.field_type + when 'text_area', 'textarea' + # For answers to text fields, we can just output their value directly + export_text << " #{field.label}: #{value_for_this_field.try :value}\n" + + when 'link' + # For link fields, we have link codes ([[Character-1]]) and need to translate + # them into the linked page's name in order for them to actually be useful + if value_for_this_field.present? + json_list = JSON.parse(value_for_this_field.value) + formatted_names = json_list.map do |link_code| + query_link_code_with_cache(*link_code.split('-')).name + end + + export_text << " #{field.label}: #{formatted_names.to_sentence}\n" + else + export_text << " #{field.label}:\n" + end + end + + end + end + + export_text << "\n" # spacer between pages + end + + export_text << "\n" # spacer between sections + end + end + + return export_text.string + end + + def self.text_markdown_export(universe_ids) + + end + + def self.csv_export(universe_ids, separator=',') + + end + + def self.json_export(universe_ids) + + end + + def self.xml_export(universe_ids) + + end + + def self.yaml_export(universe_ids) + + end + + def self.html_export(universe_ids) + + end + + def self.scrivener_export(universe_ids) + + end + + private + + def self.fetch_categories(user_id:) + AttributeCategory.where(user_id: user_id) + .order('position ASC') + .select(:id, :label, :entity_type) + end + + def self.fetch_fields(category_ids:) + AttributeField.where(attribute_category_id: category_ids) + .order('position ASC') + .select(:id, :label, :attribute_category_id, :field_type) + end + + def self.fetch_values(field_ids:) + Attribute.where(attribute_field_id: field_ids) + .select(:attribute_field_id, :value, :entity_type, :entity_id) + end + + def self.fetch_universes(universe_ids) + + end + + def self.query_link_code_with_cache(content_type_name, content_id) + cache_key = "#{content_type_name}-#{content_id}" + + # Pull from the cache to avoid a query if we can + @content_cache ||= {} + if @content_cache.key?(cache_key) + return @content_cache[cache_key] + end + + # TODO: we should probably whitelist content_type from valid page types here + + # If there's no cache, we unfortunately need to do a query to resolve the link code + content = class_from_name(content_type_name).find(content_id) + @content_cache[cache_key] = content + + return content + end + + def self.class_from_name(content_type_name) + # This is ~3x faster than .constantize + Rails.application.config.content_types_by_name[content_type_name] + end +end \ No newline at end of file diff --git a/config/sidekiq.yml b/config/sidekiq.yml index 536aebc4..7b5f8a6e 100644 --- a/config/sidekiq.yml +++ b/config/sidekiq.yml @@ -6,4 +6,5 @@ - default - cache - notifications + - export - low_priority From 6963ef1570ad4d8b6823aa55a4693dcfb3407b93 Mon Sep 17 00:00:00 2001 From: drusepth Date: Mon, 28 Mar 2022 15:45:39 -0700 Subject: [PATCH 42/58] placeholder for export job --- app/jobs/export_job.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 app/jobs/export_job.rb diff --git a/app/jobs/export_job.rb b/app/jobs/export_job.rb new file mode 100644 index 00000000..0333ae1c --- /dev/null +++ b/app/jobs/export_job.rb @@ -0,0 +1,14 @@ +class ExportJob < ApplicationJob + queue_as :export + + def perform(*args) + universe_ids = args.shift + format = args.shift + + # design: left side 1/2 - list universes with toggle/checkboxes to include + # right side 1/2 - radios for format, checkboxes for options after + # (include hidden? include IDs? include blank fields?) + + + end +end From 16fba3735234465d317d224aebe9d8c92f471ad7 Mon Sep 17 00:00:00 2001 From: drusepth Date: Mon, 28 Mar 2022 16:42:33 -0700 Subject: [PATCH 43/58] add markdown export route --- app/controllers/export_controller.rb | 10 ++- app/services/export_service.rb | 95 +++++++++++++++++++++++++++- config/routes.rb | 1 + 3 files changed, 101 insertions(+), 5 deletions(-) diff --git a/app/controllers/export_controller.rb b/app/controllers/export_controller.rb index 1e284c17..b6028c94 100644 --- a/app/controllers/export_controller.rb +++ b/app/controllers/export_controller.rb @@ -14,9 +14,13 @@ class ExportController < ApplicationController end def outline - # old_outline_export = content_to_outline - new_outline_export = ExportService.text_outline_export(current_user.universes.pluck(:id)) - send_data new_outline_export, filename: "notebook-#{Date.today}.txt" + export = ExportService.text_outline_export(current_user.universes.pluck(:id)) + send_data export, filename: "notebook-#{Date.today}.txt" + end + + def markdown + export = ExportService.text_markdown_export(current_user.universes.pluck(:id)) + send_data export, filename: "notebook-#{Date.today}.md" end def notebook_json diff --git a/app/services/export_service.rb b/app/services/export_service.rb index 5226926a..1c15fde4 100644 --- a/app/services/export_service.rb +++ b/app/services/export_service.rb @@ -1,4 +1,6 @@ class ExportService < Service + INCLUDE_EMPTY_FIELD_LABELS = false + def self.text_outline_export(universe_ids) page_types = Rails.application.config.content_types[:all] temporary_user_id_reference = Universe.find_by(id: universe_ids).user_id @@ -41,7 +43,9 @@ class ExportService < Service case field.field_type when 'text_area', 'textarea' # For answers to text fields, we can just output their value directly - export_text << " #{field.label}: #{value_for_this_field.try :value}\n" + if value_for_this_field.present? || INCLUDE_EMPTY_FIELD_LABELS + export_text << " #{field.label}: #{value_for_this_field.try :value}\n" + end when 'link' # For link fields, we have link codes ([[Character-1]]) and need to translate @@ -68,11 +72,98 @@ class ExportService < Service end end + export_text << "\n\nGenerated from Notebook.ai in #{(DateTime.current - @start_time).to_f}sec" + return export_text.string end def self.text_markdown_export(universe_ids) + page_types = Rails.application.config.content_types[:all] + temporary_user_id_reference = Universe.find_by(id: universe_ids).user_id + export_text = StringIO.new + + categories = fetch_categories(user_id: temporary_user_id_reference) + fields = fetch_fields(category_ids: categories.map(&:id)) + values = fetch_values(field_ids: fields.map(&:id)) + + page_types.each do |page_type| + # Get all pages in the given universe(s) + pages = (page_type.name == 'Universe') ? page_type.where(id: universe_ids) + : page_type.where(universe_id: universe_ids) + if pages.any? + export_text << "# #{page_type.name.pluralize}\n" + + categories_for_this_page_type = categories.select { |c| c.entity_type == page_type.name.downcase } + fields_for_this_page_type = fields.select { |f| categories_for_this_page_type.map(&:id).include? f.attribute_category_id } + + pages.each do |page| + export_text << "## #{page.name}\n" + export_text << "ID: #{page.id}\n" + + values_for_this_page = values.select { |v| v.entity_type == page_type.name && v.entity_id == page.id } + + categories_for_this_page_type.each do |category| + # Delay printing our category header until we've found a value to print, so we don't print + # empty headers and blank sections. + printed_category_header = false + + fields_for_this_category = fields_for_this_page_type.select { |f| f.attribute_category_id == category.id } + values_for_these_fields = values_for_this_page.select { |v| fields_for_this_category.map(&:id).include? v.attribute_field_id } + + fields_for_this_category.each do |field| + value_for_this_field = values_for_these_fields.detect do |value| + value.attribute_field_id == field.id && + value.entity_type == page_type.name && + value.entity_id == page.id + end + + # If we have a field to print but haven't printed the header yet, print it + if value_for_this_field.try(:value).try(:present?) && !printed_category_header + export_text << "### #{category.label}\n" + printed_category_header = true + end + + case field.field_type + when 'text_area', 'textarea' + # For answers to text fields, we can just output their value directly + if value_for_this_field.try(:value).present? || INCLUDE_EMPTY_FIELD_LABELS + export_text << "#### #{field.label}\n#{value_for_this_field.try :value}\n" + end + + when 'link' + # For link fields, we have link codes ([[Character-1]]) and need to translate + # them into the linked page's name in order for them to actually be useful + if value_for_this_field.present? + json_list = JSON.parse(value_for_this_field.value) + formatted_names = json_list.map do |link_code| + link_type, link_id = link_code.split('-') + page_ref = query_link_code_with_cache(link_type, link_id) + + "[#{page_ref.name}](https://www.notebook.ai/plan/#{link_type.downcase.pluralize}/#{link_id})" + end + + export_text << "#### #{field.label}\n#{formatted_names.to_sentence}\n" + else + if INCLUDE_EMPTY_FIELD_LABELS + export_text << "#### #{field.label}\n" + end + end + end + + end + end + + export_text << "\n" # spacer between pages + end + + export_text << "\n" # spacer between sections + end + end + + export_text << "\n\nGenerated from Notebook.ai in #{(DateTime.current - @start_time).to_f}sec" + + return export_text.string end def self.csv_export(universe_ids, separator=',') @@ -141,7 +232,7 @@ class ExportService < Service end def self.class_from_name(content_type_name) - # This is ~3x faster than .constantize + # This lookup is ~3x faster than .constantize Rails.application.config.content_types_by_name[content_type_name] end end \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index e2ddef15..c91b7428 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -155,6 +155,7 @@ Rails.application.routes.draw do get '/', to: 'export#index', as: :notebook_export get '/outline', to: 'export#outline', as: :notebook_outline + get '/markdown', to: 'export#markdown', as: :notebook_markdown get '/notebook.json', to: 'export#notebook_json', as: :notebook_json get '/notebook.xml', to: 'export#notebook_xml', as: :notebook_xml get '/notebook.yml', to: 'export#notebook_yml', as: :notebook_yml From 70743a7c2f61679960a516d20e596d7ae3270b3c Mon Sep 17 00:00:00 2001 From: drusepth Date: Mon, 28 Mar 2022 16:52:39 -0700 Subject: [PATCH 44/58] fix headers in outline --- app/controllers/documents_controller.rb | 2 -- app/services/export_service.rb | 20 +++++++++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/app/controllers/documents_controller.rb b/app/controllers/documents_controller.rb index f484adfa..a4f7b4cc 100644 --- a/app/controllers/documents_controller.rb +++ b/app/controllers/documents_controller.rb @@ -4,8 +4,6 @@ class DocumentsController < ApplicationController # todo Uh, this is a hack. The CSRF token on document editor model to add entities is being rejected... for whatever reason. skip_before_action :verify_authenticity_token, only: [:link_entity] - skip_before_action :cache_most_used_page_information, only: [:update] - before_action :set_document, only: [:show, :analysis, :plaintext, :queue_analysis, :edit, :destroy] before_action :set_sidenav_expansion, except: [:plaintext] before_action :set_navbar_color, except: [:plaintext] diff --git a/app/services/export_service.rb b/app/services/export_service.rb index 1c15fde4..ddb01b86 100644 --- a/app/services/export_service.rb +++ b/app/services/export_service.rb @@ -28,7 +28,9 @@ class ExportService < Service values_for_this_page = values.select { |v| v.entity_type == page_type.name && v.entity_id == page.id } categories_for_this_page_type.each do |category| - export_text << " #{category.label}\n" + # Delay printing our category header until we've found a value to print, so we don't print + # empty headers and blank sections. + printed_category_header = false fields_for_this_category = fields_for_this_page_type.select { |f| f.attribute_category_id == category.id } values_for_these_fields = values_for_this_page.select { |v| fields_for_this_category.map(&:id).include? v.attribute_field_id } @@ -40,6 +42,12 @@ class ExportService < Service value.entity_id == page.id end + # If we have a field to print but haven't printed the header yet, print it + if value_for_this_field.try(:value).try(:present?) && !printed_category_header + export_text << " #{category.label}\n" + printed_category_header = true + end + case field.field_type when 'text_area', 'textarea' # For answers to text fields, we can just output their value directly @@ -58,7 +66,9 @@ class ExportService < Service export_text << " #{field.label}: #{formatted_names.to_sentence}\n" else - export_text << " #{field.label}:\n" + if INCLUDE_EMPTY_FIELD_LABELS + export_text << " #{field.label}:\n" + end end end @@ -72,8 +82,6 @@ class ExportService < Service end end - export_text << "\n\nGenerated from Notebook.ai in #{(DateTime.current - @start_time).to_f}sec" - return export_text.string end @@ -161,13 +169,11 @@ class ExportService < Service end end - export_text << "\n\nGenerated from Notebook.ai in #{(DateTime.current - @start_time).to_f}sec" - return export_text.string end def self.csv_export(universe_ids, separator=',') - + # todo: figure out zip end def self.json_export(universe_ids) From 75ae91856c2e00a9c46c514614e8066975210386 Mon Sep 17 00:00:00 2001 From: drusepth Date: Tue, 29 Mar 2022 00:14:31 -0700 Subject: [PATCH 45/58] rewrite json export --- app/controllers/export_controller.rb | 6 +-- app/services/export_service.rb | 79 ++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+), 3 deletions(-) diff --git a/app/controllers/export_controller.rb b/app/controllers/export_controller.rb index b6028c94..ac3c2f5f 100644 --- a/app/controllers/export_controller.rb +++ b/app/controllers/export_controller.rb @@ -2,8 +2,8 @@ class ExportController < ApplicationController before_action :authenticate_user! before_action :whitelist_pluralized_model, only: [:csv] - skip_before_action :cache_most_used_page_information, only: [:outline] - skip_before_action :cache_forums_unread_counts, only: [:outline] + skip_before_action :cache_most_used_page_information, only: [:outline, :notebook_json] + skip_before_action :cache_forums_unread_counts, only: [:outline, :notebook_json] def index @sidenav_expansion = 'my account' @@ -24,7 +24,7 @@ class ExportController < ApplicationController end def notebook_json - json_dump = current_user.content.except('Document').except('Timeline').map { |category, content| {"#{category}": fill_relations(category.constantize, content)} }.to_json + json_dump = ExportService.json_export(current_user.universes.pluck(:id)) send_data json_dump, filename: "notebook-#{Date.today}.json" end diff --git a/app/services/export_service.rb b/app/services/export_service.rb index ddb01b86..f9b16ebd 100644 --- a/app/services/export_service.rb +++ b/app/services/export_service.rb @@ -177,7 +177,86 @@ class ExportService < Service end def self.json_export(universe_ids) + page_types = Rails.application.config.content_types[:all] + temporary_user_id_reference = Universe.find_by(id: universe_ids).user_id + export_object = {} + + categories = fetch_categories(user_id: temporary_user_id_reference) + fields = fetch_fields(category_ids: categories.map(&:id)) + values = fetch_values(field_ids: fields.map(&:id)) + + page_types.each do |page_type| + # Get all pages in the given universe(s) + pages = (page_type.name == 'Universe') ? page_type.where(id: universe_ids) + : page_type.where(universe_id: universe_ids) + if pages.any? + export_object[page_type.name] = [] + + categories_for_this_page_type = categories.select { |c| c.entity_type == page_type.name.downcase } + fields_for_this_page_type = fields.select { |f| categories_for_this_page_type.map(&:id).include? f.attribute_category_id } + + page_object = {} + + pages.each do |page| + page_object['name'] = page.name + page_object['id'] = page.id + + values_for_this_page = values.select { |v| v.entity_type == page_type.name && v.entity_id == page.id } + + categories_for_this_page_type.each do |category| + page_object[category.label] ||= {} + + fields_for_this_category = fields_for_this_page_type.select { |f| f.attribute_category_id == category.id } + values_for_these_fields = values_for_this_page.select { |v| fields_for_this_category.map(&:id).include? v.attribute_field_id } + + fields_for_this_category.each do |field| + value_for_this_field = values_for_these_fields.detect do |value| + value.attribute_field_id == field.id && + value.entity_type == page_type.name && + value.entity_id == page.id + end + + case field.field_type + when 'text_area', 'textarea' + # For answers to text fields, we can just output their value directly + if value_for_this_field.try(:value).present? || INCLUDE_EMPTY_FIELD_LABELS + page_object[category.label][field.label] = value_for_this_field.try :value + end + + when 'link' + # For link fields, we have link codes ([[Character-1]]) and need to translate + # them into the linked page's name in order for them to actually be useful + if value_for_this_field.present? + json_list = JSON.parse(value_for_this_field.value) + formatted_name_objects = json_list.map do |link_code| + link_type, link_id = link_code.split('-') + page_ref = query_link_code_with_cache(link_type, link_id) + + name_object = { + name: page_ref.name, + id: page_ref.id, + } + end + + page_object[category.label][field.label] = formatted_name_objects + else + if INCLUDE_EMPTY_FIELD_LABELS + page_object[category.label][field.label] = nil + end + end + end + + end + end + end + + # Append the JSON page object we just built to the list of pages of that kind + export_object[page_type.name].push page_object + end + end + + return export_object.to_json end def self.xml_export(universe_ids) From 34de351866385b1cb021dc3f873a622c134a2a61 Mon Sep 17 00:00:00 2001 From: drusepth Date: Tue, 29 Mar 2022 14:19:21 -0700 Subject: [PATCH 46/58] april fools announcement --- app/views/layouts/forum.html.erb | 58 ++++++++++++++++++++++++- app/views/thredded/posts/_post.html.erb | 8 +++- 2 files changed, 64 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/forum.html.erb b/app/views/layouts/forum.html.erb index 2901e560..34202927 100644 --- a/app/views/layouts/forum.html.erb +++ b/app/views/layouts/forum.html.erb @@ -35,9 +35,65 @@ <%= render 'layouts/ganalytics' %> - + + + + + <%= react_component("Footer") unless defined?(@show_footer) && !@show_footer %> <%= render 'layouts/quick_add_fab' unless defined?(@show_footer) && !@show_footer %> <%= render partial: 'content/keyboard_controls_help_modal' %> diff --git a/app/views/thredded/posts/_post.html.erb b/app/views/thredded/posts/_post.html.erb index fda41c46..88a2be44 100644 --- a/app/views/thredded/posts/_post.html.erb +++ b/app/views/thredded/posts/_post.html.erb @@ -19,7 +19,13 @@ <%= content_tag :article, id: dom_id(post), class: "thredded--post thredded--#{post.read_state}--post #{muted_post ? muted_post_classes : 'card'}" do %> <%= render 'thredded/posts_common/actions', post: post, actions: local_assigns[:actions] %> <%= render 'thredded/posts_common/header', post: post %> - <%= ForumReplacementService.replace(content) || render('thredded/posts/content', post: post) %> + <%= + if user_signed_in && current_user.enabled_april_fools != false + ForumReplacementService.replace(content) || render('thredded/posts/content', post: post) + else + render('thredded/posts/content', post: post) + end + %> <% if post.pending_moderation? && !Thredded.content_visible_while_pending_moderation %>

<%= t 'thredded.posts.pending_moderation_notice' %>

<% elsif post.blocked? && post.can_moderate? %> From 60a7ca341e8e6efcc211173e1f17206852451154 Mon Sep 17 00:00:00 2001 From: drusepth Date: Fri, 1 Apr 2022 00:07:30 -0700 Subject: [PATCH 47/58] adjusts --- app/services/forum_replacement_service.rb | 144 +++++++++++++++------- app/views/layouts/forum.html.erb | 4 +- app/views/thredded/posts/_post.html.erb | 8 +- 3 files changed, 102 insertions(+), 54 deletions(-) diff --git a/app/services/forum_replacement_service.rb b/app/services/forum_replacement_service.rb index 139941d6..28514afc 100644 --- a/app/services/forum_replacement_service.rb +++ b/app/services/forum_replacement_service.rb @@ -2,8 +2,37 @@ class ForumReplacementService < Service # Cool replacements we could eventually do not for pranking # [roll N] = random number between 1 and N # [roll N, M] = random number between N and M + # [@reader] = username of the reader - WORD_REPLACEMENTS = { + # NOTE: could do this shader style on word replacements if we want a ui :) [ReplacementList(color, replacements, &active?)] + + # blackout replacements + FORBIDDEN_WORD_REPLACEMENTS = { + + } + + # spam replacements + SPAM_WORD_REPLACEMENTS = { + 'cash app' => 'pls ban me andrew' + } + + # perspective changes, always surrounded by {} (e.g. {@reader} ) + PERSPECTIVE_REPLACEMENTS = { + '@reader' => Proc.new { |trigger, user| (user.nil? ? 'anonymous reader' : user.try(:display_name)) || 'anonymous reader' } + } + + # turn on and off at will + CASUAL_CHAOS_WORD_REPLACEMENTS = { + 'andrew' => 'andrew (Our Supreme Lord and Overseer)', + 'amy' => 'amy (the most wonderful woman in the world)', + } + + REFERENCE_REPLACEMENTS = { + # [[Character-4]] + } + + # gremlin replacements + GREMLINS_WORD_REPLACEMENTS = { '<3' => "&heart;", '$5' => '[̲̅$̲̅(̲̅5̲̅)̲̅$̲̅]', '0/10' => '10/10', @@ -22,9 +51,7 @@ class ForumReplacementService < Service 'alchohol' => 'giggle juice', 'alien' => 'extraterrestrial bopper', 'aliens' => 'extraterrestrial boppers', - 'amy' => 'the most wonderful woman in the world', 'an hour' => 'exactly 3600 seconds', - 'andrew' => 'andrew (Our Supreme Lord and Overseer)', 'announcement' => 'shouty spouty', 'announcements' => 'shouty spouties', "April Fool's Day" => 'the best holiday of the year', @@ -42,7 +69,6 @@ class ForumReplacementService < Service 'aware' => 'cognizant', 'awesome' => "bee's knees", 'B&B' => 'Bungeons & Bragons', - 'bad' => 'bodge', 'ball' => 'blimpy bounce bounce', 'balls' => 'blimpy bounce bounces', 'balloon' => 'elastic breath trap', @@ -179,8 +205,6 @@ class ForumReplacementService < Service 'keyboards' => 'hoighty toighty tippy typers', 'kidnap' => 'surprise adoption', 'kitchen' => 'fridge-and-oven combination room', - 'knee' => 'leg hinge', - 'knees' => 'leg hinges', 'knife' => 'stabby stick', 'knives' => 'stabby sticks', 'la croix' => 'water that has been in the vicinity of a fruit at one point in the past few years', @@ -188,7 +212,6 @@ class ForumReplacementService < Service 'laptop' => 'electrotablet with keys', 'lechuga' => 'lettuce', 'lettuce' => 'lechuga', - 'life' => 'like a box of chocolates', 'lightbulb' => 'ceiling-bright', 'lightbulbs' => 'ceiling-brights', 'lizard people' => 'definitely normal human beings', @@ -340,53 +363,84 @@ class ForumReplacementService < Service 'writers' => 'scribble scrabblers', 'yuge' => 'yuge', 'zalgo' => 'H̶̛̼̼̪̝̞͓̞͕͇̯͚͎͚̘̳͕̱̤̠̗͔͇̙̣̰͓̖̰̯̀̓̐̑̇͊͂̀͋̒̐̓͒̒͊͊̕͜͝ͅE̴̡̧̨̨̲̥̯͎̭̻̩̞̘̞̪̞̗̭͖̻͙͕͎̮͕̺͕̲̘̻̣͚̳̥͍̙͈͚͍͉̗͙̱͖͚̾̂̇͛̉͋͊̾͛̆̀́͑͛̅̋͊̕͘͜͜͜͝ͅͅͅͅ ̸̡̡̨̡̨̛̞͎̹̩̬̗̗̞̬̰̮̙̪̖͈̣̹͔̺̫̰̓̔̉̋̈̈́͐́̿̈̀͊̿̈̉̅̃̊̽͗̈̿̈́̓̈́̎͌̄̀̆̌̎͗̋͒̋̿̋̊̈́͆̋̾̈̏̈́̋̿̕̕̚͝͝͠͠ͅͅͅC̵̛̘̳͙̪̭͖̲̞̯̰̜͇̈̾̈́͋̌̉̽̽͑̎͌̾̈́͌̑͊̊̔̀͆̌̀̇̓͊̀̂̇̿̃͑́̈́̆͂̈́̾̓́̂̂̓̂̍̍͛͆͌͌̽̎̍̀̒̆̀͗͋͘͘͘͝͠͝͝͠͝͝Ǫ̸͕̻̞̝̜͚̗̮̼͎̤͔̤̱͔̫͂̄̉̋̈͊͐͂̇̀̌̎́͑̐̀̈́͋̓̾̅͒̒̄͑̒̆̑̾͜͝͝͝͝M̷̧̧̡̨̛̛̩̭̞͍̼̝̗͕̖͇̣̣̩͆̿̑͒́̉̅̓̌̆̈́͐͒̾̐̂̿̓̚͘̚͜E̵̡̨̢̧̢̢̡̢̨̛̠̱̻̺̦͚̹͓̬͔̪̟̼̥̯̠̘͚̫̯͍̺͔̫̟͇̱̦̟̪͚͉̣̳͓͍̬̙̲͔̘͙͔̤̰̜͍̠̩͉͐̂̊̏̐̿̊̋͑̿̇̊̈́͗̎̋́́̉̓̂̐͑̇̐̐͋́̒̈́͛͑͒̂͒̂̔̀̄̈́̓͂͆̈́͒̌͆̓͗̋͐̔̑͐̕͘ͅͅͅŞ̴̧̧̡̢̧̡̢͕̝͚̝̖͚̣̞̫̻̯͔̳̗̝̰̗̰̰̥̭͕̜̜̫͍̪̳̘̣̺̠͉̗̟͕̹͇̬̘̘̪͆͗̎̕', - - ## Crazy mode - # 'depression' => 'megasadness', - # 'ice cream' => 'eyes cream', - # 'strawberry' => 'plastic tubefruit', - # 'soul' => 'inner ghost', - # 'dance' => 'woopwoop', - # 'curling iron' => 'medieval torture device', - # 'gay' => 'rainbow', - # 'insurance' => 'the biggest scam known to man', - # 'lemonade' => 'sour drank', - # 'salamander' => 'baby dragon', - # 'scrolling' => 'vertically surfing through a screen', - # 'subtext' => 'subtweeting but IRL', - # 'how' => 'how now brown cow', - # 'midnight' => 'dayover', - # 'kill' => 'deathsnuggle', - # 'babe' => 'bae', - # 'video' => 'series of images played in rapid succession to give the illusion of movement on a static screen', - # 'online' => 'on the interwebs', - # 'internet' => 'series of electrotubes', - # 'highlighted' => 'becoming better', - # 'backfired' => 'went incredibly well', - # 'football' => 'soccer', - # 'baseball' => 'thrown soccer', - # 'basketball' => 'dribbling soccer', - # 'volleyball' => 'beach soccer', - # 'rule' => 'law you must obey', - # 'rules' => 'laws you must obey', - # 'why is this happening' => 'I think this is great', } - def self.replace(text) - return text + OVERLOAD_WORDS_REPLACEMENTS = { + 'bad' => 'bodge', + 'knee' => 'leg hinge', + 'knees' => 'leg hinges', + 'depression' => 'megasadness', + 'ice cream' => 'eyes cream', + 'life' => 'like a box of chocolates', + 'strawberry' => 'plastic tubefruit', + 'soul' => 'inner ghost', + 'dance' => 'woopwoop', + 'curling iron' => 'medieval torture device', + 'gay' => 'rainbow', + 'insurance' => 'the biggest scam known to man', + 'lemonade' => 'sour drank', + 'salamander' => 'baby dragon', + 'scrolling' => 'vertically surfing through a screen', + 'subtext' => 'subtweeting but IRL', + 'how' => 'how now brown cow', + 'midnight' => 'dayover', + 'kill' => 'deathsnuggle', + 'babe' => 'bae', + 'video' => 'series of images played in rapid succession to give the illusion of movement on a static screen', + 'online' => 'on the interwebs', + 'internet' => 'series of electrotubes', + 'highlighted' => 'becoming better', + 'backfired' => 'went incredibly well', + 'football' => 'soccer', + 'baseball' => 'throwing soccer', + 'basketball' => 'dribbling soccer', + 'volleyball' => 'beach air soccer', + 'rule' => 'law you must obey', + 'rules' => 'laws you must obey', + 'why is this happening' => 'I think this is great' + } - # TODO: page tag replacements? + def self.replace_for(text, user) + gremlins_phase = 2 replaced_text = text.dup - WORD_REPLACEMENTS.each do |trigger, replacement| - replaced_text.gsub!(/\b#{trigger.downcase}\b/i, wrapped(replacement, trigger)) + SPAM_WORD_REPLACEMENTS.each do |trigger, replacement| + replaced_text.gsub!(/\b#{trigger.downcase}\b/i, wrapped(replacement, trigger, 'red')) end - + + PERSPECTIVE_REPLACEMENTS.each do |trigger, replacement| + replaced_text.gsub!(/{#{trigger.downcase}}/i, wrapped(replacement.call(trigger, user), trigger, 'blue')) + end + + if false # not implemented: [[Character-123]] or https://www.notebook.ai/plan/characters/553 etc + REFERENCE_REPLACEMENTS.each do |trigger, replacement| + replaced_text.gsub!(/\b#{trigger.downcase}\b/i, wrapped(replacement, trigger, 'notebook-blue')) + end + end + + if gremlins_phase >= 1 + CASUAL_CHAOS_WORD_REPLACEMENTS.each do |trigger, replacement| + replaced_text.gsub!(/\b#{trigger.downcase}\b/i, wrapped(replacement, trigger, 'green')) + end + end + + if gremlins_phase >= 2 + GREMLINS_WORD_REPLACEMENTS.each do |trigger, replacement| + replaced_text.gsub!(/\b#{trigger.downcase}\b/i, wrapped(replacement, trigger, 'green')) + end + end + + if gremlins_phase >= 3 + OVERLOAD_WORDS_REPLACEMENTS.each do |trigger, replacement| + replaced_text.gsub!(/\b#{trigger.downcase}\b/i, wrapped(replacement, trigger, 'green')) + end + end + replaced_text.html_safe end - def self.wrapped(text, tooltip) - "#{text}" + def self.wrapped(text, tooltip, color='blue') + "#{text}" end end \ No newline at end of file diff --git a/app/views/layouts/forum.html.erb b/app/views/layouts/forum.html.erb index 34202927..2bc9eed7 100644 --- a/app/views/layouts/forum.html.erb +++ b/app/views/layouts/forum.html.erb @@ -37,9 +37,9 @@ <%= render 'layouts/ganalytics' %> -
+

- + Important Notebook.ai News

diff --git a/app/views/thredded/posts/_post.html.erb b/app/views/thredded/posts/_post.html.erb index 88a2be44..7d3e50b6 100644 --- a/app/views/thredded/posts/_post.html.erb +++ b/app/views/thredded/posts/_post.html.erb @@ -19,13 +19,7 @@ <%= content_tag :article, id: dom_id(post), class: "thredded--post thredded--#{post.read_state}--post #{muted_post ? muted_post_classes : 'card'}" do %> <%= render 'thredded/posts_common/actions', post: post, actions: local_assigns[:actions] %> <%= render 'thredded/posts_common/header', post: post %> - <%= - if user_signed_in && current_user.enabled_april_fools != false - ForumReplacementService.replace(content) || render('thredded/posts/content', post: post) - else - render('thredded/posts/content', post: post) - end - %> + <%= ForumReplacementService.replace_for(content, current_user) || render('thredded/posts/content', post: post) %> <% if post.pending_moderation? && !Thredded.content_visible_while_pending_moderation %>

<%= t 'thredded.posts.pending_moderation_notice' %>

<% elsif post.blocked? && post.can_moderate? %> From 2c53d4d392191c549d4e300798c49380765a5c22 Mon Sep 17 00:00:00 2001 From: drusepth Date: Fri, 1 Apr 2022 00:28:07 -0700 Subject: [PATCH 48/58] gremlins --- app/services/forum_replacement_service.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/services/forum_replacement_service.rb b/app/services/forum_replacement_service.rb index 28514afc..3f7f3a81 100644 --- a/app/services/forum_replacement_service.rb +++ b/app/services/forum_replacement_service.rb @@ -178,8 +178,6 @@ class ForumReplacementService < Service 'grass' => 'groundfuzzy', 'gravy' => 'meat water', 'greenhouse' => 'clearhouse', - 'gremlin' => 'extremely smart alien being that is here to help', - 'gremlins' => 'extremely smart alien beings that are here to help', 'gun' => 'rooty tooty point-n-shooty', 'guns' => 'rooty tooty point-n-shooties', 'hamburger' => 'beef wellington ensemble with lettuce', @@ -372,7 +370,9 @@ class ForumReplacementService < Service 'depression' => 'megasadness', 'ice cream' => 'eyes cream', 'life' => 'like a box of chocolates', - 'strawberry' => 'plastic tubefruit', + 'strawberry' => 'plastic tubefruit', + 'gremlin' => 'extremely smart alien being that is here to help', + 'gremlins' => 'extremely smart alien beings that are here to help', 'soul' => 'inner ghost', 'dance' => 'woopwoop', 'curling iron' => 'medieval torture device', From 1a707d49f05569ad06973284e8afc99f2f055fea Mon Sep 17 00:00:00 2001 From: drusepth Date: Fri, 1 Apr 2022 12:51:58 -0700 Subject: [PATCH 49/58] enable gremlins in PMs --- app/services/forum_replacement_service.rb | 9 +++++++++ app/views/thredded/private_posts/_private_post.html.erb | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/services/forum_replacement_service.rb b/app/services/forum_replacement_service.rb index 3f7f3a81..16343190 100644 --- a/app/services/forum_replacement_service.rb +++ b/app/services/forum_replacement_service.rb @@ -19,6 +19,9 @@ class ForumReplacementService < Service # perspective changes, always surrounded by {} (e.g. {@reader} ) PERSPECTIVE_REPLACEMENTS = { '@reader' => Proc.new { |trigger, user| (user.nil? ? 'anonymous reader' : user.try(:display_name)) || 'anonymous reader' } + # 'their' => Proc.new { |_, _| ["they're", "their", "there"].sample } + # 'there' => Proc.new { |_, _| ["they're", "their", "there"].sample } + # "they're" => Proc.new { |_, _| ["they're", "their", "there"].sample } } # turn on and off at will @@ -51,6 +54,7 @@ class ForumReplacementService < Service 'alchohol' => 'giggle juice', 'alien' => 'extraterrestrial bopper', 'aliens' => 'extraterrestrial boppers', + 'alpha' => 'beta', 'an hour' => 'exactly 3600 seconds', 'announcement' => 'shouty spouty', 'announcements' => 'shouty spouties', @@ -63,6 +67,7 @@ class ForumReplacementService < Service 'askew' => 'cattywampus', 'attorney' => 'lawyerboi-at-law', 'attornies' => 'lawyerbois-at-law', + 'automatically' => 'automagically', 'autumn' => 'rainseason (bestseason)', 'aviators' => 'cool kid shades', 'avocado' => 'greenseed toastmash', @@ -79,6 +84,7 @@ class ForumReplacementService < Service 'bears' => '(ᵔᴥᵔ)(ᵔᴥᵔ)', 'bed' => 'nighttime dreamvessel', 'beds' => 'nighttime dreamvessels', + 'beta' => 'alpha', 'bird' => 'government spy drone', 'birds' => 'government spy drones', 'blood' => 'human syrup', @@ -184,6 +190,7 @@ class ForumReplacementService < Service 'hamburgers' => 'beef wellington ensembles with lettuce', 'hat' => 'fuzzy head chimney', 'hate' => 'absolutely love', + 'h a t e' => 'L O V E', 'heart' => 'corazón', 'hearts' => 'corazones', 'hell' => 'heck', @@ -210,6 +217,7 @@ class ForumReplacementService < Service 'laptop' => 'electrotablet with keys', 'lechuga' => 'lettuce', 'lettuce' => 'lechuga', + 'library' => 'libary', 'lightbulb' => 'ceiling-bright', 'lightbulbs' => 'ceiling-brights', 'lizard people' => 'definitely normal human beings', @@ -302,6 +310,7 @@ class ForumReplacementService < Service 'Stardew Valley' => 'Farming Simulator 2016', 'sticky' => 'icky wicky', 'stolen' => 'nick wicketed', + 'stupid' => 'stoopid', 'success' => 'Yahtzee!', 'summer' => 'sunseason', 'sup' => 'soup', diff --git a/app/views/thredded/private_posts/_private_post.html.erb b/app/views/thredded/private_posts/_private_post.html.erb index a224d055..6dce3640 100644 --- a/app/views/thredded/private_posts/_private_post.html.erb +++ b/app/views/thredded/private_posts/_private_post.html.erb @@ -13,6 +13,7 @@ <%= content_tag :article, id: dom_id(private_post), class: "thredded--post thredded--#{private_post.read_state}--post" do %> <%= render 'thredded/posts_common/actions', post: private_post, actions: local_assigns[:actions] %> <%= render 'thredded/posts_common/header', post: private_post %> - <%= content || render('thredded/private_posts/content', post: private_post) %> + <%= ForumReplacementService.replace_for(content, current_user) || render('thredded/private_posts/content', post: private_post) %> + <%# content || render('thredded/private_posts/content', post: private_post) %> <% end %> <% end %> \ No newline at end of file From a2675a044845a74d8bcea1ee25b80d6427ffb829 Mon Sep 17 00:00:00 2001 From: drusepth Date: Fri, 1 Apr 2022 17:52:06 -0700 Subject: [PATCH 50/58] advance gremlins phase --- app/services/forum_replacement_service.rb | 45 ++++++++++++----------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/app/services/forum_replacement_service.rb b/app/services/forum_replacement_service.rb index 16343190..cb7f947f 100644 --- a/app/services/forum_replacement_service.rb +++ b/app/services/forum_replacement_service.rb @@ -11,9 +11,9 @@ class ForumReplacementService < Service } - # spam replacements SPAM_WORD_REPLACEMENTS = { - 'cash app' => 'pls ban me andrew' + 'cash app' => 'pls ban me andrew', + 'cashapp' => 'hey mr andrew come over here' } # perspective changes, always surrounded by {} (e.g. {@reader} ) @@ -368,29 +368,32 @@ class ForumReplacementService < Service 'writing' => 'scribble scrabbling', 'writer' => 'scribble scrabbler', 'writers' => 'scribble scrabblers', + 'word' => 'wod', + 'words' => 'wods', + 'wordsmith' => 'wodsmith', 'yuge' => 'yuge', 'zalgo' => 'H̶̛̼̼̪̝̞͓̞͕͇̯͚͎͚̘̳͕̱̤̠̗͔͇̙̣̰͓̖̰̯̀̓̐̑̇͊͂̀͋̒̐̓͒̒͊͊̕͜͝ͅE̴̡̧̨̨̲̥̯͎̭̻̩̞̘̞̪̞̗̭͖̻͙͕͎̮͕̺͕̲̘̻̣͚̳̥͍̙͈͚͍͉̗͙̱͖͚̾̂̇͛̉͋͊̾͛̆̀́͑͛̅̋͊̕͘͜͜͜͝ͅͅͅͅ ̸̡̡̨̡̨̛̞͎̹̩̬̗̗̞̬̰̮̙̪̖͈̣̹͔̺̫̰̓̔̉̋̈̈́͐́̿̈̀͊̿̈̉̅̃̊̽͗̈̿̈́̓̈́̎͌̄̀̆̌̎͗̋͒̋̿̋̊̈́͆̋̾̈̏̈́̋̿̕̕̚͝͝͠͠ͅͅͅC̵̛̘̳͙̪̭͖̲̞̯̰̜͇̈̾̈́͋̌̉̽̽͑̎͌̾̈́͌̑͊̊̔̀͆̌̀̇̓͊̀̂̇̿̃͑́̈́̆͂̈́̾̓́̂̂̓̂̍̍͛͆͌͌̽̎̍̀̒̆̀͗͋͘͘͘͝͠͝͝͠͝͝Ǫ̸͕̻̞̝̜͚̗̮̼͎̤͔̤̱͔̫͂̄̉̋̈͊͐͂̇̀̌̎́͑̐̀̈́͋̓̾̅͒̒̄͑̒̆̑̾͜͝͝͝͝M̷̧̧̡̨̛̛̩̭̞͍̼̝̗͕̖͇̣̣̩͆̿̑͒́̉̅̓̌̆̈́͐͒̾̐̂̿̓̚͘̚͜E̵̡̨̢̧̢̢̡̢̨̛̠̱̻̺̦͚̹͓̬͔̪̟̼̥̯̠̘͚̫̯͍̺͔̫̟͇̱̦̟̪͚͉̣̳͓͍̬̙̲͔̘͙͔̤̰̜͍̠̩͉͐̂̊̏̐̿̊̋͑̿̇̊̈́͗̎̋́́̉̓̂̐͑̇̐̐͋́̒̈́͛͑͒̂͒̂̔̀̄̈́̓͂͆̈́͒̌͆̓͗̋͐̔̑͐̕͘ͅͅͅŞ̴̧̧̡̢̧̡̢͕̝͚̝̖͚̣̞̫̻̯͔̳̗̝̰̗̰̰̥̭͕̜̜̫͍̪̳̘̣̺̠͉̗̟͕̹͇̬̘̘̪͆͗̎̕', } OVERLOAD_WORDS_REPLACEMENTS = { - 'bad' => 'bodge', - 'knee' => 'leg hinge', - 'knees' => 'leg hinges', - 'depression' => 'megasadness', - 'ice cream' => 'eyes cream', - 'life' => 'like a box of chocolates', - 'strawberry' => 'plastic tubefruit', - 'gremlin' => 'extremely smart alien being that is here to help', - 'gremlins' => 'extremely smart alien beings that are here to help', - 'soul' => 'inner ghost', - 'dance' => 'woopwoop', - 'curling iron' => 'medieval torture device', - 'gay' => 'rainbow', - 'insurance' => 'the biggest scam known to man', - 'lemonade' => 'sour drank', - 'salamander' => 'baby dragon', - 'scrolling' => 'vertically surfing through a screen', - 'subtext' => 'subtweeting but IRL', + 'bad' => 'bodge', + 'knee' => 'leg hinge', + 'knees' => 'leg hinges', + 'depression' => 'megasadness', + 'ice cream' => 'eyes cream', + 'life' => 'like a box of chocolates', + 'strawberry' => 'plastic tubefruit', + 'gremlin' => 'extremely smart alien being that is here to help', + 'gremlins' => 'extremely smart alien beings that are here to help', + 'soul' => 'inner ghost', + 'dance' => 'woopwoop', + 'curling iron' => 'medieval torture device', + 'gay' => 'rainbow', + 'insurance' => 'the biggest scam known to man', + 'lemonade' => 'sour drank', + 'salamander' => 'baby dragon', + 'scrolling' => 'vertically surfing through a screen', + 'subtext' => 'subtweeting but IRL', 'how' => 'how now brown cow', 'midnight' => 'dayover', 'kill' => 'deathsnuggle', @@ -410,7 +413,7 @@ class ForumReplacementService < Service } def self.replace_for(text, user) - gremlins_phase = 2 + gremlins_phase = 3 replaced_text = text.dup From 81fbfc95ec8f864a15eb6edbed383ee18a01c21f Mon Sep 17 00:00:00 2001 From: drusepth Date: Fri, 1 Apr 2022 20:10:10 -0700 Subject: [PATCH 51/58] extract upload integrity logic to service --- app/services/subscription_service.rb | 26 ++++++++++++++++++++++++++ lib/tasks/data_integrity.rake | 24 +++--------------------- 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/app/services/subscription_service.rb b/app/services/subscription_service.rb index 23f1336a..12b036bb 100644 --- a/app/services/subscription_service.rb +++ b/app/services/subscription_service.rb @@ -127,4 +127,30 @@ class SubscriptionService < Service ].join("\n") ) end + + def self.recalculate_bandwidth_for(user) + base_bandwidth = User.new.upload_bandwidth_kb # 50_000 + premium_bonus = BillingPlan.find(4).bonus_bandwidth_kb # 9_950_000 + premium_total = base_bandwidth + premium_bonus # 10_000_000 + referral_bonus = 100_000 # per referral + + max_bandwidth = case user.selected_billing_plan_id + when nil, 1 + base_bandwidth + when 2 # free-for-lifers + 250_000 + when 4, 5, 6 # premium + premium_total + else + raise "User with funky billing plan id: U=#{user.id} BP=#{user.selected_billing_plan_id}" + end + + referral_bonus = user.referrals.count * referral_bonus + used_bandwidth = user.image_uploads.sum(:src_file_size) / 1000 + + remaining_bandwidth = max_bandwidth + referral_bonus - used_bandwidth + + return remaining_bandwidth + end + end diff --git a/lib/tasks/data_integrity.rake b/lib/tasks/data_integrity.rake index e88221c9..f5fb60ad 100644 --- a/lib/tasks/data_integrity.rake +++ b/lib/tasks/data_integrity.rake @@ -131,34 +131,16 @@ namespace :data_integrity do desc "Ensure all users have the correct upload bandwidth amounts" task correct_bandwidths: :environment do - base_bandwidth = User.new.upload_bandwidth_kb # 50_000 - premium_bonus = BillingPlan.find(4).bonus_bandwidth_kb # 9_950_000 - premium_total = base_bandwidth + premium_bonus # 10_000_000 - referral_bonus = 100_000 # per referral - puts "Disabling SQL logging" old_logger = ActiveRecord::Base.logger ActiveRecord::Base.logger = nil User.find_each do |user| - max_bandwidth = case user.selected_billing_plan_id - when nil, 1 - base_bandwidth - when 2 # free-for-lifers - 250_000 - when 4, 5, 6 # premium - premium_total - else - raise "User with funky billing plan id: U=#{user.id} BP=#{user.selected_billing_plan_id}" - end + correct_bandwidth = SubscriptionService.recalculate_bandwidth_for(user) - referral_bonus = user.referrals.count * referral_bonus - used_bandwidth = user.image_uploads.sum(:src_file_size) - - remaining_bandwidth = max_bandwidth + referral_bonus - used_bandwidth - if user.upload_bandwidth_kb != remaining_bandwidth + if user.upload_bandwidth_kb != correct_bandwidth puts "Correcting user #{user.id} bandwidth: #{user.upload_bandwidth_kb} --> #{remaining_bandwidth} (#{used_bandwidth} used)" - user.update(upload_bandwidth_kb: remaining_bandwidth) + user.update(upload_bandwidth_kb: correct_bandwidth) end end From b5af01501abe7af9f6e68b4088099bdedf0ea995 Mon Sep 17 00:00:00 2001 From: drusepth Date: Fri, 1 Apr 2022 20:55:18 -0700 Subject: [PATCH 52/58] staging dry run --- lib/tasks/data_integrity.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/data_integrity.rake b/lib/tasks/data_integrity.rake index f5fb60ad..d9c95141 100644 --- a/lib/tasks/data_integrity.rake +++ b/lib/tasks/data_integrity.rake @@ -140,7 +140,7 @@ namespace :data_integrity do if user.upload_bandwidth_kb != correct_bandwidth puts "Correcting user #{user.id} bandwidth: #{user.upload_bandwidth_kb} --> #{remaining_bandwidth} (#{used_bandwidth} used)" - user.update(upload_bandwidth_kb: correct_bandwidth) + # user.update(upload_bandwidth_kb: correct_bandwidth) end end From fb2097bbccb827b0e085a53d7a92c6dff9de1c59 Mon Sep 17 00:00:00 2001 From: drusepth Date: Fri, 1 Apr 2022 21:18:03 -0700 Subject: [PATCH 53/58] remove old var --- app/services/forum_replacement_service.rb | 1 - lib/tasks/data_integrity.rake | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/services/forum_replacement_service.rb b/app/services/forum_replacement_service.rb index cb7f947f..0e09e0be 100644 --- a/app/services/forum_replacement_service.rb +++ b/app/services/forum_replacement_service.rb @@ -388,7 +388,6 @@ class ForumReplacementService < Service 'soul' => 'inner ghost', 'dance' => 'woopwoop', 'curling iron' => 'medieval torture device', - 'gay' => 'rainbow', 'insurance' => 'the biggest scam known to man', 'lemonade' => 'sour drank', 'salamander' => 'baby dragon', diff --git a/lib/tasks/data_integrity.rake b/lib/tasks/data_integrity.rake index d9c95141..de5de7a3 100644 --- a/lib/tasks/data_integrity.rake +++ b/lib/tasks/data_integrity.rake @@ -139,7 +139,7 @@ namespace :data_integrity do correct_bandwidth = SubscriptionService.recalculate_bandwidth_for(user) if user.upload_bandwidth_kb != correct_bandwidth - puts "Correcting user #{user.id} bandwidth: #{user.upload_bandwidth_kb} --> #{remaining_bandwidth} (#{used_bandwidth} used)" + puts "Correcting user #{user.id} bandwidth: #{user.upload_bandwidth_kb} --> #{correct_bandwidth}" # user.update(upload_bandwidth_kb: correct_bandwidth) end end From 18dfbd16eadddec1d33e46ea9f99a4e08e0fc5f6 Mon Sep 17 00:00:00 2001 From: drusepth Date: Fri, 1 Apr 2022 21:29:52 -0700 Subject: [PATCH 54/58] add lenience on storage integrity update --- lib/tasks/data_integrity.rake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/tasks/data_integrity.rake b/lib/tasks/data_integrity.rake index de5de7a3..d3a98106 100644 --- a/lib/tasks/data_integrity.rake +++ b/lib/tasks/data_integrity.rake @@ -135,10 +135,16 @@ namespace :data_integrity do old_logger = ActiveRecord::Base.logger ActiveRecord::Base.logger = nil + # For the sake of minimizing db updates while blazing through all users, + # we ignore a small amount (1kb) of difference between saved bandwidth + # and calculated bandwidth. Users should never be more than 1kb off though. + byte_lenience = 1000 + User.find_each do |user| correct_bandwidth = SubscriptionService.recalculate_bandwidth_for(user) - if user.upload_bandwidth_kb != correct_bandwidth + difference = (user.upload_bandwidth_kb - correct_bandwidth).abs + if difference > byte_lenience puts "Correcting user #{user.id} bandwidth: #{user.upload_bandwidth_kb} --> #{correct_bandwidth}" # user.update(upload_bandwidth_kb: correct_bandwidth) end From d6db90adc2856964d9105e8eaad7e7971f2962f4 Mon Sep 17 00:00:00 2001 From: drusepth Date: Fri, 1 Apr 2022 21:52:29 -0700 Subject: [PATCH 55/58] a lil extra reporting --- lib/tasks/data_integrity.rake | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/tasks/data_integrity.rake b/lib/tasks/data_integrity.rake index d3a98106..fd648da6 100644 --- a/lib/tasks/data_integrity.rake +++ b/lib/tasks/data_integrity.rake @@ -140,16 +140,24 @@ namespace :data_integrity do # and calculated bandwidth. Users should never be more than 1kb off though. byte_lenience = 1000 + real_byte_difference_this_run = 0 + effective_byte_difference_this_run = 0 + User.find_each do |user| correct_bandwidth = SubscriptionService.recalculate_bandwidth_for(user) - difference = (user.upload_bandwidth_kb - correct_bandwidth).abs - if difference > byte_lenience + difference = user.upload_bandwidth_kb - correct_bandwidth + real_byte_difference_this_run += difference + if difference.abs > byte_lenience puts "Correcting user #{user.id} bandwidth: #{user.upload_bandwidth_kb} --> #{correct_bandwidth}" + effective_byte_difference_this_run += difference # user.update(upload_bandwidth_kb: correct_bandwidth) end end + puts "Real byte difference: #{real_byte_difference_this_run}" + puts "Effective byte difference: #{effective_byte_difference_this_run}" + puts "Re-enabling SQL logging" ActiveRecord::Base.logger = old_logger end From f2583356af748d76fc387ae328bc864f18b01024 Mon Sep 17 00:00:00 2001 From: drusepth Date: Sat, 2 Apr 2022 00:39:59 -0700 Subject: [PATCH 56/58] remove logging and enable live update --- lib/tasks/data_integrity.rake | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/tasks/data_integrity.rake b/lib/tasks/data_integrity.rake index fd648da6..35fc3a53 100644 --- a/lib/tasks/data_integrity.rake +++ b/lib/tasks/data_integrity.rake @@ -140,24 +140,16 @@ namespace :data_integrity do # and calculated bandwidth. Users should never be more than 1kb off though. byte_lenience = 1000 - real_byte_difference_this_run = 0 - effective_byte_difference_this_run = 0 - User.find_each do |user| correct_bandwidth = SubscriptionService.recalculate_bandwidth_for(user) difference = user.upload_bandwidth_kb - correct_bandwidth - real_byte_difference_this_run += difference if difference.abs > byte_lenience - puts "Correcting user #{user.id} bandwidth: #{user.upload_bandwidth_kb} --> #{correct_bandwidth}" - effective_byte_difference_this_run += difference - # user.update(upload_bandwidth_kb: correct_bandwidth) + # puts "Correcting user #{user.id} bandwidth: #{user.upload_bandwidth_kb} --> #{correct_bandwidth}" + user.update(upload_bandwidth_kb: correct_bandwidth) end end - puts "Real byte difference: #{real_byte_difference_this_run}" - puts "Effective byte difference: #{effective_byte_difference_this_run}" - puts "Re-enabling SQL logging" ActiveRecord::Base.logger = old_logger end From 0b6669caf58fe9868cb9aa5cb9fb6a9e4448da55 Mon Sep 17 00:00:00 2001 From: drusepth Date: Sat, 2 Apr 2022 01:16:05 -0700 Subject: [PATCH 57/58] put the gremlins back in their cage --- app/services/forum_replacement_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/forum_replacement_service.rb b/app/services/forum_replacement_service.rb index 0e09e0be..249b6401 100644 --- a/app/services/forum_replacement_service.rb +++ b/app/services/forum_replacement_service.rb @@ -412,7 +412,7 @@ class ForumReplacementService < Service } def self.replace_for(text, user) - gremlins_phase = 3 + gremlins_phase = 0 replaced_text = text.dup From f8618bb76bd0e4ce80f749c22639c1ae1cea5d40 Mon Sep 17 00:00:00 2001 From: drusepth Date: Sat, 2 Apr 2022 15:47:04 -0700 Subject: [PATCH 58/58] remove gremlins message --- app/views/layouts/forum.html.erb | 57 -------------------------------- 1 file changed, 57 deletions(-) diff --git a/app/views/layouts/forum.html.erb b/app/views/layouts/forum.html.erb index 2bc9eed7..9a1b075e 100644 --- a/app/views/layouts/forum.html.erb +++ b/app/views/layouts/forum.html.erb @@ -37,63 +37,6 @@ <%= render 'layouts/ganalytics' %> - - - - - <%= react_component("Footer") unless defined?(@show_footer) && !@show_footer %> <%= render 'layouts/quick_add_fab' unless defined?(@show_footer) && !@show_footer %> <%= render partial: 'content/keyboard_controls_help_modal' %>