GNU bug report logs - #28283
[PATCH 0/1] gnu: services: version-control: Add cgit.

Previous Next

Package: guix-patches;

Reported by: Oleg Pykhalov <go.wigust <at> gmail.com>

Date: Tue, 29 Aug 2017 21:17:01 UTC

Severity: normal

Tags: patch

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


Message #52 received at 28283-done <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: 28283-done <at> debbugs.gnu.org
Subject: Re: [bug#28283] Status: [PATCH 1/1] gnu: services: version-control:
 Add cgit.
Date: Tue, 03 Oct 2017 15:07:40 +0200
Oleg Pykhalov <go.wigust <at> gmail.com> skribis:

> From 984b619620046015113cc4876569f5c87dd37c79 Mon Sep 17 00:00:00 2001
> From: Oleg Pykhalov <go.wigust <at> gmail.com>
> Date: Thu, 28 Sep 2017 20:02:35 +0300
> Subject: [PATCH] gnu: services: version-control: Add cgit.
>
> * gnu/services/version-control.scm
> (<cgit-configuration-file>, <cgit-configuration>): New record types.
> (cgit-configuration-robots-string, cgit-activation,
> cgit-configuration-nginx-config): New procedures.
> (%cgit-configuration-nginx, cgit-service-type): New variables.
> * doc/guix.texi (Version Control): Document the cgit service.
> ---
>  doc/guix.texi                    |  65 ++++++++++++++++
>  gnu/local.mk                     |   1 +
>  gnu/services/version-control.scm | 119 ++++++++++++++++++++++++++++-
>  gnu/tests/version-control.scm    | 161 +++++++++++++++++++++++++++++++++++++++
>  4 files changed, 345 insertions(+), 1 deletion(-)
>  create mode 100644 gnu/tests/version-control.scm

Awesome!

I took the liberty to add more URL tests:

--8<---------------cut here---------------start------------->8---
          ;; Make sure we can access pages that correspond to our repository.
          (letrec-syntax ((test-url
                           (syntax-rules ()
                             ((_ path code)
                              (test-equal (string-append "GET " path)
                                code
                                (let-values (((response body)
                                              (http-get (string-append
                                                         "http://localhost:8080"
                                                         path))))
                                  (response-code response))))
                             ((_ path)
                              (test-url path 200)))))
            (test-url "/")
            (test-url "/test")
            (test-url "/test/log")
            (test-url "/test/tree")
            (test-url "/test/does-not-exist" 404)
            (test-url "/does-not-exist" 404))
--8<---------------cut here---------------end--------------->8---

Will push in a minute.  Thank you!

Ludo’.




This bug report was last modified 7 years and 293 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.