guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCHES] Add ruby-rspec, bundler, and ruby-useragent


From: David Thompson
Subject: [PATCHES] Add ruby-rspec, bundler, and ruby-useragent
Date: Wed, 27 May 2015 22:16:25 -0400
User-agent: Notmuch/0.19 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-unknown-linux-gnu)

'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.

>From c077e0fa5d4a42748ad4e282c413e24ced124dcc Mon Sep 17 00:00:00 2001
From: David Thompson <address@hidden>
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

>From 8218ac9aa4a7134d9f2f19ae3ff16a1f40989136 Mon Sep 17 00:00:00 2001
From: David Thompson <address@hidden>
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

>From 23771fa86be95cbb1c6ac66fd22a26705d1b6d0e Mon Sep 17 00:00:00 2001
From: David Thompson <address@hidden>
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

>From 6bfb4946d819e9771ac1fa5879f01f3362dfcee6 Mon Sep 17 00:00:00 2001
From: David Thompson <address@hidden>
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

>From 2cc36edb761976fcd4c2a5f5c076fc2d12512cbd Mon Sep 17 00:00:00 2001
From: David Thompson <address@hidden>
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

>From 7d1eb9189646aa9e206c5f6e8c4a4151ad727072 Mon Sep 17 00:00:00 2001
From: David Thompson <address@hidden>
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

-- 
David Thompson
GPG Key: 0FF1D807

reply via email to

[Prev in Thread] Current Thread [Next in Thread]