From patchwork Sun Jan 27 17:08:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Baines X-Patchwork-Id: 851 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8FF4D16AB7; Sun, 27 Jan 2019 17:09:38 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,UNPARSEABLE_RELAY, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 27C1116AB5 for ; Sun, 27 Jan 2019 17:09:38 +0000 (GMT) Received: from localhost ([127.0.0.1]:48245 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gnnw9-0005Kj-OH for patchwork@mira.cbaines.net; Sun, 27 Jan 2019 12:09:37 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46611) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gnnve-0004xj-AJ for guix-patches@gnu.org; Sun, 27 Jan 2019 12:09:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gnnvd-0006QL-7f for guix-patches@gnu.org; Sun, 27 Jan 2019 12:09:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:48533) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gnnvd-0006Q6-3y for guix-patches@gnu.org; Sun, 27 Jan 2019 12:09:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gnnvc-0001ms-Tw for guix-patches@gnu.org; Sun, 27 Jan 2019 12:09:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#34222] [PATCH 01/15] gnu: ruby-rspec-its: Enable tests. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Jan 2019 17:09:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34222 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 34222@debbugs.gnu.org Received: via spool by 34222-submit@debbugs.gnu.org id=B34222.15486089116724 (code B ref 34222); Sun, 27 Jan 2019 17:09:04 +0000 Received: (at 34222) by debbugs.gnu.org; 27 Jan 2019 17:08:31 +0000 Received: from localhost ([127.0.0.1]:47792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gnnv4-0001kH-K3 for submit@debbugs.gnu.org; Sun, 27 Jan 2019 12:08:30 -0500 Received: from li622-129.members.linode.com ([212.71.249.129]:57978 helo=mira.cbaines.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gnnuv-0001hy-Tj for 34222@debbugs.gnu.org; Sun, 27 Jan 2019 12:08:23 -0500 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 0B18C16AB5 for <34222@debbugs.gnu.org>; Sun, 27 Jan 2019 17:08:21 +0000 (GMT) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 9fe8bf35 for <34222@debbugs.gnu.org>; Sun, 27 Jan 2019 17:08:20 +0000 (UTC) From: Christopher Baines Date: Sun, 27 Jan 2019 17:08:06 +0000 Message-Id: <20190127170820.28937-1-mail@cbaines.net> X-Mailer: git-send-email 2.20.1 In-Reply-To: <87y376ghl0.fsf@cbaines.net> References: <87y376ghl0.fsf@cbaines.net> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Enable the tests, and also tweak the synopsis and description to hopefully be more descriptive. * gnu/packages/ruby.scm (ruby-rspec-its)[source]: Change to GitHub, and add patch. [arguments]: Enabled tests, set the #:test-target to "spec", and add the phases to tweak the Gemfile and rspec-its.gemspec. [native-inputs]: Add bundler, ruby-cucumber and ruby-aruba. [synopsis,description]: Make more explicit and descriptive. --- gnu/packages/ruby.scm | 49 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 59895240f8..b0cf9feb02 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -392,20 +392,55 @@ outcomes of a code example.") (version "1.2.0") (source (origin - (method url-fetch) - (uri (rubygems-uri "rspec-its" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/rspec/rspec-its.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 (base32 - "1pwphny5jawcm1hda3vs9pjv1cybaxy17dc1s75qd7drrvx697p3")))) + "190rz7v4q4wk80fzhr5hknvxx4vb2pywmqr8wc41w2blj9ylzi0f")) + (patches + (list + (origin (method url-fetch) + (uri (string-append + "https://github.com/rspec/rspec-its/commit/" + "bfaab439c7c879f5ef25552f41827891f6308373.patch")) + (file-name "ruby-rspec-its-fix-specs-for-ruby-2.4.patch") + (sha256 + (base32 + "0lnik0kvrpgkakvdb2fmzg22pdlraf6kiidr9sv6rnfyviiqwxgh"))))))) (build-system ruby-build-system) (arguments - `(#:tests? #f)) ; needs cucumber. + `(#:test-target "spec" + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'dont-install-gems-from-gemfile + (lambda _ + (substitute* "Gemfile" + (("rspec rspec-core rspec-expectations rspec-mocks rspec-support") + "")) + #t)) + (add-before 'build 'remove-unnecessary-dependency-versions-from-gemfile + (lambda _ + (substitute* "rspec-its.gemspec" + (("rake.*") "rake'\n") + (("cucumber.*") "cucumber'\n") + (("bundler.*") "bundler'\n") + (("aruba.*") "aruba'\n")) + #t))))) (propagated-inputs `(("ruby-rspec-core" ,ruby-rspec-core) ("ruby-rspec-expectations" ,ruby-rspec-expectations))) - (synopsis "RSpec extension gem for attribute matching") - (description "@code{rspec-its} is an RSpec extension gem for attribute -matching.") + (native-inputs + `(("bundler" ,bundler) + ("ruby-cucumber" ,ruby-cucumber) + ("ruby-aruba" ,ruby-aruba))) + (synopsis "RSpec extension that provides the @code{its} method") + (description + "RSpec::Its provides the its method as a short-hand to specify the expected +value of an attribute. For example, one can use @code{its(:size)\\{should +eq(1)\\}}.") (home-page "https://github.com/rspec/rspec-its") (license license:expat)))