rename project from SimpleshopTheme to Berrypod
All modules, configs, paths, and references updated. 836 tests pass, zero warnings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
defmodule SimpleshopTheme.ImageFixtures do
|
||||
defmodule Berrypod.ImageFixtures do
|
||||
@moduledoc """
|
||||
Shared fixtures for image-related tests.
|
||||
"""
|
||||
|
||||
alias SimpleshopTheme.Repo
|
||||
alias SimpleshopTheme.Media.Image
|
||||
alias Berrypod.Repo
|
||||
alias Berrypod.Media.Image
|
||||
|
||||
@sample_jpeg File.read!("test/fixtures/sample_1200x800.jpg")
|
||||
|
||||
def sample_jpeg, do: @sample_jpeg
|
||||
|
||||
def image_fixture(attrs \\ %{}) do
|
||||
{:ok, webp, w, h} = SimpleshopTheme.Images.Optimizer.to_optimized_webp(@sample_jpeg)
|
||||
{:ok, webp, w, h} = Berrypod.Images.Optimizer.to_optimized_webp(@sample_jpeg)
|
||||
|
||||
defaults = %{
|
||||
image_type: "product",
|
||||
@@ -63,11 +63,11 @@ defmodule SimpleshopTheme.ImageFixtures do
|
||||
_ -> "#{id}-#{width}.#{ext}"
|
||||
end
|
||||
|
||||
Path.join(SimpleshopTheme.Images.Optimizer.cache_dir(), filename)
|
||||
Path.join(Berrypod.Images.Optimizer.cache_dir(), filename)
|
||||
end
|
||||
|
||||
def cleanup_cache do
|
||||
cache_dir = SimpleshopTheme.Images.Optimizer.cache_dir()
|
||||
cache_dir = Berrypod.Images.Optimizer.cache_dir()
|
||||
if File.exists?(cache_dir), do: File.rm_rf!(cache_dir)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user