From e9878e5b2b0a21ec98b992ea102e6f0026019be8 Mon Sep 17 00:00:00 2001 From: sergiotarxz Date: Mon, 8 Jun 2020 13:37:15 +0200 Subject: [PATCH] =?UTF-8?q?Borramos=20el=20c=C3=B3digo=20en=20Perl,=20vamo?= =?UTF-8?q?s=20a=20pasarnos=20a=20Rust.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + .proverc | 2 -- README.md | 2 -- lib/TorChat.pm | 21 --------------------- lib/TorChat/Controller/Example.pm | 12 ------------ public/index.html | 11 ----------- script/tor_chat | 11 ----------- t/basic.t | 9 --------- templates/example/welcome.html.ep | 13 ------------- templates/layouts/default.html.ep | 5 ----- 10 files changed, 1 insertion(+), 86 deletions(-) delete mode 100644 .proverc delete mode 100644 README.md delete mode 100644 lib/TorChat.pm delete mode 100644 lib/TorChat/Controller/Example.pm delete mode 100644 public/index.html delete mode 100755 script/tor_chat delete mode 100644 t/basic.t delete mode 100644 templates/example/welcome.html.ep delete mode 100644 templates/layouts/default.html.ep diff --git a/.gitignore b/.gitignore index 4fffb2f..1a1e473 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /target /Cargo.lock +*.swp diff --git a/.proverc b/.proverc deleted file mode 100644 index c96eebc..0000000 --- a/.proverc +++ /dev/null @@ -1,2 +0,0 @@ --I lib --j4 diff --git a/README.md b/README.md deleted file mode 100644 index f600229..0000000 --- a/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# TorChat - diff --git a/lib/TorChat.pm b/lib/TorChat.pm deleted file mode 100644 index 27c562a..0000000 --- a/lib/TorChat.pm +++ /dev/null @@ -1,21 +0,0 @@ -package TorChat; -use Mojo::Base 'Mojolicious'; - -# This method will run once at server start -sub startup { - my $self = shift; - - # Load configuration from hash returned by "my_app.conf" - my $config = $self->plugin('Config'); - - # Documentation browser under "/perldoc" - $self->plugin('PODRenderer') if $config->{perldoc}; - - # Router - my $r = $self->routes; - - # Normal route to controller - $r->get('/')->to('example#welcome'); -} - -1; diff --git a/lib/TorChat/Controller/Example.pm b/lib/TorChat/Controller/Example.pm deleted file mode 100644 index 18e561d..0000000 --- a/lib/TorChat/Controller/Example.pm +++ /dev/null @@ -1,12 +0,0 @@ -package TorChat::Controller::Example; -use Mojo::Base 'Mojolicious::Controller'; - -# This action will render a template -sub welcome { - my $self = shift; - - # Render template "example/welcome.html.ep" with message - $self->render(msg => 'Welcome to the Mojolicious real-time web framework!'); -} - -1; diff --git a/public/index.html b/public/index.html deleted file mode 100644 index e74bb5f..0000000 --- a/public/index.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - Welcome to the Mojolicious real-time web framework! - - -

Welcome to the Mojolicious real-time web framework!

- This is the static document "public/index.html", - click here to get back to the start. - - diff --git a/script/tor_chat b/script/tor_chat deleted file mode 100755 index 9e2675c..0000000 --- a/script/tor_chat +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env perl - -use strict; -use warnings; - -use FindBin; -BEGIN { unshift @INC, "$FindBin::Bin/../lib" } -use Mojolicious::Commands; - -# Start command line interface for application -Mojolicious::Commands->start_app('TorChat'); diff --git a/t/basic.t b/t/basic.t deleted file mode 100644 index ba9ae8c..0000000 --- a/t/basic.t +++ /dev/null @@ -1,9 +0,0 @@ -use Mojo::Base -strict; - -use Test::More; -use Test::Mojo; - -my $t = Test::Mojo->new('TorChat'); -$t->get_ok('/')->status_is(200)->content_like(qr/Mojolicious/i); - -done_testing(); diff --git a/templates/example/welcome.html.ep b/templates/example/welcome.html.ep deleted file mode 100644 index 1efd098..0000000 --- a/templates/example/welcome.html.ep +++ /dev/null @@ -1,13 +0,0 @@ -% layout 'default'; -% title 'Welcome'; -

<%= $msg %>

-

- This page was generated from the template "templates/example/welcome.html.ep" - and the layout "templates/layouts/default.html.ep", - <%= link_to 'click here' => url_for %> to reload the page or - <%= link_to 'here' => '/index.html' %> to move forward to a static page. - % if (config 'perldoc') { - To learn more, you can also browse through the documentation - <%= link_to 'here' => '/perldoc' %>. - % } -

diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep deleted file mode 100644 index 599c556..0000000 --- a/templates/layouts/default.html.ep +++ /dev/null @@ -1,5 +0,0 @@ - - - <%= title %> - <%= content %> -