diff --git a/cpanfile b/cpanfile index 016e374..f22187c 100644 --- a/cpanfile +++ b/cpanfile @@ -8,7 +8,6 @@ requires 'Mojolicious::Plugin::StaticCache'; requires 'Mojolicious::Plugin::CSPHeader'; requires 'Mojolicious::Plugin::FiatTux::Helpers', '== 0.06', url => 'https://framagit.org/fiat-tux/mojolicious/mojolicious-plugin-fiattux-helpers/-/archive/0.06/mojolicious-plugin-fiattux-helpers-0.06.tar.gz'; requires 'Mojolicious::Plugin::FiatTux::GrantAccess', '== 0.05', url => 'https://framagit.org/fiat-tux/mojolicious/mojolicious-plugin-fiattux-grantaccess/-/archive/0.05/mojolicious-plugin-fiattux-grantaccess-0.05.tar.gz'; -requires 'EV'; requires 'Filesys::DiskUsage'; requires 'Switch'; requires 'Locale::Maketext'; @@ -21,6 +20,14 @@ requires 'Crypt::SaltedHash'; requires 'Data::Validate::URI'; requires 'Term::ProgressBar'; +# Mojolicious optional deps +feature 'optional_deps' => sub { + requires 'Cpanel::JSON::XS'; + requires 'EV'; + requires 'IO::Socket::Socks'; + requires 'Role::Tiny'; +}; + feature 'test' => sub { requires 'Devel::Cover'; }; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index c3ce858..9b5427a 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -92,6 +92,14 @@ DISTRIBUTIONS ExtUtils::MakeMaker 6.30 Math::BigInt 1.997 Test::More 0.90 + Cpanel-JSON-XS-4.06 + pathname: R/RU/RURBAN/Cpanel-JSON-XS-4.06.tar.gz + provides: + Cpanel::JSON::XS 4.06 + Cpanel::JSON::XS::Type undef + requirements: + ExtUtils::MakeMaker 0 + Pod::Text 2.08 Crypt-PasswdMD5-1.40 pathname: R/RS/RSAVAGE/Crypt-PasswdMD5-1.40.tgz provides: @@ -337,16 +345,6 @@ DISTRIBUTIONS Data::Validate::Domain 0 Data::Validate::IP 0 ExtUtils::MakeMaker 0 - Devel-CheckLib-1.13 - pathname: M/MA/MATTN/Devel-CheckLib-1.13.tar.gz - provides: - Devel::CheckLib 1.13 - requirements: - Exporter 0 - ExtUtils::MakeMaker 0 - File::Spec 0 - File::Temp 0.16 - perl 5.00405 Devel-Cover-1.31 pathname: P/PJ/PJCJ/Devel-Cover-1.31.tar.gz provides: @@ -711,6 +709,20 @@ DISTRIBUTIONS Mozilla::CA 0 Net::SSLeay 1.46 Scalar::Util 0 + IO-Socket-Socks-0.74 + pathname: O/OL/OLEG/IO-Socket-Socks-0.74.tar.gz + provides: + IO::Socket::Socks 0.74 + IO::Socket::Socks::Debug 0.74 + IO::Socket::Socks::Error 0.74 + IO::Socket::Socks::ReadOnlyVar 0.74 + IO::Socket::Socks::SocketClassVar 0.74 + requirements: + ExtUtils::MakeMaker 6.52 + IO::Select 0 + Socket 1.94 + Test::More 0.88 + constant 1.03 ISO-639_1-0.02 pathname: L/LD/LDIDRY/ISO-639_1-0.02.tar.gz provides: @@ -1873,7 +1885,7 @@ DISTRIBUTIONS HTTP::Request 6 HTTP::Request::Common 6 HTTP::Response 6 - HTTP::Status 6.18 + HTTP::Status 6 IO::Select 0 IO::Socket 0 LWP::MediaTypes 6 diff --git a/lufi.conf.template b/lufi.conf.template index 91f0eb3..1434931 100644 --- a/lufi.conf.template +++ b/lufi.conf.template @@ -6,6 +6,7 @@ # see http://mojolicio.us/perldoc/Mojo/Server/Hypnotoad for a full list of settings hypnotoad => { # array of IP addresses and ports you want to listen to + # you can specify a unix socket too, like 'http+unix://%2Ftmp%2Flufi.sock' listen => ['http://127.0.0.1:8081'], # if you use Lufi behind a reverse proxy like Nginx, you want to set proxy to 1 # if you use Lufi directly, let it commented diff --git a/t/test.t b/t/test.t index 3699261..1f10eb5 100644 --- a/t/test.t +++ b/t/test.t @@ -110,13 +110,13 @@ sub test_upload_file { ->message_ok ->message_like(qr@"created_at":\d+@) ->message_like(qr@"del_at_first_view":true@) - ->message_like(qr@"delay":"0"@) + ->message_like(qr@"delay":0@) ->message_like(qr@"duration":\d+@) ->message_like(qr@"i":0@) ->message_like(qr@"j":0@) ->message_like(qr@"name":"foobar\.txt"@) ->message_like(qr@"parts":1@) - ->message_like(qr@"sent_delay":"0"@) + ->message_like(qr@"sent_delay":0@) ->message_like(qr@"short":"[^"]+"@) ->message_like(qr@"size":7@) ->message_like(qr@"success":true@)