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>master
parent
fa52b9a64f
commit
e897569778
|
@ -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"
|
|
@ -6284,38 +6284,48 @@ to reproduce user environments.")
|
||||||
(define-public ruby-nokogiri
|
(define-public ruby-nokogiri
|
||||||
(package
|
(package
|
||||||
(name "ruby-nokogiri")
|
(name "ruby-nokogiri")
|
||||||
(version "1.13.10")
|
(version "1.15.2")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method git-fetch)
|
||||||
(uri (rubygems-uri "nokogiri" version))
|
(uri (git-reference
|
||||||
|
(url "https://github.com/sparklemotion/nokogiri")
|
||||||
|
(commit "a6ad20b3edc8f020043ccfe5d9ec6ae9af103720")))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0n79k78c5vdcyl0m3y3l5x9kxl6xf5lgriwi2vd665qmdkr01vnk"))))
|
"1n0vlg6v58jw3qzgyihz1dh5fvp4js1qgdh75j0kn47nvyiw3jxj"))
|
||||||
|
(patches (search-patches "ruby-nokogiri.patch"))))
|
||||||
(build-system ruby-build-system)
|
(build-system ruby-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
;; Tests fail because Nokogiri can only test with an installed extension,
|
(list #:gem-flags #~(list "--" "--use-system-libraries"
|
||||||
;; and also because many test framework dependencies are missing.
|
(string-append "--with-xml2-include="
|
||||||
(list
|
#$(this-package-input "libxml2")
|
||||||
#:tests? #f
|
"/include/libxml2"))
|
||||||
#:gem-flags #~(list "--" "--use-system-libraries"
|
#:phases #~(modify-phases %standard-phases
|
||||||
(string-append "--with-xml2-include="
|
(add-after 'install 'delete-mkmf.log
|
||||||
#$(this-package-input "libxml2")
|
(lambda _
|
||||||
"/include/libxml2" ))
|
;; Rubygems installs build log files that embed volatile file
|
||||||
#:phases
|
;; names (see:
|
||||||
#~(modify-phases %standard-phases
|
;; https://github.com/rubygems/rubygems/issues/6259).
|
||||||
(add-after 'install 'delete-mkmf.log
|
(for-each delete-file
|
||||||
(lambda _
|
(find-files #$output "^mkmf\\.log$"))))
|
||||||
;; Rubygems installs build log files that embed volatile file
|
(delete 'check)
|
||||||
;; names (see:
|
(add-after 'install 'check
|
||||||
;; https://github.com/rubygems/rubygems/issues/6259).
|
(lambda* (#:key tests? #:allow-other-keys)
|
||||||
(for-each delete-file (find-files #$output "^mkmf\\.log$")))))))
|
(setenv "GEM_PATH" (string-append
|
||||||
(native-inputs (list ruby-hoe))
|
(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))
|
(inputs (list zlib libxml2 libxslt))
|
||||||
(propagated-inputs (list ruby-mini-portile-2 ruby-pkg-config))
|
(propagated-inputs (list ruby-mini-portile-2 ruby-pkg-config))
|
||||||
(synopsis "HTML, XML, SAX, and Reader parser for Ruby")
|
(synopsis "HTML, XML, SAX, and Reader parser for Ruby")
|
||||||
(description "Nokogiri (鋸) parses and searches XML/HTML, and features
|
(description "Nokogiri (鋸) parses and searches XML/HTML, and features
|
||||||
both CSS3 selector and XPath 1.0 support.")
|
both CSS3 selector and XPath 1.0 support.")
|
||||||
(home-page "https://www.nokogiri.org/")
|
(home-page "https://nokogiri.org/")
|
||||||
(license license:expat)))
|
(license license:expat)))
|
||||||
|
|
||||||
(define-public ruby-method-source
|
(define-public ruby-method-source
|
||||||
|
|
Reference in New Issue