aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/ruby.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/ruby.scm')
-rw-r--r--gnu/packages/ruby.scm55
1 files changed, 55 insertions, 0 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 4570a54e7b..b3e28261e0 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -4077,6 +4077,61 @@ invocation, and source and documentation browsing.")
(home-page "https://pryrepl.org")
(license license:expat)))
+(define-public ruby-single-cov
+ (package
+ (name "ruby-single-cov")
+ (version "1.3.2")
+ (home-page "https://github.com/grosser/single_cov")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference (url home-page)
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "05qdzpcai1p23a120gb9bxkfl4y73k9hicx34ch2lsk31lgi9bl7"))))
+ (build-system ruby-build-system)
+ (arguments
+ '(#:test-target "default"
+ #:phases (modify-phases %standard-phases
+ (replace 'replace-git-ls-files
+ (lambda _
+ (substitute* "single_cov.gemspec"
+ (("`git ls-files lib/ bin/ MIT-LICENSE`")
+ "`find lib/ bin/ MIT-LICENSE -type f | sort`"))
+ #t))
+ (add-before 'check 'remove-version-constraints
+ (lambda _
+ (delete-file "Gemfile.lock")
+ #t))
+ (add-before 'check 'make-files-writable
+ (lambda _
+ ;; Tests need to create local directories and open files
+ ;; with write permissions.
+ (for-each make-file-writable
+ (find-files "specs" #:directories? #t))
+ #t))
+ (add-before 'check 'disable-failing-test
+ (lambda _
+ ;; XXX: This test copies assets from minitest, but can
+ ;; not cope with the files being read-only. Just skip
+ ;; it for now.
+ (substitute* "specs/single_cov_spec.rb"
+ (("it \"complains when coverage is bad\"")
+ "xit \"complains when coverage is bad\""))
+ #t)))))
+ (native-inputs
+ `(("ruby-bump" ,ruby-bump)
+ ("ruby-minitest" ,ruby-minitest)
+ ("ruby-rspec" ,ruby-rspec)
+ ("ruby-simplecov" ,ruby-simplecov)))
+ (synopsis "Code coverage reporting tool")
+ (description
+ "This package provides actionable code coverage reports for Ruby
+projects. It has very little overhead and can be easily integrated with
+development tools to catch coverage problems early.")
+ (license license:expat)))
+
(define-public ruby-guard
(package
(name "ruby-guard")