about summary refs log tree commit diff stats
path: root/Makefile
diff options
context:
space:
mode:
authorRory Bradford <roryrjb@gmail.com>2020-02-04 07:56:29 +0000
committerRory Bradford <roryrjb@gmail.com>2020-02-04 07:56:29 +0000
commitdab6e9c0fa610f74ab57076060e1fd91884283f5 (patch)
treefbecb6f0dc2aa03a943ad61e71442af6b4d67186 /Makefile
parent0aaa3fc4eb7b186b7413c6efe24120e965e132e7 (diff)
downloadrf-dab6e9c0fa610f74ab57076060e1fd91884283f5.tar.gz
Fix valgrind test on OpenBSD
Remove non-portable valgrind -s option.

Signed-off-by: Rory Bradford <roryrjb@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index cb78c69..208c034 100644
--- a/Makefile
+++ b/Makefile
@@ -29,9 +29,9 @@ debug: $(OBJS)
 	$(CC) $(BIN).c $(CFLAGS) -g -o $(BIN)
 
 test: clean debug
-	valgrind -s --leak-check=full --show-leak-kinds=all --track-origins=yes --error-exitcode=1 ./$(BIN) ^$
-	valgrind -s --leak-check=full --show-leak-kinds=all --track-origins=yes --error-exitcode=1 ./$(BIN) ^$$
-	valgrind -s --leak-check=full --show-leak-kinds=all --track-origins=yes --error-exitcode=1 ./$(BIN) rf
+	valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --error-exitcode=1 ./$(BIN) ^$
+	valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --error-exitcode=1 ./$(BIN) ^$$
+	valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --error-exitcode=1 ./$(BIN) rf
 
 static: $(OBJS)
 	$(CC) $(BIN).c $(CFLAGS) -static -o $(BIN)
href='#n13'>13 14 15 16 17 18 19
20
21
22
23
24
25
26
27
28
29
30
31
32









                                                 








                                                                          






                                           
                                                  
                       
                                          


         
use Cro::HTTP::Router;
use Cro::WebApp::Template;

use Crater::Gallery;
use Crater::Session;

sub gallery-routes(
    Crater::Gallery :$gallery!, #= gallery object
) is export {
    route {
        # Logged in users can view images.
        get -> LoggedIn $session, 'resources', 'img', *@path, :$original {
            my $dir = $gallery.directory;
            # Serve the thumbnail unless original image was requested.
            $dir .= add(".crater/thumbnails") unless $original.defined;
            static $dir, @path;
        }

        # Gallery view.
        get -> LoggedIn $session {
            template 'gallery.crotmp', {
                gallery => $gallery.list(),
                title => "Gallery"
            };
        }

        # Redirect to login page if not logged in.
        get -> *@path {
            redirect '/login', :see-other;
        }
    }
}