From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Woodcroft Subject: [PATCH 3/4] gnu: Add ruby-timecop. Date: Sun, 5 Jun 2016 23:00:52 +1000 Message-ID: <1465131653-28176-4-git-send-email-donttrustben@gmail.com> References: <1465131653-28176-1-git-send-email-donttrustben@gmail.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9XgC-00041P-GG for guix-devel@gnu.org; Sun, 05 Jun 2016 09:01:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b9Xg7-0000eF-1r for guix-devel@gnu.org; Sun, 05 Jun 2016 09:01:24 -0400 Received: from mail-pf0-x230.google.com ([2607:f8b0:400e:c00::230]:34950) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9Xg6-0000dw-Rs for guix-devel@gnu.org; Sun, 05 Jun 2016 09:01:18 -0400 Received: by mail-pf0-x230.google.com with SMTP id g64so58381140pfb.2 for ; Sun, 05 Jun 2016 06:01:18 -0700 (PDT) Received: from localhost.localdomain ([103.25.181.216]) by smtp.googlemail.com with ESMTPSA id 4sm20716239pfz.35.2016.06.05.06.01.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 05 Jun 2016 06:01:17 -0700 (PDT) In-Reply-To: <1465131653-28176-1-git-send-email-donttrustben@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * gnu/packages/ruby.scm (ruby-timecop): New variable. --- gnu/packages/ruby.scm | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 319971e..71b13e4 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -3969,3 +3969,40 @@ comprehensive ORM layer for mapping records to Ruby objects and handling associated records.") (home-page "http://sequel.jeremyevans.net") (license license:expat))) + +(define-public ruby-timecop + (package + (name "ruby-timecop") + (version "0.8.1") + (source + (origin + (method url-fetch) + (uri (rubygems-uri "timecop" version)) + (sha256 + (base32 + "0vwbkwqyxhavzvr1820hqwz43ylnfcf6w4x6sag0nghi44sr9kmx")))) + (build-system ruby-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'check 'set-check-rubylib + (lambda _ + (setenv "RUBYLIB" "lib") + ;; Delete test file which requires activesupport and + ;; (currently broken) tzinfo-data. + (delete-file "test/time_stack_item_test.rb") + #t))))) + (native-inputs + `(("bundler" ,bundler) + ("ruby-minitest-rg" ,ruby-minitest-rg) + ("ruby-mocha" ,ruby-mocha))) + (synopsis "Test mocks for time-dependent functions.") + (description + "This package provides a gem providing \"time travel\" and \"time +freezing\" capabilities, making it easier to test time-dependent code. It +provides a unified method to mock @code{Time.now}, @code{Date.today}, and +@code{DateTime.now} in a single call.") + (home-page "https://github.com/travisjeffery/timecop") + (license license:expat))) + + -- 2.7.4