From df747c8d68dffd665e72cb0f8e8f05ea64d5d54c Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Thu, 28 Feb 2019 18:41:29 +0100 Subject: gnu: Add mailcatcher. * gnu/packages/ruby.scm (mailcatcher): New variable. --- gnu/packages/ruby.scm | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) (limited to 'gnu/packages/ruby.scm') diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 0869a2a5c3..66eb2607e6 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -8488,3 +8488,56 @@ and stability, the Thin library.") (home-page "https://github.com/sj26/skinny") (license license:expat))) + +(define-public mailcatcher + (package + (name "mailcatcher") + (version "0.7.1") + (source + (origin + (method url-fetch) + (uri (rubygems-uri "mailcatcher" version)) + (sha256 + (base32 + "02w1ycyfv7x0sh9799lz7xa65p5qvl5z4pa8a7prb68h2zwkfq0n")))) + (build-system ruby-build-system) + (arguments + ;; Tests require web/assets which is not included in the output. We + ;; might be able to fix this by adding the Git repository to the GEM_PATH + ;; of the tests. See ruby-mysql2. + '(#: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")) + #t)) + (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\"")) + #t))))) + (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 "SMTP server which catches messages to display them 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))) -- cgit 1.4.1