Compare commits
No commits in common. "main" and "main" have entirely different histories.
13
Dockerfile
13
Dockerfile
|
@ -1,4 +1,4 @@
|
|||
FROM docker.io/rakudo-star:2023.08
|
||||
FROM rakudo-star:2023.08
|
||||
|
||||
# Move it
|
||||
WORKDIR /opt
|
||||
|
@ -11,14 +11,15 @@ COPY templates/ ./templates/
|
|||
RUN apt-get update
|
||||
RUN apt-get -y upgrade
|
||||
RUN apt-get -y install libssl-dev libarchive-dev
|
||||
# Tests failing cope
|
||||
RUN zef -v install --force-test IO::Socket::Async::SSL \
|
||||
NativeHelpers::Callback \
|
||||
Archive::Libarchive::Raw
|
||||
# Stupid tests failing idk
|
||||
RUN zef -v install --force-test IO::Socket::Async::SSL \
|
||||
Archive::Libarchive::Raw NativeHelpers::Callback
|
||||
# Get the latest and greatest for bug fix
|
||||
# https://github.com/rawleyfowler/Humming-Bird/issues/60#issuecomment-1788351265
|
||||
RUN zef install https://github.com/rawleyfowler/Humming-Bird.git --force-install
|
||||
RUN zef -v install --deps-only .
|
||||
|
||||
# Finish setting up the environment
|
||||
ENV HUMMING_BIRD_ENV='PROD'
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["raku", "bin/hyperlink-redirect"]
|
||||
|
|
|
@ -11,4 +11,4 @@ use Humming-Bird::Core;
|
|||
use lib 'lib';
|
||||
use Hyperlink-Redirect;
|
||||
|
||||
listen 3000;
|
||||
listen(3000);
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
use Humming-Bird::Core;
|
||||
use Humming-Bird::Middleware;
|
||||
use Humming-Bird::Advice;
|
||||
use Template::Mustache;
|
||||
|
||||
# Normally would 'use' local libs here for Controller and Model and
|
||||
|
@ -9,8 +11,9 @@ use Hyperlink-Redirect::Helpers;
|
|||
# Set things up (config stuff would go here?)
|
||||
my $template = Template::Mustache.new: :from<../templates>;
|
||||
|
||||
# Plugins
|
||||
plugin 'Logger';
|
||||
# Logging
|
||||
middleware &middleware-logger;
|
||||
advice &advice-logger;
|
||||
|
||||
# Must set the root path lest yet miss setting $!root
|
||||
my $router = Router.new(root => '/');
|
||||
|
|
|
@ -8,10 +8,10 @@ use Hyperlink-Redirect::Helpers;
|
|||
|
||||
plan 2;
|
||||
|
||||
ok fix-protocol("seriousbusiness.international") eq "http://seriousbusiness.international",
|
||||
"fix-protocol fixes bare domains correctly"
|
||||
or diag "\nfix-protocol should return the same string with 'http://' prefixed if protocol isn't specified";
|
||||
ok fix-protocol("seriousbusiness.international") eq "http://seriousbusiness.international", \
|
||||
"fix-protocol fixes bare domains correctly"\
|
||||
or diag "\nfix-protocol should return the same string with 'http://' prefixed if protocol isn't specified";
|
||||
|
||||
ok fix-protocol("https://www.seriousbusiness.international") eq "https://www.seriousbusiness.international",
|
||||
"fix-protocol does not mangle correctly formatted domains"
|
||||
or diag "\nThe URL should remain unchanged when the protocol is specified";
|
||||
ok fix-protocol("https://www.seriousbusiness.international") eq "https://www.seriousbusiness.international",\
|
||||
"fix-protocol does not mangle correctly formatted domains"\
|
||||
or diag "\nThe URL should remain unchanged when the protocol is specified";
|
Loading…
Reference in a new issue