[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#62196] [PATCH 028/223] gnu: ruby-thor: Update to 1.2.1.
From: |
Maxim Cournoyer |
Subject: |
[bug#62196] [PATCH 028/223] gnu: ruby-thor: Update to 1.2.1. |
Date: |
Mon, 20 Mar 2023 13:13:20 -0400 |
* gnu/packages/ruby.scm (ruby-thor): Update to 1.2.1.
[source]: Update URI.
[arguments]: Use gexps. Delete trailing #t.
[phases] {fix-readline-tests, disable-network-tests}
{make-files-writable}: Delete phases.
{remove-coveralls-dependency}: Do not remove webmock requires.
{disable-quality-tests}: Rename to...
{disable-problematic-tests}: ... this. Disable a new failing test.
{check}: Honor TESTS?.
---
gnu/packages/ruby.scm | 83 ++++++++++++++++---------------------------
1 file changed, 30 insertions(+), 53 deletions(-)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index ccd446bdd1..cf270a0d34 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -2737,69 +2737,46 @@ (define-public ruby-xml-simple
(define-public ruby-thor
(package
(name "ruby-thor")
- (version "1.0.1")
+ (version "1.2.1")
(source (origin
;; Pull from git because the gem has no tests.
(method git-fetch)
(uri (git-reference
- (url "https://github.com/erikhuda/thor")
+ (url "https://github.com/rails/thor")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
- "1anrx5vynk57hn5c8ig5pgkmcsbj9q5mvckd5rviw1jid7n89k57"))))
+ "1vjm628ks5kw8q6dskh38dqyz2j8c3n694wsqkj4jb4jrn6rkfzx"))))
(build-system ruby-build-system)
(arguments
- '(#:phases (modify-phases %standard-phases
- (add-after 'unpack 'fix-readline-tests
- (lambda _
- ;; Ensure Readline is initialized before running the
- ;; test to avoid a type clash with the mock ::Readline.
- ;; See <https://github.com/erikhuda/thor/pull/717>.
- (substitute* "spec/line_editor/readline_spec.rb"
- (("unless defined\\? ::Readline" all)
- (string-append
"Thor::LineEditor::Readline.available?\n"
- all)))
- #t))
- (add-after 'unpack 'remove-coveralls-dependency
- (lambda _
- ;; Do not hook the test suite into the online
- ;; coveralls service.
- (substitute* "Gemfile"
- ((".*coveralls.*") ""))
- (substitute* "spec/helper.rb"
- (("require \"coveralls\"") "")
- (("Coveralls::SimpleCov::Formatter") "")
- ;; Also drop the WebMock dependency which is only
- ;; present to allow a coveralls.io connection, and
- ;; would otherwise introduce a circular dependency.
- (("require \"webmock/rspec\"") "")
- (("WebMock\\.disable_net_connect.*") ""))
- #t))
- (add-after 'unpack 'disable-network-tests
- (lambda _
- ;; These tests attempt to look up example.com.
- (substitute* "spec/actions/file_manipulation_spec.rb"
- (("it \"accepts (https?) remote sources" _ proto)
- (string-append "xit \"accepts " proto " remote
sources")))
- #t))
- (add-after 'unpack 'disable-quality-tests
- (lambda _
- ;; These tests attempt to check the git repository for
- ;; tabs vs spaces, double vs single quotes, etc, and
- ;; depend on the git checkout.
- (delete-file "spec/quality_spec.rb")
- #t))
- (add-before 'check 'make-files-writable
- (lambda _
- ;; The tests needs rw access to the test suite.
- (for-each make-file-writable (find-files "spec"))
- #t))
- (replace 'check
- (lambda _
- (invoke "rspec" "spec"))))))
- (native-inputs
- (list ruby-rspec ruby-simplecov))
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'remove-coveralls-dependency
+ (lambda _
+ ;; Do not hook the test suite into the online coveralls service.
+ (substitute* "Gemfile"
+ ((".*coveralls.*") ""))
+ (substitute* "spec/helper.rb"
+ (("require \"coveralls\"") "")
+ (("Coveralls::SimpleCov::Formatter") ""))))
+ (add-after 'unpack 'disable-problematic-tests
+ (lambda _
+ ;; These tests attempt to check the git repository for
+ ;; tabs vs spaces, double vs single quotes, etc, and
+ ;; depend on the git checkout.
+ (delete-file "spec/quality_spec.rb")
+ (substitute* "spec/parser/options_spec.rb"
+ ;; This test fails for unknown reasons (see:
+ ;; https://github.com/rails/thor/issues/814).
+ (("it \"raises an error for unknown switches" all)
+ (string-append "x" all)))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "rspec" "spec" )))))))
+ (native-inputs (list ruby-rspec ruby-simplecov ruby-webmock))
(synopsis "Ruby toolkit for building command-line interfaces")
(description "Thor is a toolkit for building powerful command-line
interfaces.")
--
2.39.1
- [bug#62196] [PATCH 081/223] gnu: ruby-rack-test: Honor #:tests? argument., (continued)
- [bug#62196] [PATCH 081/223] gnu: ruby-rack-test: Honor #:tests? argument., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 084/223] gnu: Add ruby-rackup., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 085/223] gnu: Add ruby-vcr-expat., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 094/223] gnu: Add ruby-sorbet-runtime., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 089/223] gnu: Add ruby-rake-compiler-dock., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 095/223] gnu: Add ruby-rdiscount., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 101/223] gnu: ruby-sawyer: Update to 0.9.2., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 096/223] gnu: Add ruby-ruby2-keywords., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 083/223] gnu: ruby-webrick: Update to 1.8.1., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 077/223] gnu: Add ruby-rack-next., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 028/223] gnu: ruby-thor: Update to 1.2.1.,
Maxim Cournoyer <=
- [bug#62196] [PATCH 057/223] gnu: ruby-railties: Update to 7.0.4.3., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 100/223] gnu: ruby-faraday: Propagate ruby-faraday-net-http., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 025/223] gnu: ruby-rubocop-rspec: Update to 2.19.0 and inverse inheritance relationship., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 039/223] gnu: ruby-rake: Update to 13.0.6., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 102/223] gnu: ruby-pry-byebug: Avoid depending on ruby-chandler., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 105/223] gnu: Remove ruby-chandler., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 103/223] gnu: ruby-pry-byebug: Update to 3.10.1., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 107/223] gnu: Add ruby-faraday-multipart., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 104/223] gnu: ruby-byebug: Do not depend on ruby-chandler., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 106/223] gnu: Add ruby-multipart-parser., Maxim Cournoyer, 2023/03/20