Skip to content

Commit

Permalink
Fixing Elixir 1.17 issues and so much needed clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
akoutmos committed Jun 4, 2024
1 parent de927d7 commit e8a8411
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 306 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ env:

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

jobs:
static_analysis:
Expand All @@ -21,8 +21,8 @@ jobs:
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: '1.13.3'
otp-version: '24.2'
elixir-version: "1.15.0"
otp-version: "26.2"
- name: Restore dependencies cache
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -53,9 +53,9 @@ jobs:
strategy:
matrix:
elixir:
- '1.13.3'
- "1.15.0"
otp:
- '24.2'
- "24.2"

steps:
- name: Checkout code
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ module path):
<mj-section>
<mj-column>
<mj-divider border-color="#F45E43"></mj-divider>
<mj-text font-size="20px" color="#F45E43"
>Hello <%= @first_name %> <%= @last_name %>!</mj-text
>
<mj-text font-size="20px" color="#F45E43">
Hello <%= @first_name %> <%= @last_name %>!
</mj-text>
</mj-column>
</mj-section>
</mj-body>
Expand Down Expand Up @@ -132,9 +132,9 @@ In conjunction with the following template:
<mj-section>
<mj-column>
<mj-divider border-color="#F45E43"></mj-divider>
<mj-text font-size="20px" color="#F45E43"
>Hello <%= generate_full_name(@first_name, @last_name) %>!</mj-text
>
<mj-text font-size="20px" color="#F45E43">
Hello <%= generate_full_name(@first_name, @last_name) %>!
</mj-text>
</mj-column>
</mj-section>
</mj-body>
Expand Down Expand Up @@ -183,9 +183,9 @@ And the following template:
<mj-section>
<mj-column>
<mj-divider border-color="#F45E43"></mj-divider>
<mj-text font-size="20px" color="#F45E43"
>Hello <%= generate_full_name(@first_name, @last_name) %>!</mj-text
>
<mj-text font-size="20px" color="#F45E43">
Hello <%= generate_full_name(@first_name, @last_name) %>!
</mj-text>
</mj-column>
</mj-section>
</mj-body>
Expand Down
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.11.0
4 changes: 3 additions & 1 deletion coveralls.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"skip_files": ["test", "lib/mjml_eex/tokenizer.ex"]
"skip_files": [
"test"
]
}
266 changes: 0 additions & 266 deletions lib/mjml_eex/tokenizer.ex

This file was deleted.

2 changes: 1 addition & 1 deletion lib/utils.ex
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ defmodule MjmlEEx.Utils do
"""
def escape_eex_expressions(template) do
template
|> MjmlEEx.Tokenizer.tokenize([])
|> EEx.Compiler.tokenize([])
|> case do
{:ok, tokens} ->
reduce_tokens(tokens)
Expand Down
16 changes: 11 additions & 5 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ defmodule MjmlEEx.MixProject do
def project do
[
app: :mjml_eex,
version: "0.10.0",
elixir: ">= 1.13.0",
version: project_version(),
elixir: ">= 1.15.0",
elixirc_paths: elixirc_paths(Mix.env()),
name: "MJML EEx",
source_url: "https://github.com/akoutmos/mjml_eex",
Expand Down Expand Up @@ -70,11 +70,11 @@ defmodule MjmlEEx.MixProject do
{:erlexec, "~> 2.0", optional: true},

# Development deps
{:ex_doc, "~> 0.31", only: :dev},
{:ex_doc, "~> 0.34", only: :dev},
{:excoveralls, "~> 0.18", only: [:test, :dev], runtime: false},
{:doctor, "~> 0.21.0", only: :dev},
{:doctor, "~> 0.21", only: :dev},
{:credo, "~> 1.7", only: :dev},
{:git_hooks, "~> 0.7.3", only: [:test, :dev], runtime: false}
{:git_hooks, "~> 0.7", only: [:test, :dev], runtime: false}
]
end

Expand All @@ -84,6 +84,12 @@ defmodule MjmlEEx.MixProject do
]
end

defp project_version do
"VERSION"
|> File.read!()
|> String.trim()
end

defp copy_files(_) do
# Set up directory structure
File.mkdir_p!("./doc/guides/images")
Expand Down
Loading

0 comments on commit e8a8411

Please sign in to comment.