aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/packages/ruby.scm36
1 files changed, 36 insertions, 0 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 7485d09478..884da90f26 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -5382,3 +5382,39 @@ percentage, bars of various formats, elapsed time and estimated time remaining.
(home-page
"https://github.com/thekompanee/fuubar")
(license license:expat)))
+
+;; Seems to work except for 2 rspec errors already fixed upstream
+;; https://github.com/egonSchiele/contracts.ruby/commit/c1f22bfc6b28125b55d42a33ca3e05f15e82d6f2.diff
+;; might need to add that as a patch when adding to guix
+(define-public ruby-contracts
+ (package
+ (name "ruby-contracts")
+ (version "0.12.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (rubygems-uri "contracts" version))
+ (sha256
+ (base32
+ "0xszv56p58q7da8agc4dsnw8x46gnh6ahbag5gdmvbxjgml03mdl"))))
+ (build-system ruby-build-system)
+ (arguments
+ `(#:tests? #f ; enable these when adding TO GUIX!!!!
+ #:test-target "spec"
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-rakefile
+ (lambda _
+ (substitute* "Rakefile"
+ ((".*rubocop.*") "")
+ ((".*RuboCop.*") ""))
+ #t)))))
+ (native-inputs
+ `(("ruby-rspec" ,ruby-rspec)))
+ (synopsis
+ "This library provides contracts for Ruby. Contracts let you clearly express how your code behaves, and free you from writing tons of boilerplate, defensive code.")
+ (description
+ "This library provides contracts for Ruby. Contracts let you clearly express how your code behaves, and free you from writing tons of boilerplate, defensive code.")
+ (home-page
+ "http://github.com/egonSchiele/contracts.ruby")
+ (license #f)))