[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/17: gnu: ruby-nokogiri: Update to 1.15.2.
From: |
guix-commits |
Subject: |
07/17: gnu: ruby-nokogiri: Update to 1.15.2. |
Date: |
Sat, 24 Jun 2023 11:08:59 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit e8975697782c0ea10ce278a3304032b4cc60f81c
Author: gemmaro <gemmaro.dev@gmail.com>
AuthorDate: Fri Jun 16 02:08:28 2023 +0900
gnu: ruby-nokogiri: Update to 1.15.2.
* gnu/packages/ruby.scm (ruby-nokogiri): Update to 1.15.2.
[source]<uri>: Use Git repository.
<patches>: apply a patch to disable unneeded test setups.
[arguments]: Enable check by running plain minitest.
[home-page]: Update to current URL.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/packages/patches/ruby-nokogiri.patch | 29 +++++++++++++++++
gnu/packages/ruby.scm | 54 +++++++++++++++++++-------------
2 files changed, 61 insertions(+), 22 deletions(-)
diff --git a/gnu/packages/patches/ruby-nokogiri.patch
b/gnu/packages/patches/ruby-nokogiri.patch
new file mode 100644
index 0000000000..b55b430234
--- /dev/null
+++ b/gnu/packages/patches/ruby-nokogiri.patch
@@ -0,0 +1,29 @@
+Description: Removed some unnecessary test setup such as SimpleCov and
+ minitest-reporters.
+diff --git a/test/helper.rb b/test/helper.rb
+index ed3133c6..4f5d4f1b 100644
+--- a/test/helper.rb
++++ b/test/helper.rb
+@@ -13,22 +13,10 @@
+ # - NOKOGIRI_GC: read more in test/test_memory_leak.rb
+ #
+
+-require "simplecov"
+-SimpleCov.start do
+- add_filter "/test/"
+- enable_coverage :branch
+-end
+-
+ $VERBOSE = true
+
+ require "minitest/autorun"
+ require "minitest/benchmark"
+-require "minitest/reporters"
+-
+-nokogiri_minitest_reporters_options = { color: true, slow_count: 10,
detailed_skip: false }
+-nokogiri_minitest_reporters_options[:fast_fail] = true if
ENV["NOKOGIRI_TEST_FAIL_FAST"]
+-puts "Minitest::Reporters options: #{nokogiri_minitest_reporters_options}"
+-Minitest::Reporters.use!(Minitest::Reporters::DefaultReporter.new(nokogiri_minitest_reporters_options))
+
+ require "fileutils"
+ require "tempfile"
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index c7275ba5fb..888c1912c3 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -6284,38 +6284,48 @@ to reproduce user environments.")
(define-public ruby-nokogiri
(package
(name "ruby-nokogiri")
- (version "1.13.10")
+ (version "1.15.2")
(source (origin
- (method url-fetch)
- (uri (rubygems-uri "nokogiri" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/sparklemotion/nokogiri")
+ (commit "a6ad20b3edc8f020043ccfe5d9ec6ae9af103720")))
+ (file-name (git-file-name name version))
(sha256
(base32
- "0n79k78c5vdcyl0m3y3l5x9kxl6xf5lgriwi2vd665qmdkr01vnk"))))
+ "1n0vlg6v58jw3qzgyihz1dh5fvp4js1qgdh75j0kn47nvyiw3jxj"))
+ (patches (search-patches "ruby-nokogiri.patch"))))
(build-system ruby-build-system)
(arguments
- ;; Tests fail because Nokogiri can only test with an installed extension,
- ;; and also because many test framework dependencies are missing.
- (list
- #:tests? #f
- #:gem-flags #~(list "--" "--use-system-libraries"
- (string-append "--with-xml2-include="
- #$(this-package-input "libxml2")
- "/include/libxml2" ))
- #:phases
- #~(modify-phases %standard-phases
- (add-after 'install 'delete-mkmf.log
- (lambda _
- ;; Rubygems installs build log files that embed volatile file
- ;; names (see:
- ;; https://github.com/rubygems/rubygems/issues/6259).
- (for-each delete-file (find-files #$output "^mkmf\\.log$")))))))
- (native-inputs (list ruby-hoe))
+ (list #:gem-flags #~(list "--" "--use-system-libraries"
+ (string-append "--with-xml2-include="
+ #$(this-package-input "libxml2")
+ "/include/libxml2"))
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'install 'delete-mkmf.log
+ (lambda _
+ ;; Rubygems installs build log files that embed
volatile file
+ ;; names (see:
+ ;;
https://github.com/rubygems/rubygems/issues/6259).
+ (for-each delete-file
+ (find-files #$output "^mkmf\\.log$"))))
+ (delete 'check)
+ (add-after 'install 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (setenv "GEM_PATH" (string-append
+ (getenv "GEM_PATH") ":"
+ #$output
"/lib/ruby/vendor_ruby"))
+ (when tests?
+ (for-each (lambda (file)
+ (invoke "ruby" "-Itest" file))
+ (find-files "test"
"^test_.*\\.rb"))))))))
+ (native-inputs (list ruby-hoe ruby-rubyzip))
(inputs (list zlib libxml2 libxslt))
(propagated-inputs (list ruby-mini-portile-2 ruby-pkg-config))
(synopsis "HTML, XML, SAX, and Reader parser for Ruby")
(description "Nokogiri (鋸) parses and searches XML/HTML, and features
both CSS3 selector and XPath 1.0 support.")
- (home-page "https://www.nokogiri.org/")
+ (home-page "https://nokogiri.org/")
(license license:expat)))
(define-public ruby-method-source
- branch master updated (d6dc82e8cd -> d3f5c35e40), guix-commits, 2023/06/24
- 03/17: doc: Turn "Creating a Channel" into a step-by-step guide., guix-commits, 2023/06/24
- 01/17: services: dicod: Use one inetd endpoint per interface., guix-commits, 2023/06/24
- 02/17: linux-container: Pass '--disable-chroot' to 'guix-daemon'., guix-commits, 2023/06/24
- 06/17: gnu: ruby-mini-portile-2: Update to 2.8.2., guix-commits, 2023/06/24
- 04/17: gnu: fenics: Make sure 'jit.py' can find 'dolfin.pc'., guix-commits, 2023/06/24
- 05/17: gnu: fenics-dolfin, fenics: Remove input labels., guix-commits, 2023/06/24
- 07/17: gnu: ruby-nokogiri: Update to 1.15.2.,
guix-commits <=
- 11/17: gnu: Add subunit., guix-commits, 2023/06/24
- 13/17: gnu: Add yder., guix-commits, 2023/06/24
- 09/17: gnu: Add libansilove., guix-commits, 2023/06/24
- 12/17: gnu: Add orcania., guix-commits, 2023/06/24
- 08/17: gnu: dyninst: Fix runtime error with new glibc., guix-commits, 2023/06/24
- 10/17: gnu: Add ansilove., guix-commits, 2023/06/24
- 14/17: gnu: Add ulfius., guix-commits, 2023/06/24
- 16/17: gnu: Add le-biniou., guix-commits, 2023/06/24
- 17/17: gnu: blesh: Update to 0.4.0-devel3., guix-commits, 2023/06/24
- 15/17: gnu: Add le-biniou-data., guix-commits, 2023/06/24