GNU bug report logs - #44880
[PATCH] gnu: ruby-rubocop: Update to 1.4.2

Previous Next

Package: guix-patches;

Reported by: Tomás Ortín Fernández <tomasortin <at> mailbox.org>

Date: Thu, 26 Nov 2020 09:22:01 UTC

Severity: normal

Tags: patch

Done: Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Tomás Ortín Fernández <tomasortin <at> mailbox.org>
To: 44880 <at> debbugs.gnu.org
Subject: [bug#44880] [PATCH] gnu: ruby-rubocop: Update to 1.4.2.
Date: Fri, 27 Nov 2020 20:05:06 +0100
I'm finding it very difficult to package the updated rubocop from git, so here is a patch with rubocop 1.4.2 packaged from the gem. It was packaged from git because the gem doesn't include tests, but I can't figure out how to make the tests work. I have already asked for help at help-guix, and I'm sending this patch in the meanwhile because the current rubocop version is too outdated to be useful at all. As soon as I have the tests figured out, I will send a patch enabling the tests.

Tomás


* gnu/packages/ruby.scm (ruby-rubocop): Update to 1.4.2, fetch from gem, disable tests
---
gnu/packages/ruby.scm | 51 +++++----------------------------------------------
1 file changed, 5 insertions(+), 46 deletions(-)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 2753403834..eeabedf3d1 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -7052,58 +7052,17 @@ run.")
 (define-public ruby-rubocop
   (package
     (name "ruby-rubocop")
-    (version "0.88.0")
+    (version "1.4.2")
     (source
      (origin
-       (method git-fetch)               ;no tests in distributed gem
-       (uri (git-reference
-             (url "https://github.com/rubocop-hq/rubocop")
-             (commit (string-append "v" version))))
-       (file-name (git-file-name name version))
+       (method url-fetch)
+       (uri (rubygems-uri "rubocop" version))
        (sha256
         (base32
-         "1d06893jp8pd85fvgp5d16vqcf31bafi430v4f4y746ihyvhzz5r"))
-       (patches (search-patches "ruby-rubocop-break-dependency-cycle.patch"))))
+         "1kvzhzhzcdd5bqwjilb0fpp51sqjniww2b0g713n0cvhnlgchn2y"))))
     (build-system ruby-build-system)
     (arguments
-     '(#:test-target "default"
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'remove-problematic-tests
-           ;; These tests depend on Rubocop extensions, which cannot be
-           ;; included as they cause a dependency cycle with Rubocop itself.
-           (lambda _
-             (delete-file "spec/rubocop/config_loader_spec.rb")
-             (substitute* "Gemfile"
-               ((".*'rubocop-performance'.*") "")
-               ((".*'rubocop-rspec'.*") ""))
-             ;; Prevent "Unnecessary disabling of RSpec/* (unknown cop)"
-             ;; errors.
-             (substitute* (find-files "spec/rubocop/cop/" "_spec\\.rb$")
-               (("# (rubocop:(enable|disable) RSpec.*)" _ what)
-                (string-append "# Disabled: " what)))
-             #t))
-         (add-after 'unpack 'disable-bundler
-           (lambda _
-             (substitute* "Rakefile"
-               (("Bundler\\.setup.*") "nil\n"))
-             #t))
-         (replace 'replace-git-ls-files
-           (lambda _
-             (substitute* "rubocop.gemspec"
-               (("`git ls-files(.*)`" _ files)
-                (format #f "`find ~a -type f| sort`" files)))
-             #t))
-         (add-before 'check 'set-home
-           (lambda _
-             (setenv "HOME" (getcwd))
-             #t))
-         (add-before 'check 'make-adoc-files-writable
-           (lambda _
-             (let ((adoc-files (find-files "docs/modules/ROOT/pages"
-                                           "\\.adoc$")))
-               (for-each make-file-writable adoc-files))
-             #t)))))
+     '(#:tests? #f))  ;no tests in distributed gem
     (native-inputs
      `(("ruby-bump" ,ruby-bump)
        ("ruby-pry" ,ruby-pry)





This bug report was last modified 4 years and 142 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.