Subject: [bug#62196] [PATCH 113/223] gnu: ruby-octokit: Enable tests.

From: Maxim Cournoyer <[email-masked]>
Date: Mon, 20 Mar 2023 13:21:59 -0400

* gnu/packages/ruby.scm (ruby-octokit) [source]: Fetch from git.
[arguments]: Delete field.
[native-inputs]: New field.
---

 gnu/packages/ruby.scm | 32 ++++++++++++++++++++++----------
 1 file changed, 22 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 536775cf74..2345c344b9 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -7941,17 +7941,29 @@ (define-public ruby-octokit
   (package
     (name "ruby-octokit")
     (version "6.1.0")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (rubygems-uri "octokit" version))
-       (sha256
-        (base32
-         "03i37mdhwlm5y6piqaby0izrhda9m5ggbrmm62ww3ln2l86h78l2"))))
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/octokit/octokit.rb")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "01njrd17bz28mlsa8hi9gad7s6d1d0vpyn0g66p3d42zgplr9qkq"))))
     (build-system ruby-build-system)
-    (arguments '(#:tests? #f))          ;no test suite in the gem release
-    (propagated-inputs
-     (list ruby-faraday ruby-sawyer))
+    (native-inputs
+     (list ruby-faraday-multipart
+           ruby-jwt
+           ruby-mime-types
+           ruby-multi-json
+           ruby-netrc
+           ruby-pry-byebug
+           ruby-rbnacl
+           ruby-rspec
+           ruby-simplecov
+           ruby-webmock
+           ruby-vcr-expat))
+    (propagated-inputs (list ruby-faraday ruby-sawyer))
     (synopsis "Ruby toolkit for the GitHub API")
     (description "Octokit wraps the GitHub API in a flat API client that
 follows Ruby conventions and requires little knowledge of REST.")
-- 
2.39.1