From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:49074) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gniyV-0002p3-Fm for guix-patches@gnu.org; Sun, 27 Jan 2019 06:51:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gnixG-00064R-3h for guix-patches@gnu.org; Sun, 27 Jan 2019 06:50:30 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:47775) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gnix0-0005zC-Rc for guix-patches@gnu.org; Sun, 27 Jan 2019 06:50:16 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gnix0-0000Di-Ni for guix-patches@gnu.org; Sun, 27 Jan 2019 06:50:10 -0500 Subject: [bug#34217] [PATCH 11/11] gnu: Add ruby-cucumber and ruby-aruba. Resent-Message-ID: From: Christopher Baines Date: Sun, 27 Jan 2019 11:49:56 +0000 Message-Id: <20190127114956.26570-11-mail@cbaines.net> In-Reply-To: <20190127114956.26570-1-mail@cbaines.net> References: <87zhrmgy0x.fsf@cbaines.net> <20190127114956.26570-1-mail@cbaines.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 34217@debbugs.gnu.org These packages are mutually dependant, so I've put them in one commit. * gnu/packages/ruby.scm (ruby-aruba, ruby-cucumber): New variables. --- gnu/packages/ruby.scm | 136 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index e507c816c8..59895240f8 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -32,6 +32,7 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) #:use-module (gnu packages base) + #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages databases) #:use-module (gnu packages dbm) @@ -3795,6 +3796,141 @@ It is intended be used by all Cucumber implementations to parse (home-page "https://github.com/cucumber-attic/gherkin") (license license:expat))) +(define-public ruby-aruba + (package + (name "ruby-aruba") + (version "0.14.7") + (source + (origin + (method url-fetch) + (uri (rubygems-uri "aruba" version)) + (sha256 + (base32 + "0x27352n15dsyf5ak246znfawbrm502q15r4msjw3cis17jlcy1l")))) + (build-system ruby-build-system) + (arguments + '(;; TODO: There are a few test failures + ;; 357 examples, 7 failures + #:tests? #f + #:test-target "spec" + #:phases + (modify-phases %standard-phases + (add-before 'check 'remove-unnecessary-dependencies + (lambda _ + (substitute* "Gemfile" + ((".*byebug.*") "\n") + ((".*pry.*") "\n") + ((".*yaml.*") "\n") + ((".*bcat.*") "\n") + ((".*kramdown.*") "\n") + ((".*rubocop.*") "\n") + ((".*cucumber-pro.*") "\n") + ((".*cucumber.*") "\n") + ((".*license_finder.*") "\n") + ((".*rake.*") "gem 'rake'\n") + ((".*simplecov.*") "\n") + ((".*relish.*") "\n")) + (substitute* "spec/spec_helper.rb" + ((".*simplecov.*") "") + (("^SimpleCov.*") "")) + (substitute* "aruba.gemspec" + (("spec\\.add\\_runtime\\_dependency 'cucumber'.*") + "spec.add_runtime_dependency 'cucumber'")) + #t)) + (add-before 'check 'set-home + (lambda _ (setenv "HOME" "/tmp") #t))))) + (native-inputs + `(("bundler" ,bundler) + ("ruby-rspec" ,ruby-rspec) + ("ruby-fuubar" ,ruby-fuubar))) + (propagated-inputs + `(("ruby-childprocess" ,ruby-childprocess) + ("ruby-contracts" ,ruby-contracts) + ("ruby-cucumber" ,ruby-cucumber) + ("ruby-ffi" ,ruby-ffi) + ("ruby-rspec-expectations" ,ruby-rspec-expectations) + ("ruby-thor" ,ruby-thor))) + (synopsis "Test command-line applications with Cucumber, RSpec or Minitest") + (description + "Aruba is an extension for Cucumber, RSpec and Minitest for testing +command-line applications. It supports applications written in any +language.") + (home-page "https://github.com/cucumber/aruba") + (license license:expat))) + +;; A version of ruby-aruba without tests run so that circular dependencies can +;; be avoided. +(define ruby-aruba-without-tests + (package + (inherit ruby-aruba) + (arguments '(#:tests? #f)) + (propagated-inputs + (map (lambda (input) + (if (string=? (car input) "ruby-cucumber") + `("ruby-cucumber" ,ruby-cucumber-without-tests) + input)) + (package-propagated-inputs ruby-aruba))) + (native-inputs '()))) + +(define-public ruby-cucumber + (package + (name "ruby-cucumber") + (version "3.1.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/cucumber/cucumber-ruby.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0764wp2cjg60qa3l69q1dxda5g06a01n5w92szqbf89d2hgl47n3")))) + (build-system ruby-build-system) + (arguments + '(#:test-target "spec" + #:phases + (modify-phases %standard-phases + ;; Don't run or require rubocop, the code linting tool, as this is a + ;; bit unnecessary. + (add-after 'unpack 'dont-run-rubocop + (lambda _ + (substitute* "Rakefile" + ((".*rubocop/rake\\_task.*") "") + ((".*RuboCop.*") "")) + #t))))) + (propagated-inputs + `(("ruby-builder" ,ruby-builder) + ("ruby-cucumber-core" ,ruby-cucumber-core) + ("ruby-cucumber-wire" ,ruby-cucumber-wire) + ("ruby-cucumber-expressions" ,ruby-cucumber-expressions) + ("ruby-diff-lcs" ,ruby-diff-lcs) + ("ruby-gherkin" ,ruby-gherkin) + ("ruby-multi-json" ,ruby-multi-json) + ("ruby-multi-test" ,ruby-multi-test))) + (native-inputs + `(("bundler" ,bundler) + ;; Use a untested version of aruba, to avoid a circular dependency, as + ;; ruby-aruba depends on ruby-cucumber. + ("ruby-aruba", ruby-aruba-without-tests) + ("ruby-rspec" ,ruby-rspec) + ("ruby-pry" ,ruby-pry) + ("ruby-nokogiri" ,ruby-nokogiri))) + (synopsis "Describe automated tests in plain language") + (description + "Cucumber is a tool for running automated tests written in plain +language. It's designed to support a Behaviour Driven Development (BDD) +software development workflow.") + (home-page "https://cucumber.io/") + (license license:expat))) + +(define ruby-cucumber-without-tests + (package (inherit ruby-cucumber) + (arguments + '(#:tests? #f)) + (native-inputs + '()))) + (define-public ruby-cucumber-core (package (name "ruby-cucumber-core") -- 2.20.1