Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85823449
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
6 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/build-test/package.sh b/build-test/package.sh
deleted file mode 100755
index 62f8301..0000000
--- a/build-test/package.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-
-start_dir=`pwd`
-
-abort()
-{
- cd $start_dir
- exit 1
-}
-
-trap 'abort' 0
-set -e
-
-make clean
-test -d package-test || mkdir package-test
-rm -rf package-test/*
-
-mkdir package-test/myhtmlex-local
-mix hex.build --unpack -o package-test/myhtmlex-local
-cd package-test
-mix new myhtmlex_pkg_test
-cd myhtmlex_pkg_test
-
-# Default operation
-sed -i -e 's/^.*dep_from_hexpm.*$/ {:myhtmlex, path: "..\/myhtmlex-local"}/' mix.exs
-mix deps.get
-mix compile
-mix run -e 'IO.inspect {"html", [], [{"head", [], []}, {"body", [], ["foo"]}]} = Myhtmlex.decode("foo")'
-
-# Nif operation
-sed -i -e 's/^.*myhtmlex-local.*$/ {:myhtmlex, path: "..\/myhtmlex-local", runtime: false}/' mix.exs
-echo "config :myhtmlex, mode: Myhtmlex.Nif" >> config/config.exs
-mix run -e 'IO.inspect {"html", [], [{"head", [], []}, {"body", [], ["foo"]}]} = Myhtmlex.decode("foo")'
-
-trap : 0
-
-cd $start_dir
-echo "ok"
-
diff --git a/build-test/ubuntu-14.04.dockerfile b/build-test/ubuntu-14.04.dockerfile
deleted file mode 100644
index eb62836..0000000
--- a/build-test/ubuntu-14.04.dockerfile
+++ /dev/null
@@ -1,33 +0,0 @@
-FROM ubuntu:trusty
-
-RUN mkdir myhtmlex
-WORKDIR myhtmlex
-
-ENV DEBIAN_FRONTEND=noninteractive
-
-RUN apt-get update \
- && apt-get install -y curl \
- && curl -LO https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb \
- && dpkg -i erlang-solutions_1.0_all.deb \
- && apt-get update \
- && apt-get install -y \
- git \
- esl-erlang \
- elixir \
- build-essential \
- && mix local.hex --force \
- && echo 'LANG=en_US.UTF-8' > /etc/default/locale \
- && echo 'LANGUAGE=en_US' >> /etc/default/locale
-
-COPY . ./
-
-# Test build
-RUN mix deps.get \
- && make \
- && mix test \
- && mix bench \
- && make clean
-
-# Test that it works as a dependency
-RUN build-test/package.sh
-
diff --git a/build-test/ubuntu-16.04.dockerfile b/build-test/ubuntu-16.04.dockerfile
deleted file mode 100644
index 431f5db..0000000
--- a/build-test/ubuntu-16.04.dockerfile
+++ /dev/null
@@ -1,33 +0,0 @@
-FROM ubuntu:xenial
-
-RUN mkdir myhtmlex
-WORKDIR myhtmlex
-
-ENV DEBIAN_FRONTEND=noninteractive
-
-RUN apt-get update \
- && apt-get install -y curl \
- && curl -LO https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb \
- && dpkg -i erlang-solutions_1.0_all.deb \
- && apt-get update \
- && apt-get install -y \
- git \
- esl-erlang \
- elixir \
- build-essential \
- && mix local.hex --force \
- && echo 'LANG=en_US.UTF-8' > /etc/default/locale \
- && echo 'LANGUAGE=en_US' >> /etc/default/locale
-
-COPY . ./
-
-# Test build
-RUN mix deps.get \
- && make \
- && mix test \
- && mix bench \
- && make clean
-
-# Test that it works as a dependency
-RUN build-test/package.sh
-
diff --git a/mix.exs b/mix.exs
index c9dfa7c..f54e364 100644
--- a/mix.exs
+++ b/mix.exs
@@ -1,136 +1,138 @@
-defmodule Myhtmlex.Mixfile do
+defmodule FastHTML.Mixfile do
use Mix.Project
def project do
[
- app: :myhtmlex,
+ app: :fast_html,
version: "0.2.1",
elixir: "~> 1.5",
deps: deps(),
package: package(),
- compilers: [:myhtmlex_make] ++ Mix.compilers(),
+ compilers: [:my_html_worker_make] ++ Mix.compilers(),
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
- name: "Myhtmlex",
+ name: "FastHTML",
description: """
A module to decode HTML into a tree,
porting all properties of the underlying
library myhtml, being fast and correct
in regards to the html spec.
+
+ Originally based on Myhtmlex.
""",
docs: docs()
]
end
def package do
[
- maintainers: ["Lukas Rieder"],
+ maintainers: ["Ariadne Conill"],
licenses: ["GNU LGPL"],
links: %{
- "Github" => "https://git.pleroma.social/pleroma/myhtmlex",
- "Issues" => "https://git.pleroma.social/pleroma/myhtmlex/issues",
+ "GitLab" => "https://git.pleroma.social/pleroma/fast_html",
+ "Issues" => "https://git.pleroma.social/pleroma/fast_html/issues",
"MyHTML" => "https://github.com/lexborisov/myhtml"
},
files: [
"lib",
"c_src",
"priv/.gitignore",
"test",
"Makefile",
"mix.exs",
"README.md",
"LICENSE"
]
]
end
def application do
[
extra_applications: [:logger],
mod: {Myhtmlex.Safe, []},
# used to detect conflicts with other applications named processes
registered: [Myhtmlex.Safe.Cnode, Myhtmlex.Safe.Supervisor],
env: [
mode: Myhtmlex.Safe
]
]
end
defp deps do
[
# documentation helpers
{:ex_doc, ">= 0.0.0", only: :dev},
# benchmarking helpers
{:benchfella, "~> 0.3.0", only: :dev},
# cnode helpers
{:nodex,
git: "https://git.pleroma.social/pleroma/nodex",
ref: "cb6730f943cfc6aad674c92161be23a8411f15d1"}
]
end
defp docs do
[
- main: "Myhtmlex"
+ main: "FastHTML"
]
end
end
-defmodule Mix.Tasks.Compile.MyhtmlexMake do
+defmodule Mix.Tasks.Compile.MyHtmlWorkerMake do
@artifacts [
"priv/myhtml_worker"
]
def find_make do
_make_cmd =
System.get_env("MAKE") ||
case :os.type() do
{:unix, :freebsd} -> "gmake"
{:unix, :openbsd} -> "gmake"
{:unix, :netbsd} -> "gmake"
{:unix, :dragonfly} -> "gmake"
_ -> "make"
end
end
defp otp_version do
:erlang.system_info(:otp_release)
|> to_string()
|> String.to_integer()
end
defp otp_22_or_newer? do
otp_version() >= 22
end
def run(_) do
make_cmd = find_make()
if match?({:win32, _}, :os.type()) do
IO.warn("Windows is not yet a target.")
exit(1)
else
{result, _error_code} =
System.cmd(
make_cmd,
@artifacts,
stderr_to_stdout: true,
env: [
{"MIX_ENV", to_string(Mix.env())},
{"OTP22_DEF", (otp_22_or_newer?() && "YES") || "NO"}
]
)
IO.binwrite(result)
end
:ok
end
def clean() do
make_cmd = find_make()
{result, _error_code} = System.cmd(make_cmd, ["clean"], stderr_to_stdout: true)
Mix.shell().info(result)
:ok
end
end
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Oct 29, 5:44 AM (4 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1797612
Default Alt Text
(6 KB)
Attached To
Mode
R16 fast_html
Attached
Detach File
Event Timeline