From: Tomás Ortín Fernández via Guix-patches via <guix-patches@gnu.org>
To: 44880@debbugs.gnu.org
Subject: [bug#44880] [PATCH] gnu: ruby-rubocop: Update to 1.4.2.
Date: Fri, 27 Nov 2020 20:05:06 +0100 [thread overview]
Message-ID: <3298b708-515f-5ef2-3198-6395749da8d6@mailbox.org> (raw)
In-Reply-To: <31afd594-481c-38ba-8929-26b74693eb73@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(-)
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)
next prev parent reply other threads:[~2020-11-27 19:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-26 9:21 [bug#44880] [PATCH] gnu: ruby-rubocop: Update to 1.4.2 Tomás Ortín Fernández via Guix-patches via
2020-11-27 14:56 ` [bug#44880] Mistake Tomás Ortín Fernández via Guix-patches via
2020-11-27 19:05 ` Tomás Ortín Fernández via Guix-patches via [this message]
2020-12-04 19:58 ` [bug#44880] [PATCH] gnu: ruby-rubocop: Update to 1.4.2 Leo Famulari
2021-02-25 22:50 ` Björn Höfling
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3298b708-515f-5ef2-3198-6395749da8d6@mailbox.org \
--to=guix-patches@gnu.org \
--cc=44880@debbugs.gnu.org \
--cc=tomasortin@mailbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.