Subject: [bug#34650] [PATCH] ruby-mailcatcher: Draft

From: Pierre Neidhardt <[email-masked]>
Date: Mon, 25 Feb 2019 16:17:05 +0100

---
 gnu/packages/ruby.scm | 185 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 185 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 6da7109d1..21a00c3ea 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -7683,3 +7683,188 @@ uniquely identify it.")
 serves JavaScript, CoffeeScript, CSS, LESS, Sass, and SCSS.")
     (home-page "https://github.com/rails/sprockets")
     (license license:expat)))
+
+(define-public ruby-eventmachine-mailcatcher
+  (package
+    (inherit ruby-eventmachine)
+    (version "1.0.9.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "eventmachine" version))
+       (sha256
+        (base32
+         "17jr1caa3ggg696dd02g2zqzdjqj9x9q2nl7va82l36f7c5v6k4z"))))
+    (synopsis "ruby-eventmachine for mailcatcher")))
+
+(define-public ruby-rack-mailcatcher
+  (package
+    (inherit ruby-rack)
+    (name "ruby-rack")
+    (version "1.5.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url
+              "https://github.com/rack/rack/")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "09k24li8hp65ybpwmvvyy7ipxrbh62zd3n1qv1jh9kcrrhaihpya"))))
+    (arguments
+     ;; TODO: Fix tests.
+     `(#:tests? #f))))
+
+(define-public ruby-tilt
+  (package
+    (name "ruby-tilt")
+    (version "2.0.9")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "tilt" version))
+       (sha256
+        (base32
+         "0ca4k0clwf0rkvy7726x4nxpjxkpv67w043i39saxgldxd97zmwz"))))
+    (build-system ruby-build-system)
+    (arguments
+     ;; TODO: Fix tests.
+     `(#:tests? #f))
+    (synopsis
+     "Generic interface to multiple Ruby template engines")
+    (description
+     "Generic interface to multiple Ruby template engines")
+    (home-page "http://github.com/rtomayko/tilt/")
+    (license license:expat)))
+
+(define-public ruby-mustermann
+  (package
+    (name "ruby-mustermann")
+    (version "1.0.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "mustermann" version))
+       (sha256
+        (base32
+         "0lycgkmnyy0bf29nnd2zql5a6pcf8sp69g9v4xw0gcfcxgpwp7i1"))))
+    (build-system ruby-build-system)
+    (arguments
+     ;; TODO: Fix tests.
+     `(#:tests? #f))
+    (synopsis
+     "A library implementing patterns that behave like regular expressions.")
+    (description
+     "This package provides a library implementing patterns that behave like regular expressions.")
+    (home-page
+     "https://github.com/sinatra/mustermann")
+    (license license:expat)))
+
+(define-public ruby-sinatra
+  (package
+    (name "ruby-sinatra")
+    (version "2.0.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "sinatra" version))
+       (sha256
+        (base32
+         "1gasgn5f15myv08k10i16p326pchxjsy37pgqfw0xm66kcc5d7ry"))))
+    (build-system ruby-build-system)
+    (propagated-inputs
+     `(("ruby-mustermann" ,ruby-mustermann)
+       ("ruby-rack" ,ruby-rack)
+       ("ruby-rack-protection" ,ruby-rack-protection)
+       ("ruby-tilt" ,ruby-tilt)))
+    (synopsis "DSL for quick web applications creation in Ruby")
+    (description
+     "Sinatra is a DSL for quickly creating web applications in Ruby with
+minimal effort.")
+    (home-page "http://sinatrarb.com/")
+    (license license:expat)))
+
+(define-public ruby-thin
+  (package
+    (name "ruby-thin")
+    (version "1.7.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "thin" version))
+       (sha256
+        (base32
+         "0nagbf9pwy1vg09k6j4xqhbjjzrg5dwzvkn4ffvlj76fsn6vv61f"))))
+    (build-system ruby-build-system)
+    (arguments
+     ;; TODO: Fix tests.
+     `(#:tests? #f))
+    (propagated-inputs
+     `(("ruby-daemons" ,ruby-daemons)
+       ("ruby-eventmachine" ,ruby-eventmachine)
+       ("ruby-rack" ,ruby-rack)))
+    (synopsis "A thin and fast web server")
+    (description
+     "This package provides a thin and fast web server")
+    (home-page "http://code.macournoyer.com/thin/")
+    ;; TODO: License?
+    (license (list #f #f))))
+
+(define-public ruby-skinny
+  (package
+    (name "ruby-skinny")
+    (version "0.2.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "skinny" version))
+       (sha256
+        (base32
+         "1y3yvx88ylgz4d2s1wskjk5rkmrcr15q3ibzp1q88qwzr5y493a9"))))
+    (build-system ruby-build-system)
+    (arguments
+     ;; TODO: Fix tests.
+     `(#:tests? #f))
+    (propagated-inputs
+     `(("ruby-eventmachine" ,ruby-eventmachine)
+       ("ruby-thin" ,ruby-thin)))
+    (synopsis
+     "Simple, upgradable WebSockets for Thin.")
+    (description
+     "Simple, upgradable WebSockets for Thin.")
+    (home-page "http://github.com/sj26/skinny")
+    (license license:expat)))
+
+(define-public ruby-mailcatcher
+  (package
+    (name "ruby-mailcatcher")
+    (version "0.6.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "mailcatcher" version))
+       (sha256
+        (base32
+         "0h6gk8n18i5f651f244al1hscjzl27fpma4vqw0qhszqqpd5p3bx"))))
+    (build-system ruby-build-system)
+    (propagated-inputs
+     `(("ruby-eventmachine" ,ruby-eventmachine)
+       ;; ("ruby-eventmachine" ,ruby-eventmachine-mailcatcher)
+       ("ruby-mail" ,ruby-mail)
+       ("ruby-rack" ,ruby-rack)
+       ;; ("ruby-rack" ,ruby-rack-mailcatcher)
+       ("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 "http://mailcatcher.me")
+    (license license:expat)))
-- 
2.20.1