mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-28 23:32:24 -05:00
gnu: ruby-rubocop: Update to 1.10.0.
* gnu/packages/ruby.scm (ruby-rubocop): Update to 1.10.0. [source]: Remove patch. [arguments]: Remove custom 'remove-problematic-tests, 'disable-bundler, 'replace-git-ls-files phases. Add custom 'check phase. [native-inputs]: Add ruby-memory-profiler, ruby-rake, ruby-rubocop-minimal, ruby-rubocop-performance-minimal, ruby-rubocop-rspec-minimal, ruby-simplecov, ruby-stackprof. Replace ruby-webmock-2 with ruby-webmock. (ruby-rubocop-minimal, ruby-rubocop-performance-minimal, ruby-rubocop-rspec-minimal): New variables. * gnu/packages/patches/ruby-rubocop-break-dependency-cycle.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it.
This commit is contained in:
parent
a4d61297e2
commit
301d1bacc1
3 changed files with 49 additions and 131 deletions
|
@ -1597,7 +1597,6 @@ dist_patch_DATA = \
|
|||
%D%/packages/patches/rnp-disable-ruby-rnp-tests.patch \
|
||||
%D%/packages/patches/rnp-unbundle-googletest.patch \
|
||||
%D%/packages/patches/ruby-rack-ignore-failing-test.patch \
|
||||
%D%/packages/patches/ruby-rubocop-break-dependency-cycle.patch\
|
||||
%D%/packages/patches/ruby-sanitize-system-libxml.patch \
|
||||
%D%/packages/patches/ruby-tzinfo-data-ignore-broken-test.patch\
|
||||
%D%/packages/patches/runc-CVE-2019-5736.patch \
|
||||
|
|
|
@ -1,101 +0,0 @@
|
|||
From ff3f00b7f33332ebf1c3c05abc4a781684775b3c Mon Sep 17 00:00:00 2001
|
||||
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||
Date: Tue, 14 Jul 2020 11:50:12 -0400
|
||||
Subject: [PATCH] config: Drop rubocop-performance, rubocop-rspec requirements.
|
||||
|
||||
This patch removes Rubocop extensions from Rubocop's closure to break
|
||||
a dependency cycle with itself.
|
||||
|
||||
* .rubocop.yml: Remove rubocop-performance and rubocop-rspec and their
|
||||
corresponding directives.
|
||||
* .rubocop_todo.yml: Likewise.
|
||||
---
|
||||
.rubocop.yml | 15 ---------------
|
||||
.rubocop_todo.yml | 44 --------------------------------------------
|
||||
2 files changed, 59 deletions(-)
|
||||
|
||||
diff --git a/.rubocop.yml b/.rubocop.yml
|
||||
index 4f05d5be2..f12ef7c06 100644
|
||||
--- a/.rubocop.yml
|
||||
+++ b/.rubocop.yml
|
||||
@@ -3,8 +3,6 @@
|
||||
inherit_from: .rubocop_todo.yml
|
||||
require:
|
||||
- rubocop/cop/internal_affairs
|
||||
- - rubocop-performance
|
||||
- - rubocop-rspec
|
||||
|
||||
AllCops:
|
||||
NewCops: enable
|
||||
@@ -106,16 +104,3 @@ Metrics/ClassLength:
|
||||
Metrics/ModuleLength:
|
||||
Exclude:
|
||||
- 'spec/**/*.rb'
|
||||
-
|
||||
-RSpec/FilePath:
|
||||
- Exclude:
|
||||
- - spec/rubocop/formatter/junit_formatter_spec.rb
|
||||
-
|
||||
-RSpec/PredicateMatcher:
|
||||
- EnforcedStyle: explicit
|
||||
-
|
||||
-RSpec/MessageSpies:
|
||||
- EnforcedStyle: receive
|
||||
-
|
||||
-RSpec/NestedGroups:
|
||||
- Max: 7
|
||||
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
|
||||
index 3f72042d1..fa637cd42 100644
|
||||
--- a/.rubocop_todo.yml
|
||||
+++ b/.rubocop_todo.yml
|
||||
@@ -24,47 +24,3 @@ Metrics/MethodLength:
|
||||
# Configuration parameters: CountComments.
|
||||
Metrics/ModuleLength:
|
||||
Max: 132
|
||||
-
|
||||
-# Offense count: 10
|
||||
-RSpec/AnyInstance:
|
||||
- Exclude:
|
||||
- - 'spec/rubocop/cli_spec.rb'
|
||||
- - 'spec/rubocop/cop/lint/duplicate_methods_spec.rb'
|
||||
- - 'spec/rubocop/cop/team_spec.rb'
|
||||
- - 'spec/rubocop/target_finder_spec.rb'
|
||||
-
|
||||
-# Offense count: 981
|
||||
-# Configuration parameters: Prefixes.
|
||||
-# Prefixes: when, with, without
|
||||
-RSpec/ContextWording:
|
||||
- Enabled: false
|
||||
-
|
||||
-# Offense count: 3810
|
||||
-# Configuration parameters: Max.
|
||||
-RSpec/ExampleLength:
|
||||
- Enabled: false
|
||||
-
|
||||
-# Offense count: 38
|
||||
-RSpec/ExpectOutput:
|
||||
- Exclude:
|
||||
- - 'spec/rubocop/cli/cli_auto_gen_config_spec.rb'
|
||||
- - 'spec/rubocop/cli/cli_options_spec.rb'
|
||||
- - 'spec/rubocop/config_spec.rb'
|
||||
- - 'spec/rubocop/cop/cop_spec.rb'
|
||||
- - 'spec/rubocop/formatter/disabled_config_formatter_spec.rb'
|
||||
- - 'spec/rubocop/formatter/formatter_set_spec.rb'
|
||||
- - 'spec/rubocop/options_spec.rb'
|
||||
- - 'spec/rubocop/rake_task_spec.rb'
|
||||
- - 'spec/rubocop/result_cache_spec.rb'
|
||||
- - 'spec/rubocop/target_finder_spec.rb'
|
||||
-
|
||||
-# Offense count: 434
|
||||
-RSpec/MultipleExpectations:
|
||||
- Max: 25
|
||||
-
|
||||
-# Offense count: 5
|
||||
-RSpec/SubjectStub:
|
||||
- Exclude:
|
||||
- - 'spec/rubocop/config_spec.rb'
|
||||
- - 'spec/rubocop/formatter/json_formatter_spec.rb'
|
||||
- - 'spec/rubocop/formatter/progress_formatter_spec.rb'
|
||||
--
|
||||
2.27.0
|
||||
|
|
@ -1584,6 +1584,16 @@ (define-public ruby-rubocop-rspec
|
|||
(home-page "https://github.com/rubocop-hq/rubocop-rspec")
|
||||
(license license:expat)))
|
||||
|
||||
(define-public ruby-rubocop-rspec-minimal
|
||||
(hidden-package
|
||||
(package
|
||||
(inherit ruby-rubocop-rspec)
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments ruby-rubocop-rspec)
|
||||
((#:tests? _ #f) #f)))
|
||||
(propagated-inputs '())
|
||||
(native-inputs '()))))
|
||||
|
||||
(define-public ruby-rubocop-performance
|
||||
(package
|
||||
(name "ruby-rubocop-performance")
|
||||
|
@ -1625,6 +1635,16 @@ (define-public ruby-rubocop-performance
|
|||
(home-page "https://docs.rubocop.org/rubocop-performance/")
|
||||
(license license:expat)))
|
||||
|
||||
(define-public ruby-rubocop-performance-minimal
|
||||
(hidden-package
|
||||
(package
|
||||
(inherit ruby-rubocop-performance)
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments ruby-rubocop-performance)
|
||||
((#:tests? _ #f) #f)))
|
||||
(propagated-inputs '())
|
||||
(native-inputs '()))))
|
||||
|
||||
(define-public ruby-gimme
|
||||
(let ((revision "1")
|
||||
(commit "4e71f0236f1271871916dd403261d26533db34c0"))
|
||||
|
@ -7270,7 +7290,7 @@ (define-public ruby-test-queue
|
|||
(define-public ruby-rubocop
|
||||
(package
|
||||
(name "ruby-rubocop")
|
||||
(version "0.88.0")
|
||||
(version "1.10.0")
|
||||
(source
|
||||
(origin
|
||||
(method git-fetch) ;no tests in distributed gem
|
||||
|
@ -7280,42 +7300,25 @@ (define-public ruby-rubocop
|
|||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"1d06893jp8pd85fvgp5d16vqcf31bafi430v4f4y746ihyvhzz5r"))
|
||||
(patches (search-patches "ruby-rubocop-break-dependency-cycle.patch"))))
|
||||
"0wjw9vpzr4f3nf1zf010bag71w4hdi0haybdn7r5rlmw45pmim29"))))
|
||||
(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))
|
||||
;; Rubocop depends on itself for tests, directly and indirectly. By
|
||||
;; regenerating the TODO list we test rubocop against itself and
|
||||
;; forgo adjusting the test suite to our environment each release.
|
||||
(replace 'check
|
||||
(lambda* (#:key tests? #:allow-other-keys)
|
||||
(when tests?
|
||||
(make-file-writable ".rubocop_todo.yml")
|
||||
(invoke "./exe/rubocop" "--auto-gen-config"))
|
||||
#t))
|
||||
(add-before 'check 'make-adoc-files-writable
|
||||
(lambda _
|
||||
(let ((adoc-files (find-files "docs/modules/ROOT/pages"
|
||||
|
@ -7324,10 +7327,17 @@ (define-public ruby-rubocop
|
|||
#t)))))
|
||||
(native-inputs
|
||||
`(("ruby-bump" ,ruby-bump)
|
||||
("ruby-memory-profiler" ,ruby-memory-profiler)
|
||||
("ruby-pry" ,ruby-pry)
|
||||
("ruby-rake" ,ruby-rake)
|
||||
("ruby-rspec" ,ruby-rspec)
|
||||
("ruby-rubocop-minimal" ,ruby-rubocop-minimal)
|
||||
("ruby-rubocop-performance-minimal" ,ruby-rubocop-performance-minimal)
|
||||
("ruby-rubocop-rspec-minimal" ,ruby-rubocop-rspec-minimal)
|
||||
("ruby-simplecov" ,ruby-simplecov)
|
||||
("ruby-stackprof" ,ruby-stackprof)
|
||||
("ruby-test-queue" ,ruby-test-queue)
|
||||
("ruby-webmock" ,ruby-webmock-2)
|
||||
("ruby-webmock" ,ruby-webmock)
|
||||
("ruby-yard" ,ruby-yard)))
|
||||
(propagated-inputs
|
||||
`(("ruby-parallel" ,ruby-parallel)
|
||||
|
@ -7345,6 +7355,16 @@ (define-public ruby-rubocop
|
|||
(home-page "https://github.com/rubocop-hq/rubocop")
|
||||
(license license:expat)))
|
||||
|
||||
(define-public ruby-rubocop-minimal
|
||||
(hidden-package
|
||||
(package
|
||||
(inherit ruby-rubocop)
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments ruby-rubocop)
|
||||
((#:tests? _ #f) #f)))
|
||||
(propagated-inputs '())
|
||||
(native-inputs '()))))
|
||||
|
||||
(define-public ruby-contest
|
||||
(package
|
||||
(name "ruby-contest")
|
||||
|
|
Loading…
Reference in a new issue