Skip to content

Commit

Permalink
Mix dependency updates
Browse files Browse the repository at this point in the history
  • Loading branch information
liamwhite committed Mar 4, 2024
1 parent 8c9315a commit 838e5e1
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 48 deletions.
5 changes: 4 additions & 1 deletion lib/philomena/images/thumbnailer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ defmodule Philomena.Images.Thumbnailer do
file = download_image_file(image)
{:ok, analysis} = Analyzers.analyze(file)

file = apply_edit_script(image, file, Processors.process(analysis, file, generated_sizes(image)))
file =
apply_edit_script(image, file, Processors.process(analysis, file, generated_sizes(image)))

generate_dupe_reports(image)
recompute_meta(image, file, &Image.thumbnail_changeset/2)

Expand All @@ -91,6 +93,7 @@ defmodule Philomena.Images.Thumbnailer do
case change do
{:replace_original, new_file} ->
new_file

_ ->
existing_file
end
Expand Down
2 changes: 1 addition & 1 deletion lib/philomena/native.ex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Philomena.Native do
@moduledoc false

use Rustler, otp_app: :philomena
use Rustler, otp_app: :philomena, crate: "philomena"

@spec markdown_to_html(String.t(), %{String.t() => String.t()}) :: String.t()
def markdown_to_html(_text, _replacements), do: :erlang.nif_error(:nif_not_loaded)
Expand Down
14 changes: 7 additions & 7 deletions lib/philomena/scrapers/tumblr.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ defmodule Philomena.Scrapers.Tumblr do
@size_regex ~r|_(\d+)(\..+)\z|
@sizes [1280, 540, 500, 400, 250, 100, 75]
@tumblr_ranges [
InetCidr.parse("66.6.32.0/24"),
InetCidr.parse("66.6.33.0/24"),
InetCidr.parse("66.6.44.0/24"),
InetCidr.parse("74.114.152.0/24"),
InetCidr.parse("74.114.153.0/24"),
InetCidr.parse("74.114.154.0/24"),
InetCidr.parse("74.114.155.0/24")
InetCidr.parse_cidr!("66.6.32.0/24"),
InetCidr.parse_cidr!("66.6.33.0/24"),
InetCidr.parse_cidr!("66.6.44.0/24"),
InetCidr.parse_cidr!("74.114.152.0/24"),
InetCidr.parse_cidr!("74.114.153.0/24"),
InetCidr.parse_cidr!("74.114.154.0/24"),
InetCidr.parse_cidr!("74.114.155.0/24")
]

@spec can_handle?(URI.t(), String.t()) :: true | false
Expand Down
4 changes: 2 additions & 2 deletions lib/philomena/scrapers/twitter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ defmodule Philomena.Scrapers.Twitter do
images: [
%{
url: image_url,
camo_url: Camo.Image.image_url(image_url),
},
camo_url: Camo.Image.image_url(image_url)
}
]
}
end
Expand Down
10 changes: 6 additions & 4 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ defmodule Philomena.MixProject do
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps(),
dialyzer: [plt_add_apps: [:mix]],
rustler_crates: [philomena: []]
dialyzer: [plt_add_apps: [:mix]]
]
end

Expand Down Expand Up @@ -58,7 +57,6 @@ defmodule Philomena.MixProject do
{:secure_compare, "~> 0.1"},
{:elastix, "~> 0.10"},
{:nimble_parsec, "~> 1.2"},
{:canary, "~> 1.1"},
{:scrivener_ecto, "~> 2.7"},
{:pbkdf2, ">= 0.0.0",
github: "basho/erlang-pbkdf2", ref: "7e9bd5fcd3cc3062159e4c9214bb628aa6feb5ca"},
Expand Down Expand Up @@ -101,7 +99,11 @@ defmodule Philomena.MixProject do

# Fixes for OTP/25
{:neotoma, "~> 1.7.3", manager: :rebar3, override: true},
{:hut, "~> 1.4.0", manager: :rebar3, override: true}
{:hut, "~> 1.4.0", manager: :rebar3, override: true},

# Fixes for Elixir v1.15+
{:canary, "~> 1.1",
github: "marcinkoziej/canary", ref: "704debde7a2c0600f78c687807884bf37c45bd79"}
]
end

Expand Down
Loading

0 comments on commit 838e5e1

Please sign in to comment.