From: "Thompson, David" <dthompson2@worcester.edu>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH] gnu: Add ruby-rack.
Date: Mon, 7 Sep 2015 13:45:28 -0400 [thread overview]
Message-ID: <CAJ=RwfaUbNbTOwiL6Do-TkS+MEy6jhQQqOO=pcGD-w7fE=NDDw@mail.gmail.com> (raw)
In-Reply-To: <87613mtdyh.fsf@gnu.org>
On Mon, Sep 7, 2015 at 12:02 PM, Ludovic Courtès <ludo@gnu.org> wrote:
> David Thompson <dthompson2@worcester.edu> skribis:
>
>> From a740a5ca98c02bd0e9c792677dfc8ff8464c8365 Mon Sep 17 00:00:00 2001
>> From: David Thompson <dthompson2@worcester.edu>
>> Date: Fri, 4 Sep 2015 16:47:52 -0400
>> Subject: [PATCH] gnu: Add ruby-rack.
>>
>> * gnu/packages/ruby.scm (ruby-rack): New variable.
>
> [...]
>
>> + (add-before 'check 'fix-tests
>> + (lambda _
>> + ;; A few of the tests use the length of a file on disk for
>> + ;; Content-Length and Content-Range headers. However, this file
>> + ;; has a shebang in it which an earlier phase patches, growing
>> + ;; the file size from 193 to 239 bytes.
>> + (substitute* '("test/spec_file.rb")
>> + (("193") "239")
>
> I think this phase should use the actual length of the shebang, in case
> the store is not at /gnu/store, with something like:
>
> (- (string-length (which "ruby")) (string-length "/usr/bin/ruby"))
>
> Could you look into it?
Good point. It was easy to implement, too:
(let ((size-diff (- (string-length (which "ruby"))
(string-length "/usr/bin/env ruby"))))
(substitute* '("test/spec_file.rb")
(("193")
(number->string (+ 193 size-diff)))
(("bytes(.)22-33" all delimiter)
(string-append "bytes"
delimiter
(number->string (+ 22 size-diff))
"-"
(number->string (+ 33 size-diff))))))
Pushed, thanks!
- Dave
prev parent reply other threads:[~2015-09-07 17:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-04 20:50 [PATCH] gnu: Add ruby-rack David Thompson
2015-09-07 16:02 ` Ludovic Courtès
2015-09-07 17:45 ` Thompson, David [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJ=RwfaUbNbTOwiL6Do-TkS+MEy6jhQQqOO=pcGD-w7fE=NDDw@mail.gmail.com' \
--to=dthompson2@worcester.edu \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.