Subject: [PATCH] gnu: Add ruby-factory-bot.

From: gemmaro <[email-masked]>
Date: Sun, 16 Jun 2024 12:38:35 +0900

* gnu/packages/ruby.scm (ruby-factory-bot): New variable.

Change-Id: I92b90edd8618fbf38f8bc2f9d2065b9461188f6c
---
 gnu/packages/ruby.scm | 37 ++++++++++++++++++++++++++++++++++++-
 1 file changed, 36 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 5c1e666bb0..dd7ce0cbf8 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -32,7 +32,7 @@
 ;;; Copyright © 2022-2024 Remco van 't Veer <[email-masked]>
 ;;; Copyright © 2022 Taiju HIGASHI <[email-masked]>
 ;;; Copyright © 2023 Yovan Naumovski <[email-masked]>
-;;; Copyright © 2023 gemmaro <[email-masked]>
+;;; Copyright © 2023, 2024 gemmaro <[email-masked]>
 ;;; Copyright © 2023, 2024 Janneke Nieuwenhuizen <[email-masked]>
 ;;; Copyright © 2023, 2024 Zheng Junjie <[email-masked]>
 ;;; Copyright © 2023, 2024 Hartmut Goebel <[email-masked]>
@@ -86,6 +86,7 @@ (define-module (gnu packages ruby)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages ragel)
+  #:use-module (gnu packages rails)
   #:use-module (gnu packages rsync)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages tls)
@@ -3134,6 +3135,40 @@ (define-public ruby-execjs
     (home-page "https://github.com/rails/execjs")
     (license license:expat)))
 
+(define-public ruby-factory-bot
+  (package
+    (name "ruby-factory-bot")
+    (version "6.4.6")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/thoughtbot/factory_bot")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0a38imcc4ffa6sx452nrmb112n47axqdq0a6xlz7vsl4wlzksmm9"))))
+    (build-system ruby-build-system)
+    (arguments
+     (list
+      #:test-target "spec"))
+    (native-inputs (list ruby-activerecord
+                         ruby-cucumber
+                         ruby-rspec
+                         ruby-rspec-its
+                         ruby-simplecov
+                         ruby-standard
+                         ruby-yard))
+    (propagated-inputs (list ruby-activesupport))
+    (synopsis "Framework and DSL for defining and using factories")
+    (description
+     "@samp{factory_bot} provides a framework and domain specific
+language (DSL) for defining and using factories.  It is less
+error-prone, more explicit, and all-around easier to work with than
+fixtures.")
+    (home-page "https://github.com/thoughtbot/factory_bot")
+    (license license:expat)))
+
 (define-public ruby-fakefs
   (package
     (name "ruby-fakefs")

base-commit: 612e4dd98f7d1d015e405af9d029bede3fe3c280
-- 
2.45.1