guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: ruby-yard: Update to 0.9.5-1.d816482a.


From: Ben Woodcroft
Subject: 01/01: gnu: ruby-yard: Update to 0.9.5-1.d816482a.
Date: Fri, 11 Nov 2016 12:28:57 +0000 (UTC)

benwoodcroft pushed a commit to branch master
in repository guix.

commit e2bb2e1780ce875cc03cd5cc559f1dbc528d6f8e
Author: Ben Woodcroft <address@hidden>
Date:   Tue Nov 8 09:39:47 2016 +1000

    gnu: ruby-yard: Update to 0.9.5-1.d816482a.
    
    * gnu/packages/ruby.scm (ruby-yard): Update to 0.9.5-1.d816482a.
    [source]: Update source URL.
    [arguments]: Remove unneeded substitutions.  Change test target.
    * gnu/packages/patches/ruby-yard-fix-skip-of-markdown-tests.patch (New
    file)
    * gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                       |    2 +
 .../ruby-yard-fix-skip-of-markdown-tests.patch     |   17 +++++
 gnu/packages/ruby.scm                              |   69 ++++++++++----------
 3 files changed, 54 insertions(+), 34 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index b3a4cd5..b8c597e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -7,6 +7,7 @@
 # Copyright © 2016 Kei Kebreau <address@hidden>
 # Copyright © 2016 Adonay "adfeno" Felipe Nogueira 
<https://libreplanet.org/wiki/User:Adfeno> <address@hidden>
 # Copyright © 2016 Ricardo Wurmus <address@hidden>
+# Copyright © 2016 Ben Woodcroft <address@hidden>
 #
 # This file is part of GNU Guix.
 #
@@ -841,6 +842,7 @@ dist_patch_DATA =                                           
\
   %D%/packages/patches/ruby-rack-ignore-failing-test.patch      \
   %D%/packages/patches/ruby-symlinkfix.patch                    \
   %D%/packages/patches/ruby-tzinfo-data-ignore-broken-test.patch\
+  %D%/packages/patches/ruby-yard-fix-skip-of-markdown-tests.patch \
   %D%/packages/patches/sed-hurd-path-max.patch                 \
   %D%/packages/patches/scheme48-tests.patch                    \
   %D%/packages/patches/scotch-test-threading.patch             \
diff --git a/gnu/packages/patches/ruby-yard-fix-skip-of-markdown-tests.patch 
b/gnu/packages/patches/ruby-yard-fix-skip-of-markdown-tests.patch
new file mode 100644
index 0000000..f592f5c
--- /dev/null
+++ b/gnu/packages/patches/ruby-yard-fix-skip-of-markdown-tests.patch
@@ -0,0 +1,17 @@
+The tests currently fail due to use of 'skip' rather than 'pending' to skip a
+test usually not skipped by upstream.  This patch has been proposed upstream
+at https://github.com/lsegal/yard/pull/1033
+
+diff --git a/spec/templates/helpers/html_helper_spec.rb 
b/spec/templates/helpers/html_helper_spec.rb
+index 84624c3..9c4fc2b 100644
+--- a/spec/templates/helpers/html_helper_spec.rb
++++ b/spec/templates/helpers/html_helper_spec.rb
+@@ -184,7 +184,7 @@ describe YARD::Templates::Helpers::HtmlHelper do
+     it "creates tables (markdown specific)" do
+       log.enter_level(Logger::FATAL) do
+         unless markup_class(:markdown).to_s == "RedcarpetCompat"
+-          skip "This test depends on a markdown engine that supports tables"
++          pending "This test depends on a markdown engine that supports 
tables"
+         end
+       end
+ 
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index a770486..dd9984f 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -3047,43 +3047,44 @@ features such as filtering and fine grained logging.")
     (license license:expat)))
 
 (define-public ruby-yard
-  (package
-    (name "ruby-yard")
-    (version "0.8.7.6")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (rubygems-uri "yard" version))
-       (sha256
-        (base32
-         "1dj6ibc0qqvmb5a5r5kk0vhr04mnrz9b26gnfrs5p8jgp620i89x"))))
-    (build-system ruby-build-system)
-    (arguments
-     `(#:test-target "specs"
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'check 'set-HOME-and-disable-failing-test
-           (lambda _
-             ;; $HOME needs to be set to somewhere writeable for tests to run
-             (setenv "HOME" "/tmp")
-             ;; Disable tests which fails on Ruby 2.3.  See
-             ;; https://github.com/lsegal/yard/issues/927
-             (substitute* "spec/parser/ruby/ruby_parser_spec.rb"
-               (("comment.type.should == :comment") "")
-               (("comment.docstring_hash_flag.should be_true") "")
-               (("comment.docstring.strip.should == .*") ""))
-             #t)))))
-    (native-inputs
-     `(("ruby-rspec" ,ruby-rspec-2)
-       ("ruby-rack" ,ruby-rack)))
-    (synopsis "Documentation generation tool for Ruby")
-    (description
-     "YARD is a documentation generation tool for the Ruby programming
+  ;; Use git reference because gem is >100 commits out of date and the tests
+  ;; do not pass with the released gem.
+  (let ((commit "d816482a0d4850506c3bcccc9434550c536c28c6"))
+    (package
+      (name "ruby-yard")
+      (version (string-append "0.9.5-1." (string-take commit 8)))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/lsegal/yard.git";)
+               (commit commit)))
+         (file-name (string-append name "-" version "-checkout"))
+         (sha256
+          (base32
+           "1j16c85x22if7y0fzi3c900p9wzkx2riq1y7vsj92a0zvwsxai4i"))
+         (patches (search-patches 
"ruby-yard-fix-skip-of-markdown-tests.patch"))))
+      (build-system ruby-build-system)
+      (arguments
+       `(#:test-target "spec"
+         #:phases
+         (modify-phases %standard-phases
+           (add-before 'check 'set-HOME-and-disable-failing-test
+             (lambda _
+               ;; $HOME needs to be set to somewhere writeable for tests to run
+               (setenv "HOME" "/tmp")
+               #t)))))
+      (native-inputs
+       `(("ruby-rspec" ,ruby-rspec-2)
+         ("ruby-rack" ,ruby-rack)))
+      (synopsis "Documentation generation tool for Ruby")
+      (description
+       "YARD is a documentation generation tool for the Ruby programming
 language.  It enables the user to generate consistent, usable documentation
 that can be exported to a number of formats very easily, and also supports
 extending for custom Ruby constructs such as custom class level definitions.")
-    (home-page "http://yardoc.org";)
-    (license license:expat)))
+      (home-page "http://yardoc.org";)
+      (license license:expat))))
 
 (define-public ruby-clap
   (package



reply via email to

[Prev in Thread] Current Thread [Next in Thread]