Skip to content

Instantly share code, notes, and snippets.

@heymarkreeves
Created August 22, 2022 22:43
Show Gist options
  • Save heymarkreeves/9a025493415556a2e3e2b8381dbdf379 to your computer and use it in GitHub Desktop.
Save heymarkreeves/9a025493415556a2e3e2b8381dbdf379 to your computer and use it in GitHub Desktop.

Installation Steps

  • type.xml location is ambiguous. (it's in ./usr/local/etc/ImageMagick-7/type.xml, which updates a bunch of other instances)
  • There's no documented step to run yarn install before running the database migrations, which throw errors without some JS files in place in app/assets.
  • Imagick now installs version 7; docs contain a reference to 6.

Installation Notes

I had homebrew, RVM, and Ruby 2.7.0 installed already. Postgres server, Redis server, Mailhog were all new installs. I updated Ruby to 3.0.0. All of those went fine.

I did need to do a gem install rubocop-discourse. It was installed via the previous bundle install, but that didn't make it available directly on the command line, and it was thus unavailable to RubyMine's inspection tools.

Helvetica Font Steps

Creating a copy of Helvetica in ~/Library/Fonts—following the steps in the instructions—causes issues in Firefox's rendering of Helvetica (possibly other cases as well). I've seen spaces replaced with ê, fi ligatures breaking, etc. Is there a way to do this without using a system font? See:

https://bugzilla.mozilla.org/show_bug.cgi?id=1786274

https://github.com/discourse/discourse/blob/main/docs/DEVELOPMENT-OSX-NATIVE.md#imagemagick

I ended up deleting the user copies of Helvetica and undoing this, and still saw avatars rendered with initials, though I didn't rerun tests. Is this outdated?

rspec Errors

Deprecation or 'not found' Warnings

- DEPRECATION WARNING: Using legacy connection handling is deprecated.
- DEPRECATION WARNING: ActiveRecord::Base.writing_role is deprecated and will be removed in Rails 7.1.
- pngquant worker: `pngquant` not found; please provide proper binary or disable this worker (--no-pngquant argument or `:pngquant => false` through options)

There were 20 failures the first time I ran rspec. 40 the second time.

rspec ./spec/lib/upload_creator_spec.rb:135 # UploadCreator#create_for pngquant should apply pngquant to optimized images
rspec ./spec/lib/search_spec.rb:1837 # Search Advanced search can search URLS correctly
rspec ./spec/lib/search_spec.rb:1674 # Search Advanced search can search numbers correctly, and match exact phrases
rspec ./spec/lib/search_spec.rb:1664 # Search Advanced search can match exact phrases
rspec ./spec/lib/search_spec.rb:1852 # Search Advanced search supports category slug and tags
rspec ./spec/lib/wizard/wizard_builder_spec.rb:74 # Wizard::Builder styling with colors when the default theme has not been override should set the right default values
rspec ./spec/lib/wizard/wizard_builder_spec.rb:88 # Wizard::Builder styling with colors when the default theme has been override and the color scheme doesn't have a base scheme fallbacks to the color scheme name
rspec ./spec/lib/wizard/wizard_builder_spec.rb:111 # Wizard::Builder styling with colors when the default theme has been overridden by a theme with a color scheme should set the right default values
rspec ./spec/lib/wizard/wizard_builder_spec.rb:99 # Wizard::Builder styling with colors when the default theme has been overridden by a theme without a color scheme should set the right default values
rspec ./spec/models/optimized_image_spec.rb:179 # OptimizedImage.crop .downsize should downsize logo (requires ImageMagick 7)
rspec ./spec/helpers/application_helper_spec.rb:189 # ApplicationHelper application_logo_dark_url when dark theme is present when dark logo is present should return correct url
rspec ./spec/lib/discourse_spec.rb:500 # Discourse Utils.execute_command raises error for unsafe shell
rspec ./spec/lib/discourse_spec.rb:454 # Discourse Utils.execute_command works for individual commands
rspec ./spec/lib/discourse_spec.rb:483 # Discourse Utils.execute_command does not leak chdir between threads
rspec ./spec/lib/discourse_spec.rb:469 # Discourse Utils.execute_command works with a block
rspec ./spec/requests/application_controller_spec.rb:443 # ApplicationController#handle_theme selects the theme the user has selected
rspec ./spec/requests/application_controller_spec.rb:489 # ApplicationController#handle_theme does not allow non privileged user to preview themes
rspec ./spec/models/topic_spec.rb:661 # Topic.similar_to with a similar topic returns the similar topic even if raw is blank
rspec ./spec/models/topic_spec.rb:657 # Topic.similar_to with a similar topic returns the similar topic if the title is similar
rspec ./spec/models/topic_spec.rb:698 # Topic.similar_to with a similar topic with secure categories should return the cat since the user can see it
rspec ./spec/jobs/clean_up_crawler_stats_spec.rb:17 # Jobs::CleanUpCrawlerStats keeps only the top records from the previous day
rspec ./spec/lib/upload_creator_spec.rb:135 # UploadCreator#create_for pngquant should apply pngquant to optimized images
rspec ./spec/helpers/application_helper_spec.rb:189 # ApplicationHelper application_logo_dark_url when dark theme is present when dark logo is present should return correct url
rspec ./spec/requests/application_controller_spec.rb:489 # ApplicationController#handle_theme does not allow non privileged user to preview themes
rspec ./spec/requests/application_controller_spec.rb:443 # ApplicationController#handle_theme selects the theme the user has selected
rspec ./spec/models/optimized_image_spec.rb:179 # OptimizedImage.crop .downsize should downsize logo (requires ImageMagick 7)
rspec ./spec/lib/wizard/wizard_builder_spec.rb:88 # Wizard::Builder styling with colors when the default theme has been override and the color scheme doesn't have a base scheme fallbacks to the color scheme name
rspec ./spec/lib/wizard/wizard_builder_spec.rb:74 # Wizard::Builder styling with colors when the default theme has not been override should set the right default values
rspec ./spec/lib/wizard/wizard_builder_spec.rb:99 # Wizard::Builder styling with colors when the default theme has been overridden by a theme without a color scheme should set the right default values
rspec ./spec/lib/wizard/wizard_builder_spec.rb:111 # Wizard::Builder styling with colors when the default theme has been overridden by a theme with a color scheme should set the right default values
rspec ./spec/models/topic_spec.rb:661 # Topic.similar_to with a similar topic returns the similar topic even if raw is blank
rspec ./spec/models/topic_spec.rb:657 # Topic.similar_to with a similar topic returns the similar topic if the title is similar
rspec ./spec/models/topic_spec.rb:698 # Topic.similar_to with a similar topic with secure categories should return the cat since the user can see it
rspec ./spec/lib/search_spec.rb:1852 # Search Advanced search supports category slug and tags
rspec ./spec/lib/search_spec.rb:1837 # Search Advanced search can search URLS correctly
rspec ./spec/lib/search_spec.rb:1664 # Search Advanced search can match exact phrases
rspec ./spec/lib/search_spec.rb:1674 # Search Advanced search can search numbers correctly, and match exact phrases
rspec './spec/models/report_spec.rb[1:16:2:1]' # Report page_view_crawler request reports with page_view_crawler returns a report with data
rspec './spec/models/report_spec.rb[1:11:1:1]' # Report http_2xx request reports with no http_2xx records returns an empty report
rspec './spec/models/report_spec.rb[1:11:2:1]' # Report http_2xx request reports with http_2xx returns a report with data
rspec ./spec/models/report_spec.rb:1194 # Report consolidated_page_views with no data works
rspec './spec/models/report_spec.rb[1:18:2:1]' # Report page_view_anon request reports with page_view_anon returns a report with data
rspec './spec/models/report_spec.rb[1:18:1:1]' # Report page_view_anon request reports with no page_view_anon records returns an empty report
rspec './spec/models/report_spec.rb[1:17:1:1]' # Report page_view_logged_in request reports with no page_view_logged_in records returns an empty report
rspec './spec/models/report_spec.rb[1:17:2:1]' # Report page_view_logged_in request reports with page_view_logged_in returns a report with data
rspec './spec/models/report_spec.rb[1:12:2:1]' # Report http_background request reports with http_background returns a report with data
rspec './spec/models/report_spec.rb[1:12:1:1]' # Report http_background request reports with no http_background records returns an empty report
rspec ./spec/lib/middleware/request_tracker_spec.rb:103 # Middleware::RequestTracker log_request can log Discourse user agent requests correctly
rspec ./spec/lib/middleware/request_tracker_spec.rb:53 # Middleware::RequestTracker log_request can exclude/include based on custom header
rspec ./spec/lib/middleware/request_tracker_spec.rb:64 # Middleware::RequestTracker log_request can log requests correctly
rspec ./spec/lib/middleware/request_tracker_spec.rb:151 # Middleware::RequestTracker log_request when ignoring anonymous page views does not ignore anonymous requests for public sites
rspec ./spec/lib/middleware/request_tracker_spec.rb:166 # Middleware::RequestTracker log_request when ignoring anonymous page views ignores anonymous requests for private sites
rspec ./spec/models/web_crawler_request_spec.rb:13 # WebCrawlerRequest can log crawler requests
rspec ./spec/lib/discourse_spec.rb:500 # Discourse Utils.execute_command raises error for unsafe shell
rspec ./spec/lib/discourse_spec.rb:469 # Discourse Utils.execute_command works with a block
rspec ./spec/lib/discourse_spec.rb:483 # Discourse Utils.execute_command does not leak chdir between threads
rspec ./spec/lib/discourse_spec.rb:454 # Discourse Utils.execute_command works for individual commands
rspec ./spec/lib/discourse_spec.rb:575 # Discourse.clear_all_theme_cache! invalidates all JS and CSS caches
rspec ./spec/integration/topic_thumbnail_spec.rb:99 # Topic Thumbnails latest with a plugin includes the theme specified resolutions
rspec ./spec/integration/topic_thumbnail_spec.rb:39 # Topic Thumbnails latest with a theme includes the theme specified resolutions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment