From patchwork Mon Mar 20 17:13:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 48288 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 03FB916F34; Mon, 20 Mar 2023 17:28:26 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id BC95116F1D for ; Mon, 20 Mar 2023 17:28:24 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peJGt-0004Kt-Uq; Mon, 20 Mar 2023 13:26:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peJGp-0004HJ-P0 for guix-patches@gnu.org; Mon, 20 Mar 2023 13:26:10 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peJGp-0005MW-HB for guix-patches@gnu.org; Mon, 20 Mar 2023 13:26:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1peJGp-0003y9-Cp for guix-patches@gnu.org; Mon, 20 Mar 2023 13:26:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62196] [PATCH 060/223] gnu: ruby-activerecord: Update to 7.0.4.3 and enable tests. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Mar 2023 17:26:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62196 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62196@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 62196-submit@debbugs.gnu.org id=B62196.167933311914522 (code B ref 62196); Mon, 20 Mar 2023 17:26:07 +0000 Received: (at 62196) by debbugs.gnu.org; 20 Mar 2023 17:25:19 +0000 Received: from localhost ([127.0.0.1]:56039 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peJG2-0003m3-HK for submit@debbugs.gnu.org; Mon, 20 Mar 2023 13:25:18 -0400 Received: from mail-qt1-f169.google.com ([209.85.160.169]:40936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peJ8d-0003Km-Dt for 62196@debbugs.gnu.org; Mon, 20 Mar 2023 13:17:39 -0400 Received: by mail-qt1-f169.google.com with SMTP id x1so13934093qtr.7 for <62196@debbugs.gnu.org>; Mon, 20 Mar 2023 10:17:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679332654; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hgU/8TeuxaAxIMtzRRt2wObZaX5XS9LG1So3sRiDPMM=; b=QmaP3vpPEmIF6Gr+dPdvgE9dBhyZUzkDym2KupT/pt3KgzJwOddVCRKuCWfM14GuRe Avt8mKTAIPN7N6/wHRLCaU5WQ5XjWs+L1IJ8PgrBPaC3Ak5tuk7r+DDtfMo6hbpHW6ES /uCDeFkSL7gjOJ3u7VHyjcO9+mrEYpGPUrgZWUrX7tWz0nziAJzuE8zk2ERv95pJJSrx eBzwZKTNld2uKtQWmm3qSPMjjXxZO8ISY16pJHLewITF9hdFKXv4cVUjFBIlS2OynpcH PUXOKF4Qxo9tn/oK9S7gx+yKkPJRvUqv3tlw7coLpTD2Mvh7Jj2I0juFjF4xw/2a2gOG /9SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679332654; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hgU/8TeuxaAxIMtzRRt2wObZaX5XS9LG1So3sRiDPMM=; b=XAV/iVKAm64tqhEgaPaeOHi3E3xKFF4SzxaeV/1zgGFPUF2B++AAhljx9+K6pG91ss /WJTvHGH0sPU51Om7lcWQaKxwZoSGxENAOB+TCW9UwvNlTiI3r3UecNOvOCjINOMnaUv zog9cIbBJPAMXaiPco5CZXyIqcFm3/DbpPYGtiT1chy7VfT/+WXBp5mQxGj6w57tRyxd EtBNN1+LSpv/yIdtrkojGuvqhQfvcvc/Zyv1Z+u/oci+fqd81RCsqlgUR1ZzDjv9DAG6 vPAUbg5zL8k0tY4K2ELS67TLD2FaWovbX2SC1OZBnQ0dThfZ+2ZEbSgL+EBRN8AQQ4jI SrUA== X-Gm-Message-State: AO0yUKW2uS0xLwaXxbPRrfG7xClLCxD/6TH72yh2IV/2WXNVx1T7oT5Y IQRyxaGcmacFwomb6TVSlXa6MsS0F4Q= X-Google-Smtp-Source: AK7set9jHs40Hfp1A/GbXzBYZaYb1lqfjzjAf1BdsVJNedJD+OG4lgcbBNGNj0Y15VEET8U5fUZvhg== X-Received: by 2002:a05:622a:8:b0:3ac:fba0:cde with SMTP id x8-20020a05622a000800b003acfba00cdemr26768523qtw.22.1679332653749; Mon, 20 Mar 2023 10:17:33 -0700 (PDT) Received: from localhost.localdomain (dsl-10-128-46.b2b2c.ca. [72.10.128.46]) by smtp.gmail.com with ESMTPSA id p17-20020a374211000000b007428e743508sm7673809qka.70.2023.03.20.10.17.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 10:17:33 -0700 (PDT) From: Maxim Cournoyer Date: Mon, 20 Mar 2023 13:13:52 -0400 Message-Id: <20230320171635.11184-60-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230320171635.11184-1-maxim.cournoyer@gmail.com> References: <20230320171635.11184-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/rails.scm (ruby-activerecord): Update to 7.0.4.3. [source]: Use ruby-rails-monorepo. [arguments]: Remove #:tests? argument. Add #:phases argument. [native-inputs]: New field. [propagated-inputs]: Remove ruby-arel. Add ruby-sqlite3. --- gnu/packages/rails.scm | 55 +++++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 20 deletions(-) diff --git a/gnu/packages/rails.scm b/gnu/packages/rails.scm index 329bacdaef..4dc9392201 100644 --- a/gnu/packages/rails.scm +++ b/gnu/packages/rails.scm @@ -287,27 +287,42 @@ (define-public ruby-activemodel (define-public ruby-activerecord (package - (name "ruby-activerecord") - (version "6.1.3") - (source - (origin - (method url-fetch) - (uri (rubygems-uri "activerecord" version)) - (sha256 - (base32 - "03kr6vslwd9iw89jidjpjlp7prr2rf7kpsfa4fz03g9by0kliivs")))) - (build-system ruby-build-system) - (arguments - '(;; No included tests - #:tests? #f)) - (propagated-inputs - (list ruby-activemodel ruby-activesupport ruby-arel)) - (synopsis "Ruby library to connect to relational databases") - (description - "Active Record connects classes to relational database table to establish + (name "ruby-activerecord") + (version %ruby-rails-version) + (source ruby-rails-monorepo) + (build-system ruby-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'extract-gemspec 'chdir + (lambda _ + (chdir "activerecord"))) + (delete 'check) + (add-after 'install 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + ;; Avoid running the database tests, which require railties + ;; and/or database servers. + (invoke "ruby" "-Itest" "test/cases/base_test.rb")))) + (add-before 'check 'set-GEM_PATH + (lambda _ + (setenv "GEM_PATH" (string-append + (getenv "GEM_PATH") ":" + #$output "/lib/ruby/vendor_ruby")))) + (add-before 'check 'check-setup + (lambda* (#:key native-inputs inputs #:allow-other-keys) + ;; A few tests require to set the timezone. + (setenv "TZDIR" (search-input-directory (or native-inputs inputs) + "share/zoneinfo"))))))) + (native-inputs (list tzdata-for-tests)) + (propagated-inputs (list ruby-activemodel ruby-activesupport ruby-sqlite3)) + (synopsis "Ruby library to connect to relational databases") + (description + "Active Record connects classes to relational database table to establish an almost zero-configuration persistence layer for applications.") - (home-page "https://rubyonrails.org") - (license license:expat))) + (home-page "https://rubyonrails.org") + (license license:expat))) (define-public ruby-rspec-rails (package