-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move "thinking cat" fixture to lib folder #3824
Conversation
fc05857
to
8d94aa8
Compare
Thanks @mamhoff! 🙏 Do you think it would make more sense to move the image to |
Sure! but you know what: When I do that, I might as well also do the 1-pixel-image thing? I mean I don't think it's worth distributing those 20kB that I have not looked at in the however many years I've spent with this software. |
Go for it! 👍 |
a059ccf
to
45ad4ff
Compare
With the exclusion of the spec folder from the packaged solidus_core gem in 80bea87, all factories that use an image can now not access that image when loaded from the lib folder of a packaged gem. The reason for that is that the image referenced in those factories lives under spec/fixtures - in the spec folder. This commit does the simplest thing that could possibly work: Move the image to the lib/fixtures folder instead and adapt the factories so that they work even if loaded from the packaged gem.
This image is only 631 bytes in size, and lives in the correct location under lib/spree/testing_support in core.
@mamhoff thanks for this PR! For some reason, CircleCI did not receive the hook for running the CI after the last push. Can you please push again to retrigger it? |
7818714
to
851cfec
Compare
We don't need a thinking cat for testing. A blank, really small image is enough.
851cfec
to
c42e3d7
Compare
This image is being replaced with a blank image that lives under core/lib/spree/testing_support.
c42e3d7
to
ae4ed90
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Martin!
I'm going to backport and release Solidus 2.11.1 tomorrow, thanks again! |
Description
With the exclusion of the spec folder from the packaged solidus_core gem
in 80bea87, all factories that use an image can now not access that
image when loaded from the lib folder of a packaged gem.
The reason for that is that the image referenced in those factories
lives under spec/fixtures - in the spec folder.
This commit does the simplest thing that could possibly work: Move the
image to the lib/fixtures folder instead and adapt the factories so that
they work even if loaded from the packaged gem.
One could imagine a single-pixel image file instead of an actual JPEG of a thinking cat to conserve space on the many machines this gem runs on. Would that still be in scope?
I would very much like a new version of Solidus to be cut with this change, as 2.11.0 has broken factories because of this.
Checklist: