[PATCH] gnu: ruby-rubocop: Update to 1.4.2

  • Done
  • quality assurance status badge
Details
3 participants
  • Björn Höfling
  • Leo Famulari
  • Tomás Ortín Fernández
Owner
unassigned
Submitted by
Tomás Ortín Fernández
Severity
normal
T
T
Tomás Ortín Fernández wrote on 26 Nov 2020 10:21
(address . guix-patches@gnu.org)
31afd594-481c-38ba-8929-26b74693eb73@mailbox.org
* gnu/packages/ruby.scm (ruby-rubocop): Update to 1.4.2
---
gnu/packages/ruby.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 2753403834..f2a3e3b3f9 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -7052,7 +7052,7 @@ 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
@@ -7062,7 +7062,7 @@ run.")
(file-name (git-file-name name version))
(sha256
(base32
- "1d06893jp8pd85fvgp5d16vqcf31bafi430v4f4y746ihyvhzz5r"))
+ "1kvzhzhzcdd5bqwjilb0fpp51sqjniww2b0g713n0cvhnlgchn2y"))
(patches (search-patches "ruby-rubocop-break-dependency-cycle.patch"))))
(build-system ruby-build-system)
(arguments
T
T
Tomás Ortín Fernández wrote on 27 Nov 2020 15:56
Mistake
(address . 44880@debbugs.gnu.org)
c5a4ca8b-70bc-9ad3-9ab4-74a5705c13d4@mailbox.org
It seems I made a mistake with the patch. I used the gem hash, but this uses the github source. I didn't check it well enough, sorry: I will package it properly and send the updated patch.

Tomás
T
T
Tomás Ortín Fernández wrote on 27 Nov 2020 20:05
[PATCH] gnu: ruby-rubocop: Update to 1.4.2.
(address . 44880@debbugs.gnu.org)
3298b708-515f-5ef2-3198-6395749da8d6@mailbox.org
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(-)

Toggle diff (68 lines)
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)
L
L
Leo Famulari wrote on 4 Dec 2020 20:58
(name . Tomás Ortín Fernández via Guix-patches via)(address . guix-patches@gnu.org)(address . 44880@debbugs.gnu.org)
X8qU6bHRX4m1k1NB@jasmine.lan
On Fri, Nov 27, 2020 at 08:05:06PM +0100, Tom�s Ort�n Fern�ndez via Guix-patches via wrote:
Toggle quote (4 lines)
> 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.
>
> * gnu/packages/ruby.scm (ruby-rubocop): Update to 1.4.2, fetch from gem, disable tests

Thanks! Did you check if the packages that depend on ruby-rubocop still
work after this upgrade? You can get the list of such packages with
`guix refresh --list-dependent ruby-rubocop` and then try building each
one.
B
B
Björn Höfling wrote on 25 Feb 2021 23:50
Re: [bug#44880] [PATCH] gnu: ruby-rubocop: Update to 1.4.2
(name . Tomás Ortín Fernández via Guix-patches via)(address . guix-patches@gnu.org)
20210225235045.43337ef9@alma-ubu.fritz.box
Hi Tomás,

On Thu, 26 Nov 2020 10:21:18 +0100
Tomás Ortín Fernández via Guix-patches via <guix-patches@gnu.org> wrote:

Toggle quote (2 lines)
> * gnu/packages/ruby.scm (ruby-rubocop): Update to 1.4.2

In the meantime, ruby-rubocop was updated to 1.10.0 in commit

301d1bacc1f33ed5f2f546488c3a1dbc66cc3f4f

Closing this patch.

Björn
-----BEGIN PGP SIGNATURE-----

iF0EAREKAB0WIQQiGUP0np8nb5SZM4K/KGy2WT5f/QUCYDgpxQAKCRC/KGy2WT5f
/etTAKCszkXWAhwx6VNmj6Y4Mjty0SupvACfe2ANA7ZmH4AY/ja7Cr7DfXUcArg=
=9hTM
-----END PGP SIGNATURE-----


?