summaryrefslogtreecommitdiff
path: root/gnu/packages/ruby.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-03-01 23:17:26 -0500
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-03-28 22:22:11 -0400
commitf1b06254280af7bbfb43ae140ecc6cbdd48eb907 (patch)
tree90cb435161db26a8387cbacc2c21ddae41250ce7 /gnu/packages/ruby.scm
parenta9173e626e7a5eed55adc5cc00f597d614b595ce (diff)
gnu: ruby-thor: Update to 1.2.1.
* 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?.
Diffstat (limited to 'gnu/packages/ruby.scm')
-rw-r--r--gnu/packages/ruby.scm83
1 files changed, 30 insertions, 53 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index c332bd83b3..4b914a95c1 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -2737,69 +2737,46 @@ Ruby.")
(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.")