discourse/spec
David Taylor 137e06a316
FIX: Ensure 'crop' always returns requested dimensions (#16437)
Previously, 'crop' would resize the image to have the requested width, then crop the height to the requested value. This works when cropping images vertically, but not when cropping them horizontally.

For example, trying to crop a 500x500 image to 200x500 was actually resulting in a 200x200 image. Having an OptimizedImage with width/height columns mismatching the actual OptimizedImage width/height causes some unusual issues.

This commit ensures that a call to `OptimizedImage.crop(from, to, width, height)` will always return an image of the requested width/height. The `w x h^` syntax defines minimum width/height, while maintaining aspect ratio.
2022-04-19 11:21:24 +01:00
..
fabricators FIX: Issues with incorrect unread and private message topic tracking state (#16474) 2022-04-19 11:37:01 +10:00
fixtures FIX: Support new layout on Amazon product pages (#16091) 2022-03-04 18:31:53 -05:00
helpers FIX: include crawler content on old mobile browsers (#16387) 2022-04-06 11:09:12 +01:00
import_export DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
initializers DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
integration FEATURE: Allow multiple required tag groups for a category (#16381) 2022-04-06 14:08:06 +01:00
integrity DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
jobs DEV: Accept force_respect_seen_recently argument in UserEmail job (#16460) 2022-04-18 13:32:11 -05:00
lib FIX: Issues with incorrect unread and private message topic tracking state (#16474) 2022-04-19 11:37:01 +10:00
mailers REFACTOR: Add full_url to Group 2022-04-14 11:53:57 +02:00
models FIX: Ensure 'crop' always returns requested dimensions (#16437) 2022-04-19 11:21:24 +01:00
multisite DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
requests FIX: Do not show visibility topic if visible (#16478) 2022-04-18 11:16:30 +03:00
script/import_scripts DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
serializers FEATURE: add user_suspended attribute in post serialize. (#16413) 2022-04-13 19:58:09 +05:30
services FEATURE: Improve screened IPs roll up and extend for IPv6 (#15585) 2022-04-12 21:07:37 +03:00
support FEATURE: Add 2FA support to the Discourse Connect Provider protocol (#16386) 2022-04-13 15:04:09 +03:00
tasks DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
views FEATURE: add nofollow to RSS alternate link in topics and categories (#16013) 2022-03-09 16:34:02 +11:00
rails_helper.rb PERF: perform all cached counting in background (#15991) 2022-02-22 16:45:25 +00:00
regenerate_swagger_docs DEV: Add API docs for uploads and API doc watcher (#15387) 2021-12-23 08:40:15 +10:00
swagger_helper.rb DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00