aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Woodcroft <donttrustben@gmail.com>2018-02-05 12:01:26 +0100
committerChristopher Baines <mail@cbaines.net>2018-05-18 11:54:02 +0100
commit9bd8984f2a68cf5ded7cd1c8e245c0f5b6063cfe (patch)
tree92d2448d058f4f45fe0960f0779caa4f02cfdfed
parent2fb5bf8b9c1cc251d52d4e5d415568cc392e6195 (diff)
downloadguix-9bd8984f2a68cf5ded7cd1c8e245c0f5b6063cfe.tar
guix-9bd8984f2a68cf5ded7cd1c8e245c0f5b6063cfe.tar.gz
gnu: Add ruby-heredoc-unindent.
-rw-r--r--gnu/packages/ruby.scm31
1 files changed, 31 insertions, 0 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index d03999b913..2dc931d874 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -5761,3 +5761,34 @@ percentage, bars of various formats, elapsed time and estimated time remaining.
"Really simple JSON and XML parsing, ripped from Merb and Rails.")
(home-page "http://github.com/jnunemaker/crack")
(license license:expat)))
+
+(define-public ruby-heredoc-unindent
+ (package
+ (name "ruby-heredoc-unindent")
+ (version "1.2.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (rubygems-uri "heredoc_unindent" version))
+ (sha256
+ (base32
+ "14ijr2fsjwhrkjkcaz81d5xnfa4vvgvcflrff83avqw9klm011yw"))))
+ (build-system ruby-build-system)
+ (native-inputs
+ `(("ruby-hoe" ,ruby-hoe)))
+
+ (synopsis
+ "This gem removes common margin from indented strings")
+ (description
+ "This gem removes common margin from indented strings, such as the ones
+produced by indented heredocs. In other words, it strips out leading whitespace
+chars at the beggining of each line, but only as much as the line with the
+smallest margin.
+
+It is acknowledged that many strings defined by heredocs are just code and fact
+is that most parsers are insensitive to indentation. If, however, the strings
+are to be used otherwise, be it for printing or testing, the extra indentation
+will probably be an issue and hence this gem.")
+ (home-page
+ "https://github.com/adrianomitre/heredoc_unindent")
+ (license license:expat)))