diff mbox

[3/4] gnu: Add ruby-timecop.

Message ID 1465131653-28176-4-git-send-email-donttrustben@gmail.com
State New
Headers show

Commit Message

Ben Woodcroft June 5, 2016, 1 p.m. UTC
* gnu/packages/ruby.scm (ruby-timecop): New variable.
---
 gnu/packages/ruby.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

Comments

David Thompson June 5, 2016, 1:56 p.m. UTC | #1
On Sun, Jun 5, 2016 at 9:00 AM, Ben Woodcroft <donttrustben@gmail.com> wrote:
> * 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")

Could you add a comment explaining what this is for?

> +             ;; 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.")

Rather: "Timecop provides \"time travel" and ..."

> +    (home-page "https://github.com/travisjeffery/timecop")
> +    (license license:expat)))
> +
> +
> --
> 2.7.4
>
>

- Dave
diff mbox

Patch

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)))
+
+