aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Woodcroft <donttrustben@gmail.com>2018-02-05 11:41:28 +0100
committerChristopher Baines <mail@cbaines.net>2018-12-28 12:29:10 +0000
commit46ec511b310a4b987eb7a559615c3655f21b7d60 (patch)
tree78cd09ab7eea0174ccdf9ccd4982ea8c2c7503bc
parent8e75a369b93576e29923c8c3aad9740e79c9394d (diff)
downloadguix-46ec511b310a4b987eb7a559615c3655f21b7d60.tar
guix-46ec511b310a4b987eb7a559615c3655f21b7d60.tar.gz
gnu: Add ruby-cucumber and ruby-aruba.
These packages are mutually dependant.
-rw-r--r--gnu/packages/ruby.scm132
1 files changed, 132 insertions, 0 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index cd0a815ce5..8b1bebdbcf 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -8144,3 +8144,135 @@ but it can function as a stand-alone templating engine.")
"Creates a version constraint of supported Rubies,suitable for a gemspec file")
(home-page "https://github.com/e2/ruby_dep")
(license license:expat)))
+
+(define-public ruby-aruba
+ (package
+ (name "ruby-aruba")
+ (version "0.14.6")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (rubygems-uri "aruba" version))
+ (sha256
+ (base32
+ "11v7d4d3q1as3w5md22q3vilnmqw1icp7sg955ylfzmxjc07pdby"))))
+ (build-system ruby-build-system)
+ (arguments
+ `(#:tests? #f ; There are 3 test failures to do with running commands, not
+ ; sure what the issue is.
+ #:test-target "spec"
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'fix-gemfile
+ (lambda _
+ (substitute* "Gemfile"
+ ((".*byebug.*") "\n")
+ ((".*pry.*") "\n")
+ ((".*yaml.*") "\n")
+ ((".*bcat.*") "\n")
+ ((".*kramdown.*") "\n")
+ ((".*fuubar.*") "\n")
+ ((".*rubocop.*") "\n")
+ ((".*cucumber-pro.*") "\n")
+ ((".*license_finder.*") "\n")
+ ((".*relish.*") "\n")
+ )
+ (substitute* "spec/spec_helper.rb"
+ ((".*simplecov.*") "")
+ (("^SimpleCov.*") ""))
+ #t))
+ (add-before 'check 'set-home
+ (lambda _ (setenv "HOME" "/tmp") #t)))))
+ (native-inputs
+ `(("bundler" ,bundler)
+ ("ruby-simplecov" ,ruby-simplecov)
+ ("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
+ "Extension for popular TDD and BDD frameworks like \"Cucumber\", \"RSpec\" and \"Minitest\" to make testing commandline applications meaningful, easy and fun.")
+ (description
+ "Extension for popular TDD and BDD frameworks like \"Cucumber\", \"RSpec\" and \"Minitest\" to make testing commandline applications meaningful, easy and fun.")
+ (home-page "http://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 "2.4.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (rubygems-uri "cucumber" version))
+ (sha256
+ (base32
+ "1k4j31a93r0zhvyq2mm2k8irppbvkzbsg44r3mf023959v18fzih"))))
+ (build-system ruby-build-system)
+ (arguments
+ '(#:test-target "spec"
+ ;; TODO: Test failure as documented at
+ ;; https://github.com/cucumber/cucumber/issues/58
+ ;;
+ ;; Cucumber::Formatter::Html when writing the report to a file with a
+ ;; step that embeds a snapshot converts the snapshot path to a relative
+ ;; path
+ ;;
+ ;; Failure/Error: expect(@out).to
+ ;; receive(:respond_to?).with(:path).and_return(true)
+ ;;
+ ;; (#<StringIO:0x00005555570887a0>).respond_to?(:path)
+ ;; expected: 1 time with arguments: (:path)
+ ;; received: 3 times with arguments: (:path)
+ ;; # ./spec/cucumber/formatter/html_spec.rb:35
+ #:tests? #f))
+ (propagated-inputs
+ `(("ruby-builder" ,ruby-builder)
+ ("ruby-cucumber-core" ,ruby-cucumber-core-1)
+ ("ruby-cucumber-wire" ,ruby-cucumber-wire)
+ ("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
+ "Behaviour Driven Development with elegance and joy")
+ (description
+ "Behaviour Driven Development with elegance and joy")
+ (home-page "http://cukes.info")
+ (license license:asl2.0)))
+
+(define ruby-cucumber-without-tests
+ (package (inherit ruby-cucumber)
+ (arguments
+ `(#:tests? #f))
+ (native-inputs
+ `())))