unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCHES] Add ruby-rspec, bundler, and ruby-useragent
@ 2015-05-28  2:16 David Thompson
  2015-05-29 21:07 ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: David Thompson @ 2015-05-28  2:16 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 147 bytes --]

'git send-email' isn't working for me on GuixSD, so below are 6 patches
for adding some new Ruby packages.  Sorry for the unideal email
workflow.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-ruby-rspec-core.patch --]
[-- Type: text/x-patch, Size: 2663 bytes --]

From c077e0fa5d4a42748ad4e282c413e24ced124dcc Mon Sep 17 00:00:00 2001
From: David Thompson <davet@gnu.org>
Date: Wed, 27 May 2015 21:33:17 -0400
Subject: [PATCH 1/6] gnu: Add ruby-rspec-core.

* gnu/packages/ruby.scm (ruby-rspec-support, ruby-rspec-core): New variables.
---
 gnu/packages/ruby.scm | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 42fcc93..ba417a4 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -167,3 +167,51 @@ translation data, custom key/scope separator, custom exception handlers, and
 an extensible architecture with a swappable backend.")
     (home-page "http://github.com/svenfuchs/i18n")
     (license license:expat)))
+
+;; RSpec is the dominant testing library for Ruby projects.  Even RSpec's
+;; dependencies use RSpec for their test suites!  To avoid these circular
+;; dependencies, we disable tests for all of the RSpec-related packages.
+(define ruby-rspec-support
+  (package
+    (name "ruby-rspec-support")
+    (version "3.2.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/rspec/rspec-support/archive/v"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1pvzfrqgy0z0gwmdgjp9f2vz1d9c0cajyzfqj9z8i2ssxnzmj4bv"))))
+    (build-system ruby-build-system)
+    (arguments
+     '(#:tests? #f)) ; avoid dependency cycles
+    (synopsis "RSpec support library")
+    (description "Support utilities for RSpec gems.")
+    (home-page "https://github.com/rspec/rspec-support")
+    (license license:expat)))
+
+(define-public ruby-rspec-core
+  (package
+    (name "ruby-rspec-core")
+    (version "3.2.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/rspec/rspec-core/archive/v"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1clsa4lkh5c9c7xc3xa336ym00ycr67pchpg1bv4y3fz5hvzw8ki"))))
+    (build-system ruby-build-system)
+    (arguments
+     '(#:tests? #f)) ; avoid dependency cycles
+    (propagated-inputs
+     `(("ruby-rspec-support" ,ruby-rspec-support)))
+    (synopsis "RSpec core library")
+    (description "Rspec-core provides the RSpec test runner and example
+groups.")
+    (home-page "https://github.com/rspec/rspec-core")
+    (license license:expat)))
-- 
2.2.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-Add-ruby-rspec-expectations.patch --]
[-- Type: text/x-patch, Size: 2749 bytes --]

From 8218ac9aa4a7134d9f2f19ae3ff16a1f40989136 Mon Sep 17 00:00:00 2001
From: David Thompson <davet@gnu.org>
Date: Wed, 27 May 2015 21:34:47 -0400
Subject: [PATCH 2/6] gnu: Add ruby-rspec-expectations.

* gnu/packages/ruby.scm (ruby-diff-lcs-for-rspec, ruby-rspec-expectations):
  New variables.
---
 gnu/packages/ruby.scm | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index ba417a4..a77b684 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -215,3 +215,52 @@ an extensible architecture with a swappable backend.")
 groups.")
     (home-page "https://github.com/rspec/rspec-core")
     (license license:expat)))
+
+(define ruby-diff-lcs-for-rspec
+  (package
+    (name "ruby-diff-lcs")
+    (version "1.2.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/halostatue/diff-lcs/archive/v"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0kmfz2qdwbfjf97rx27hh9fm39mv3z9avjmvsajqnb5wxj2l5l4s"))))
+    (build-system ruby-build-system)
+    (arguments
+     '(#:tests? #f)) ; avoid dependency cycles
+    (synopsis "Compute the difference between two Enumerable sequences")
+    (description "Diff::LCS computes the difference between two Enumerable
+sequences using the McIlroy-Hunt longest common subsequence (LCS) algorithm.
+It includes utilities to create a simple HTML diff output format and a
+standard diff-like tool.")
+    (home-page "https://github.com/halostatue/diff-lcs")
+    (license license:expat)))
+
+(define-public ruby-rspec-expectations
+  (package
+    (name "ruby-rspec-expectations")
+    (version "3.2.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/rspec/rspec-expectations/archive/v"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0h0rpprbh6h59gmksiyi1b8w6cvcai4wdbkikajwx3w1asxi6f7x"))))
+    (build-system ruby-build-system)
+    (arguments
+     '(#:tests? #f)) ; avoid dependency cycles
+    (propagated-inputs
+     `(("ruby-rspec-support" ,ruby-rspec-support)
+       ("ruby-diff-lcs" ,ruby-diff-lcs-for-rspec)))
+    (synopsis "RSpec expecations library")
+    (description "Rspec-expectations provides a simple API to express expected
+outcomes of a code example.")
+    (home-page "https://github.com/rspec/rspec-expectations")
+    (license license:expat)))
-- 
2.2.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-gnu-Add-ruby-rspec-mocks.patch --]
[-- Type: text/x-patch, Size: 1657 bytes --]

From 23771fa86be95cbb1c6ac66fd22a26705d1b6d0e Mon Sep 17 00:00:00 2001
From: David Thompson <davet@gnu.org>
Date: Wed, 27 May 2015 21:35:43 -0400
Subject: [PATCH 3/6] gnu: Add ruby-rspec-mocks.

* gnu/packages/ruby.scm (ruby-rspec-mocks): New variable.
---
 gnu/packages/ruby.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index a77b684..d519ffc 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -264,3 +264,28 @@ standard diff-like tool.")
 outcomes of a code example.")
     (home-page "https://github.com/rspec/rspec-expectations")
     (license license:expat)))
+
+(define-public ruby-rspec-mocks
+  (package
+    (name "ruby-rspec-mocks")
+    (version "3.2.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/rspec/rspec-mocks/archive/v"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1xzxsg0idxkg7czmjgqq10lcd821ibw1hjzn404sk9j6rw0fbx2g"))))
+    (build-system ruby-build-system)
+    (arguments
+     '(#:tests? #f)) ; avoid dependency cycles
+    (propagated-inputs
+     `(("ruby-rspec-support" ,ruby-rspec-support)
+       ("ruby-diff-lcs" ,ruby-diff-lcs-for-rspec)))
+    (synopsis "RSpec stubbing and mocking library")
+    (description "Rspec-mocks provides RSpec's \"test double\" framework, with
+support for stubbing and mocking.")
+    (home-page "https://github.com/rspec/rspec-mocks")
+    (license license:expat)))
-- 
2.2.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: 0004-gnu-Add-ruby-rspec.patch --]
[-- Type: text/x-patch, Size: 1748 bytes --]

From 6bfb4946d819e9771ac1fa5879f01f3362dfcee6 Mon Sep 17 00:00:00 2001
From: David Thompson <davet@gnu.org>
Date: Wed, 27 May 2015 21:36:24 -0400
Subject: [PATCH 4/6] gnu: Add ruby-rspec.

* gnu/packages/ruby.scm (ruby-rspec): New variable.
---
 gnu/packages/ruby.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index d519ffc..a738d3c 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -289,3 +289,30 @@ outcomes of a code example.")
 support for stubbing and mocking.")
     (home-page "https://github.com/rspec/rspec-mocks")
     (license license:expat)))
+
+(define-public ruby-rspec
+  (package
+    (name "ruby-rspec")
+    (version "3.2.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/rspec/rspec/archive/v"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1jg38dbaknsdhiav5vnrwfccg524fwcg6sq1715441vx1xl6p54q"))))
+    (build-system ruby-build-system)
+    (arguments
+     '(#:tests? #f)) ; avoid dependency cycles
+    (propagated-inputs
+     `(("ruby-rspec-core" ,ruby-rspec-core)
+       ("ruby-rspec-mocks" ,ruby-rspec-mocks)
+       ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
+    (synopsis "Behavior-driven development framework for Ruby")
+    (description "RSpec is a behavior-driven development (BDD) framework for
+Ruby.  This meta-package includes the RSpec test runner, along with the
+expectations and mocks frameworks.")
+    (home-page "http://rspec.info/")
+    (license license:expat)))
-- 
2.2.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #6: 0005-gnu-Add-bundler.patch --]
[-- Type: text/x-patch, Size: 1604 bytes --]

From 2cc36edb761976fcd4c2a5f5c076fc2d12512cbd Mon Sep 17 00:00:00 2001
From: David Thompson <davet@gnu.org>
Date: Wed, 27 May 2015 21:37:06 -0400
Subject: [PATCH 5/6] gnu: Add bundler.

* gnu/packages/ruby.scm (bundler): New variable.
---
 gnu/packages/ruby.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index a738d3c..3d23e74 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -316,3 +316,26 @@ Ruby.  This meta-package includes the RSpec test runner, along with the
 expectations and mocks frameworks.")
     (home-page "http://rspec.info/")
     (license license:expat)))
+
+;; Bundler is yet another source of circular dependencies, so we must disable
+;; its test suite as well.
+(define-public bundler
+  (package
+    (name "bundler")
+    (version "1.9.9")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/bundler/bundler/archive/v"
+                                  version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "08flx3n9hb3yz8mm5k16cdz0sb7g774f6vxn6gc3wfh5la83vfyx"))))
+    (build-system ruby-build-system)
+    (arguments
+     '(#:tests? #f)) ; avoid dependency cycles
+    (synopsis "Ruby gem bundler")
+    (description "Bundler automatically downloads and installs a list of gems
+specified in a \"Gemfile\", as well as their dependencies.")
+    (home-page "http://bundler.io/")
+    (license license:expat)))
-- 
2.2.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #7: 0006-gnu-Add-ruby-useragent.patch --]
[-- Type: text/x-patch, Size: 1526 bytes --]

From 7d1eb9189646aa9e206c5f6e8c4a4151ad727072 Mon Sep 17 00:00:00 2001
From: David Thompson <davet@gnu.org>
Date: Wed, 27 May 2015 21:38:28 -0400
Subject: [PATCH 6/6] gnu: Add ruby-useragent.

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

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 3d23e74..9943de7 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -339,3 +339,28 @@ expectations and mocks frameworks.")
 specified in a \"Gemfile\", as well as their dependencies.")
     (home-page "http://bundler.io/")
     (license license:expat)))
+
+(define-public ruby-useragent
+  (package
+    (name "ruby-useragent")
+    (version "0.13.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/gshutler/useragent/archive/v"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1hj00fw06i0y3rwxxhxmnrqxhpnffv4zfqx2sqqpc5qc4fdvd2x9"))))
+    (build-system ruby-build-system)
+    (arguments
+     '(#:test-target "spec"))
+    (native-inputs
+     `(("ruby-rspec" ,ruby-rspec)
+       ("bundler" ,bundler)))
+    (synopsis "HTTP user agent parser for Ruby")
+    (description "UserAgent is a Ruby library that parses and compares HTTP
+User Agents.")
+    (home-page "https://github.com/gshutler/useragent")
+    (license license:expat)))
-- 
2.2.1


[-- Attachment #8: Type: text/plain, Size: 38 bytes --]


-- 
David Thompson
GPG Key: 0FF1D807

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-05-30 22:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-28  2:16 [PATCHES] Add ruby-rspec, bundler, and ruby-useragent David Thompson
2015-05-29 21:07 ` Ludovic Courtès
2015-05-30  0:27   ` Thompson, David
2015-05-30 21:02     ` Pjotr Prins
2015-05-30 21:57       ` Thompson, David
2015-05-30 22:23         ` Pjotr Prins

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).