From patchwork Thu Feb 28 17:44:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre Neidhardt X-Patchwork-Id: 1256 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 65E2A16CCC; Thu, 28 Feb 2019 17:45:11 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NORMAL_HTTP_TO_IP, URIBL_BLOCKED,WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id C4BCA16CC9 for ; Thu, 28 Feb 2019 17:45:10 +0000 (GMT) Received: from localhost ([127.0.0.1]:43834 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzPk6-0003kF-At for patchwork@mira.cbaines.net; Thu, 28 Feb 2019 12:45:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzPk3-0003h8-9Y for guix-patches@gnu.org; Thu, 28 Feb 2019 12:45:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gzPjz-0000qB-SZ for guix-patches@gnu.org; Thu, 28 Feb 2019 12:45:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41928) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gzPjy-0000pK-FG for guix-patches@gnu.org; Thu, 28 Feb 2019 12:45:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gzPjy-0001m6-BV for guix-patches@gnu.org; Thu, 28 Feb 2019 12:45:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#34650] [PATCH 7/7] gnu: Add mailcatcher. Resent-From: Pierre Neidhardt Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 28 Feb 2019 17:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34650 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 34650@debbugs.gnu.org Received: via spool by 34650-submit@debbugs.gnu.org id=B34650.15513758816738 (code B ref 34650); Thu, 28 Feb 2019 17:45:02 +0000 Received: (at 34650) by debbugs.gnu.org; 28 Feb 2019 17:44:41 +0000 Received: from localhost ([127.0.0.1]:55461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gzPjd-0001kR-5Y for submit@debbugs.gnu.org; Thu, 28 Feb 2019 12:44:41 -0500 Received: from relay11.mail.gandi.net ([217.70.178.231]:48251) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gzPja-0001jn-Lf for 34650@debbugs.gnu.org; Thu, 28 Feb 2019 12:44:39 -0500 Received: from localhost.localdomain (lfbn-1-12225-33.w90-92.abo.wanadoo.fr [90.92.41.33]) (Authenticated sender: mail@ambrevar.xyz) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 717B5100010 for <34650@debbugs.gnu.org>; Thu, 28 Feb 2019 17:44:37 +0000 (UTC) From: Pierre Neidhardt Date: Thu, 28 Feb 2019 18:44:35 +0100 Message-Id: <20190228174435.14499-7-mail@ambrevar.xyz> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190228174435.14499-1-mail@ambrevar.xyz> References: <87ftsa24ts.fsf@ambrevar.xyz> <20190228174435.14499-1-mail@ambrevar.xyz> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/ruby.scm (mailcatcher): New variable. --- gnu/packages/ruby.scm | 49 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 8cb170e17..854b4669b 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -7814,3 +7814,52 @@ minimal effort.") (description "Simple, upgradable WebSockets for Ruby Thin.") (home-page "https://github.com/sj26/skinny") (license license:expat))) + +(define-public mailcatcher + (package + (name "mailcatcher") + (version "0.6.5") + (source + (origin + (method url-fetch) + (uri (rubygems-uri "mailcatcher" version)) + (sha256 + (base32 + "0h6gk8n18i5f651f244al1hscjzl27fpma4vqw0qhszqqpd5p3bx")))) + (build-system ruby-build-system) + (arguments + ;; TODO: Grab from GitHub to get tests? + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (add-before 'build 'patch-gemspec + (lambda _ + (substitute* ".gemspec" + ((".freeze, \\[\\\"= 1.0.9.1") ", [\">= 1.0.9.1") + ((".freeze, \\[\\\"~> 1.5") ", [\">= 1.5") + ((".freeze, \\[\\\"~> 1.5.0") ", [\">= 1.5.0") + ((".freeze, \\[\\\"~> 1.2") ", [\">= 1.2") + ))) + (add-before 'build 'loosen-dependency-contraint + (lambda _ + (substitute* "lib/mail_catcher.rb" + (("\"eventmachine\", \"1.0.9.1\"") "\"eventmachine\", \">= 1.0.9.1\"") + (("\"rack\", \"~> 1.5\"") "\"rack\", \">= 1.5\"") + (("\"thin\", \"~> 1.5.0\"") "\"thin\", \">= 1.5.0\"") + (("\"sinatra\", \"~> 1.2\"") "\"sinatra\", \">= 1.2\""))))))) + (inputs + `(("ruby-eventmachine" ,ruby-eventmachine) + ("ruby-mail" ,ruby-mail) + ("ruby-rack" ,ruby-rack) + ("ruby-sinatra" ,ruby-sinatra) + ("ruby-skinny" ,ruby-skinny) + ("ruby-sqlite3" ,ruby-sqlite3) + ("ruby-thin" ,ruby-thin))) + (synopsis "Run an SMTP server which catches any message sent to it to display in a browser") + (description + "MailCatcher runs a super simple SMTP server which catches any message +sent to it to display in a web interface. Run mailcatcher, set your favourite +app to deliver to smtp://127.0.0.1:1025 instead of your default SMTP server, +then check out http://127.0.0.1:1080 to see the mail.") + (home-page "https://mailcatcher.me") + (license license:expat)))