Skip to content

Commit 58bcfe0

Browse files
authored
feat: upgrade phoenix to 1.8 (#241)
Made-with: Cursor
1 parent 4a12947 commit 58bcfe0

23 files changed

Lines changed: 197 additions & 139 deletions

.github/workflows/server_ci.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,18 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
otp: ['25.1']
17-
elixir: [
18-
'1.14.3',
19-
'1.14.4',
20-
'1.14.5',
21-
'1.15.0',
22-
'1.16.0',
23-
'1.16.2'
24-
]
16+
include:
17+
# Minimum supported (per mix.exs: "~> 1.16")
18+
- otp: '26.2'
19+
elixir: '1.16.0'
20+
- otp: '26.2'
21+
elixir: '1.16.2'
22+
- otp: '26.2'
23+
elixir: '1.16.3'
24+
25+
# Latest stable on latest OTP
26+
- otp: '28.2'
27+
elixir: '1.19.3'
2528
services:
2629
db:
2730
image: postgres:latest

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<p align="center">
2-
<img alt="Lynx Logo" src="/assets/img/logo.png?v=0.12.11" width="400" />
2+
<img alt="Lynx Logo" src="/assets/img/logo.png?v=0.13.0" width="400" />
33
<h3 align="center">Lynx</h3>
44
<p align="center">A Fast, Secure and Reliable Terraform Backend, Set up in Minutes.</p>
55
<p align="center">
66
<a href="https://github.com/Clivern/Lynx/actions/workflows/ci.yml">
77
<img src="https://github.com/Clivern/Lynx/actions/workflows/server_ci.yml/badge.svg"/>
88
</a>
99
<a href="https://github.com/Clivern/Lynx/releases">
10-
<img src="https://img.shields.io/badge/Version-0.12.11-1abc9c.svg">
10+
<img src="https://img.shields.io/badge/Version-0.13.0-1abc9c.svg">
1111
</a>
1212
<a href="https://hub.docker.com/r/clivern/lynx/tags">
13-
<img src="https://img.shields.io/badge/Docker-0.12.11-1abc9c.svg">
13+
<img src="https://img.shields.io/badge/Docker-0.13.0-1abc9c.svg">
1414
</a>
1515
<a href="https://github.com/Clivern/terraform-provider-lynx">
1616
<img src="https://img.shields.io/badge/Terraform-Provider-yellow.svg">

api.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ info:
77
license:
88
name: MIT License
99
url: https://github.com/Clivern/Lynx/blob/main/LICENSE
10-
version: 0.12.11
10+
version: 0.13.0
1111
externalDocs:
1212
description: Find out more about lynx
1313
url: https://github.com/Clivern/Lynx

docker-compose-cluster.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '3.8'
22

33
services:
44
app1:
5-
image: clivern/lynx:0.12.11
5+
image: clivern/lynx:0.13.0
66
environment:
77
APP_NAME: Lynx
88
APP_PORT: 4001
@@ -27,7 +27,7 @@ services:
2727
- db
2828

2929
app2:
30-
image: clivern/lynx:0.12.11
30+
image: clivern/lynx:0.13.0
3131
environment:
3232
APP_NAME: Lynx
3333
APP_PORT: 4002
@@ -52,7 +52,7 @@ services:
5252
- db
5353

5454
app3:
55-
image: clivern/lynx:0.12.11
55+
image: clivern/lynx:0.13.0
5656
environment:
5757
APP_NAME: Lynx
5858
APP_PORT: 4003

docker-compose-nginx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '3.8'
22

33
services:
44
app:
5-
image: clivern/lynx:0.12.11
5+
image: clivern/lynx:0.13.0
66
environment:
77
APP_NAME: Lynx
88
APP_PORT: 4000

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '3.8'
22

33
services:
44
app:
5-
image: clivern/lynx:0.12.11
5+
image: clivern/lynx:0.13.0
66
environment:
77
APP_NAME: Lynx
88
APP_PORT: 4000

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ hero:
2121
icon: edit
2222

2323
download_link:
24-
label: Latest Release v0.12.11
25-
url: https://github.com/Clivern/Lynx/releases/tag/0.12.11
24+
label: Latest Release v0.13.0
25+
url: https://github.com/Clivern/Lynx/releases/tag/0.13.0
2626

2727
features:
2828
rows:

lib/lynx/module/snapshot_module.ex

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,20 +173,18 @@ defmodule Lynx.Module.SnapshotModule do
173173
case EnvironmentContext.get_env_by_uuid(environment["uuid"]) do
174174
nil ->
175175
recreate_environment(environment)
176-
{:ok, ""}
177176

178177
env ->
179178
EnvironmentContext.delete_env(env)
180179
recreate_environment(environment)
181-
{:ok, ""}
182180
end
183181
end
184182

183+
{:ok, ""}
184+
185185
{:not_found, msg} ->
186186
{:error, msg}
187187
end
188-
189-
{:ok, ""}
190188
end
191189

192190
defp recreate_environment(new_environment) do

lib/lynx_web.ex

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ defmodule LynxWeb do
2323

2424
def controller do
2525
quote do
26-
use Phoenix.Controller, namespace: LynxWeb
26+
use Phoenix.Controller,
27+
formats: [html: "View", json: "View"],
28+
layouts: [html: LynxWeb.LayoutView]
2729

2830
import Plug.Conn
29-
import LynxWeb.Gettext
31+
use Gettext, backend: LynxWeb.Gettext
3032
alias LynxWeb.Router.Helpers, as: Routes
3133
end
3234
end
@@ -84,14 +86,18 @@ defmodule LynxWeb do
8486
def channel do
8587
quote do
8688
use Phoenix.Channel
87-
import LynxWeb.Gettext
89+
use Gettext, backend: LynxWeb.Gettext
8890
end
8991
end
9092

9193
defp view_helpers do
9294
quote do
9395
# Use all HTML functionality (forms, tags, etc)
94-
use Phoenix.HTML
96+
import Phoenix.HTML
97+
import Phoenix.HTML.Form
98+
use PhoenixHTMLHelpers
99+
100+
import Phoenix.Component
95101

96102
# Import LiveView and .heex helpers (live_render, live_patch, <.form>, etc)
97103
import Phoenix.LiveView.Helpers
@@ -100,7 +106,7 @@ defmodule LynxWeb do
100106
import Phoenix.View
101107

102108
import LynxWeb.ErrorHelpers
103-
import LynxWeb.Gettext
109+
use Gettext, backend: LynxWeb.Gettext
104110
alias LynxWeb.Router.Helpers, as: Routes
105111
end
106112
end

lib/lynx_web/controllers/environment_controller.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ defmodule LynxWeb.EnvironmentController do
8080
count = EnvironmentModule.count_project_environments(params["p_uuid"])
8181

8282
case result do
83-
{:error, msg} ->
83+
{:not_found, msg} ->
8484
conn
8585
|> put_status(:not_found)
8686
|> render("error.json", %{message: msg})

0 commit comments

Comments
 (0)