diff options
Diffstat (limited to 'gnu/packages/ruby-xyz.scm')
-rw-r--r-- | gnu/packages/ruby-xyz.scm | 346 |
1 files changed, 229 insertions, 117 deletions
diff --git a/gnu/packages/ruby-xyz.scm b/gnu/packages/ruby-xyz.scm index 80bf94a365..7a31c39b6b 100644 --- a/gnu/packages/ruby-xyz.scm +++ b/gnu/packages/ruby-xyz.scm @@ -31,11 +31,12 @@ ;;; Copyright © 2022-2025 Remco van 't Veer <remco@remworks.net> ;;; Copyright © 2022 Taiju HIGASHI <higashi@taiju.info> ;;; Copyright © 2023 Yovan Naumovski <yovan@gorski.stream> -;;; Copyright © 2023, 2024 gemmaro <gemmaro.dev@gmail.com> +;;; Copyright © 2023, 2024, 2025 gemmaro <gemmaro.dev@gmail.com> ;;; Copyright © 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2023, 2024 Zheng Junjie <873216071@qq.com> -;;; Copyright © 2023, 2024 Hartmut Goebel <h.goebel@crazy-compilers.com> +;;; Copyright © 2023-2025 Hartmut Goebel <h.goebel@crazy-compilers.com> ;;; Copyright © 2025 Nicolas Graves <ngraves@ngraves.fr> +;;; Copyright © 2025 Sharlatan Hellseher <sharlatanus@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -157,17 +158,29 @@ elegant API.") (define-public ruby-highline (package (name "ruby-highline") - (version "2.0.1") + (version "3.1.2") (source (origin - (method url-fetch) - (uri (rubygems-uri "highline" version)) + (method git-fetch) ;for tests + (uri (git-reference + (url "https://github.com/JEG2/highline") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 (base32 - "0gr6pckj2jayxw1gdgh9193j5jag5zrrqqlrnl4jvcwpyd3sn2zc")))) + "09ysksjmlzhpr5d21qhhl7bq7b3f03qk7jc1k08iwrvx3fjid8gv")))) (build-system ruby-build-system) (arguments - `(#:tests? #f)) ;; TODO: NameError: uninitialized constant SPEC + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'remove-coverage-and-failing-test + (lambda _ + (substitute* "test/test_helper.rb" + (("require \"simplecov\" if RUBY_ENGINE == \"ruby\"") + "")) + ;; TODO: Package dry-types gem. + (delete-file "test/test_highline.rb")))))) (native-inputs (list bundler ruby-code-statistics)) (synopsis @@ -2598,14 +2611,20 @@ input and output.") "1s650nwnabx66w584m1cyw82icyym6hv5kzfsbp38cinkr5klh9j")))) (build-system ruby-build-system) (arguments - '(#:tests? #f ;; TODO: NameError: uninitialized constant Config - #:phases - (modify-phases %standard-phases - (add-before 'check 'set-LIB - (lambda _ - ;; This is used in the Rakefile, and setting it avoids an issue - ;; with running the tests. - (setenv "LIB" "options")))))) + (list + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (substitute* "spec/options_spec.rb" + (("require .* \"/spec_helper\"") + "require \"spec_helper\"\n")) + (substitute* "spec/spec_helper.rb" + (("require 'spec'") + "require 'rspec'\n")) + (invoke "rspec" "spec"))))))) + (native-inputs (list ruby-rspec)) (synopsis "Ruby library to parse options from *args cleanly") (description "The @code{options} library helps with parsing keyword options in Ruby @@ -2664,25 +2683,46 @@ support.") (define-public ruby-ethon (package (name "ruby-ethon") - (version "0.12.0") + (version "0.17.0") (source (origin - (method url-fetch) - (uri (rubygems-uri "ethon" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/typhoeus/ethon") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 (base32 - "0gggrgkcq839mamx7a8jbnp2h7x2ykfn34ixwskwb0lzx2ak17g9")))) + "06rjq0r3bbybycqp6n2xqpcqmz5x8lymnk6fj5wsq59s8gf843r9")))) (build-system ruby-build-system) (arguments (list - #:tests? #f ; no included tests #:phases #~(modify-phases %standard-phases (add-after 'unpack 'libcurl-use-absolute-reference (lambda* (#:key inputs #:allow-other-keys) (substitute* "lib/ethon/curls/settings.rb" (("libcurl', 'libcurl\\.so\\.4") - (search-input-file inputs "/lib/libcurl.so")))))))) + (search-input-file inputs "/lib/libcurl.so"))))) + (add-after 'extract-gemspec 'remove-MIME-types-version-constraint + (lambda _ + (substitute* "Gemfile" + (("(gem \"mime-types\").*" _ gem) + gem)))) + ;; Tell Bundler not to request perf dependencies + (add-after 'extract-gemspec 'remove-Bundler-setup + (lambda _ + (substitute* "spec/spec_helper.rb" + (("Bundler.setup") + "")))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (for-each (lambda (file) + (invoke "ruby" "-Ispec" file)) + (find-files "spec" "_spec\\.rb$")))))))) + (native-inputs (list ruby-rspec ruby-sinatra ruby-mustermann + ruby-mime-types ruby-webrick)) (inputs (list curl)) (propagated-inputs @@ -2787,55 +2827,98 @@ extensions.") (define-public ruby-libxml (package (name "ruby-libxml") - (version "5.0.4") + (version "5.0.5") (source (origin (method url-fetch) (uri (rubygems-uri "libxml-ruby" version)) (sha256 - (base32 - "1rkahmh2p3mapmcy5x4b3jf80a9jcvx85yky34k2n3lar03gphvq")))) + (base32 "16jfgrgb3ys7lk4b7m6s5kg3jdd5w976k6hmf1fmbpw254ahgg7i")))) (build-system ruby-build-system) (native-inputs (list ruby-minitest ruby-rake-compiler)) - (inputs - (list zlib libxml2)) (arguments - '(#:gem-flags - (list "--no-document" ; TODO: Re-enable when documentation - ; generation works - "--" - (string-append "--with-xml2-include=" - (assoc-ref %build-inputs "libxml2") - "/include/libxml2" )) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'skip-failing-tests - (lambda _ - (for-each - (lambda (method) - (substitute* "test/test_canonicalize.rb" - (((string-append "def " method) def) - (string-append def "; skip \"CR/LF mismatch\";")))) - '("test_canonicalize_with_w3c_c14n_3_1" - "test_canonicalize_with_w3c_c14n_3_2" - "test_canonicalize_with_w3c_c14n_3_3" - "test_canonicalize_with_w3c_c14n_3_4")) - (substitute* "test/test_schema.rb" - (("def test_schema_load_from_uri" def) - (string-append def "; skip \"missing XLink schema\";"))))) - (delete 'check) - (add-after 'install 'set-gem-path - (lambda* (#:key outputs #:allow-other-keys) - (setenv "GEM_PATH" - (string-append - (getenv "GEM_PATH") ":" - (assoc-ref outputs "out") "/lib/ruby/vendor_ruby")))) - (add-after 'set-gem-path 'check - (assoc-ref %standard-phases 'check))))) + (list + #:gem-flags + ;; TODO: Re-enable when documentation generation works + #~(list "--no-document" + "--" + (string-append "--with-xml2-include=" + #$(this-package-input "libxml2") + "/include/libxml2" )) + #:phases + #~(modify-phases %standard-phases + ;; tests: 393 runs, 42523 assertions, 0 failures, 0 errors, 20 skips + ;; + ;; TODO: Impliment #:test-flags in ruby-build-system and figure out + ;; how to skip tests more elegant. + (add-after 'unpack 'skip-failing-tests + (lambda _ + (for-each + (lambda (method) + (substitute* "test/test_canonicalize.rb" + (((string-append "def " method) def) + (string-append def "; skip \"CR/LF mismatch\";")))) + '("test_canonicalize_with_w3c_c14n_3_1" + "test_canonicalize_with_w3c_c14n_3_2" + "test_canonicalize_with_w3c_c14n_3_3" + "test_canonicalize_with_w3c_c14n_3_4")) + (substitute* "test/test_schema.rb" + (("def test_schema_load_from_uri" def) + (string-append def "; skip \"missing XLink schema\";"))) + (substitute* "test/test_reader.rb" + (("def test_string_encoding" def) + (string-append def "; skip \"couldn't find end of Start Tag\";"))) + (substitute* "test/test_sax_parser.rb" + (("def test_noexistent_file" def) + (string-append def "; skip \"assertion is not equal\";"))) + (substitute* "test/test_html_parser.rb" + (("def test_no_implied" def) + (string-append def "; skip \"no such file or directory\";")) + (("def test_noexistent_file" def) + (string-append def "; skip \"no such file or directory\";"))) + (substitute* "test/test_html_parser_context.rb" + (("def test_default_options" def) + (string-append def "; skip \"assertion is not equal\";"))) + (substitute* "test/test_dtd.rb" + (("def test_external_dtd" def) + (string-append def "; skip \"assertion is not equal\";"))) + (for-each + (lambda (method) + (substitute* "test/test_xml.rb" + (((string-append "def " method) def) + (string-append def "; skip \"expected false to be truthy\";")))) + '("test_enabled_ftp" + "test_enabled_docbook" + "test_enabled_unicode" + "test_enabled_http")) + (substitute* "test/test_reader.rb" + (("def test_invalid_encoding" def) + (string-append def "; skip \"couldn't find end of Start Tag\";"))) + (for-each + (lambda (method) + (substitute* "test/test_parser.rb" + (((string-append "def " method) def) + (string-append def "; skip \"assertion is not equal\";")))) + '("test_bad_xml" + "test_noexistent_file" + "test_file_encoding" + "test_string_encoding")))) + (add-after 'install 'set-gem-path + (lambda _ + (setenv "GEM_PATH" (string-append + (getenv "GEM_PATH") ":" + #$output "/lib/ruby/vendor_ruby")))) + (delete 'check) + (add-after 'set-gem-path 'check + (assoc-ref %standard-phases 'check))))) + (inputs + (list libxml2 + zlib)) + (home-page "https://xml4r.github.io/libxml-ruby/") (synopsis "Ruby bindings for GNOME Libxml2") - (description "The Libxml-Ruby project provides Ruby language bindings for -the GNOME Libxml2 XML toolkit.") - (home-page "https://xml4r.github.com/libxml-ruby") + (description + "The Libxml-Ruby project provides Ruby language bindings for the GNOME +Libxml2 XML toolkit.") (license license:expat))) (define-public ruby-lino @@ -4694,14 +4777,14 @@ another.") (define-public ruby-markaby (package (name "ruby-markaby") - (version "0.9.0") + (version "0.9.4") (source (origin (method url-fetch) (uri (rubygems-uri "markaby" version)) (sha256 (base32 - "1j4jc31ycydbkh5h3q6zwidzpavg3g5mbb5lqyaczd3jrq78rd7i")))) + "1vizqpa9pks5nlqj0jjx2d1q6f9vfmjjbb774v1kp591pq5nhmcm")))) (build-system ruby-build-system) (arguments (list @@ -6101,7 +6184,7 @@ that provides the ability to deal with POSIX tar archive files.") (define-public ruby-nokogiri (package (name "ruby-nokogiri") - (version "1.16.8") + (version "1.18.10") (source (origin (method git-fetch) (uri (git-reference @@ -6110,8 +6193,7 @@ that provides the ability to deal with POSIX tar archive files.") (file-name (git-file-name name version)) (sha256 (base32 - "09fkjvs4n9n0k0b2qyiq5pxrzidb5a7xaklpckslbcm9fb2gvsq9")) - (patches (search-patches "ruby-nokogiri.patch")))) + "1lrng9xbhyw4mkm50wyzab7dyxdwav4q4zyzx9bgilcnaqwc6rbq")))) (build-system ruby-build-system) (arguments (list #:gem-flags #~(list "--" "--use-system-libraries" @@ -7584,22 +7666,30 @@ you about the changes.") (define-public ruby-loofah (package (name "ruby-loofah") - (version "2.22.0") - (home-page "https://github.com/flavorjones/loofah") + (version "2.24.1") (source (origin ;; Build from git because the gem lacks tests. (method git-fetch) - (uri (git-reference (url home-page) + (uri (git-reference (url "https://github.com/flavorjones/loofah") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0qf7km4b6cgz5xfhik7i0s8fyhq01j7wsrmk8zbz441vmady8rf1")))) + (base32 "07ngn69i86afqcpwv3yc977krbgq8b201gxz0pg3kp8wrliig44f")))) (build-system ruby-build-system) + (arguments + (list + ;; tests: 1093 runs, 3586 assertions, 0 failures, 0 errors, 0 skips + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'skip-failing-tests + (lambda _ + (delete-file "test/assets/testdata_sanitizer_tests1.dat")))))) (native-inputs (list ruby-hoe ruby-hoe-markdown ruby-rr)) (propagated-inputs (list ruby-nokogiri ruby-crass)) + (home-page "https://github.com/flavorjones/loofah") (synopsis "Ruby library for manipulating and transforming HTML/XML") (description "Loofah is a general library for manipulating and transforming HTML/XML @@ -7666,22 +7756,30 @@ It helps you keep your functionality clean and isolated where possible.") (define-public ruby-sanitize (package (name "ruby-sanitize") - (version "6.0.0") - (home-page "https://github.com/rgrove/sanitize") + (version "7.0.0") (source (origin (method git-fetch) ;; The gem does not include the Rakefile, so we download the ;; source from Github. (uri (git-reference - (url home-page) + (url "https://github.com/rgrove/sanitize") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 - "0p1a28vx95vscy9xzzyyddzgb9496x42a5i2ka39cpxbl5f3gkl0")))) + "14598z31g319q7vmn23jriwkm26705ciwy73a8dlsxqhp1wrcv69")))) (build-system ruby-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch + (lambda _ + (substitute* "Rakefile" + (("require \"standard/rake\"") ""))))))) (propagated-inputs (list ruby-crass ruby-nokogiri)) (native-inputs (list ruby-minitest)) + (home-page "https://github.com/rgrove/sanitize") (synopsis "Whitelist-based HTML and CSS sanitizer") (description "Sanitize is a whitelist-based HTML and CSS sanitizer. Given a list of @@ -7751,14 +7849,14 @@ decoding of JSON is implemented as a C extension to Ruby.") (define-public ruby-ox (package (name "ruby-ox") - (version "2.6.0") + (version "2.14.21") (source (origin (method url-fetch) (uri (rubygems-uri "ox" version)) (sha256 (base32 - "0fmk62b1h2i79dfzjj8wmf8qid1rv5nhwfc17l489ywnga91xl83")))) + "1fd0pjv8svyq8g49zaqfksq9zhxv1rwvsqslvxhimaywggwpmirc")))) (build-system ruby-build-system) (arguments '(#:tests? #f)) ; no tests @@ -8952,7 +9050,15 @@ source projects must be able to link to it.") "0bnjd8b86lrgj5ar1l7pg5if95bv0sxa75mz7x2ikqyz6q8rmjb3")))) (build-system ruby-build-system) (arguments - `(#:test-target "spec")) + (list + #:test-target "spec" + #:phases + #~(modify-phases %standard-phases + (add-after 'extract-gemspec 'relax-requirements + (lambda _ + (substitute* "vagrant_cloud.gemspec" + (("dependency 'rexml', .*") + "dependency 'rexml'\n"))))))) (native-inputs (list ruby-rspec ruby-webmock)) (propagated-inputs (list ruby-excon ruby-log4r ruby-rexml)) (synopsis "Vagrant Cloud API library") @@ -10339,6 +10445,10 @@ engine.") (arguments (substitute-keyword-arguments (package-arguments ruby-sqlite3) ((#:tests? #t #t) #f) + ((#:gem-flags _ #f) + ''("--" + "--enable-system-libraries" + "--with-cflags=-Wno-error=incompatible-pointer-types -Wno-error=int-conversion")) ((#:phases phases #~%standard-phases) #~(modify-phases #$phases (delete 'relax-requirements) @@ -11644,7 +11754,7 @@ part of the Prawn PDF generator.") (define-public ruby-puma (package (name "ruby-puma") - (version "6.6.0") + (version "7.0.3") (source (origin (method git-fetch) ;for tests @@ -11654,7 +11764,7 @@ part of the Prawn PDF generator.") (file-name (git-file-name name version)) (sha256 (base32 - "1pdd7s403pi4y75s1sb4jkghhmm2w9zcqifj7z7yx4z0qfs7lvzv")))) + "07mnlf40yvr515f12vd091s46ljfhlcmpxykggim2162yjdwd402")))) (build-system ruby-build-system) (arguments (list @@ -11740,7 +11850,15 @@ part of the Prawn PDF generator.") test_web_concurrency_with_concurrent_ruby_unavailable") (skip-tests "test/helpers/integration.rb" "test_puma_started_log_writing" - "test_require_dependencies")))) + "test_require_dependencies") + ;; Errno::EMFILE: Too many open files - socket(2) for + ;; "127.0.0.1" port 40785 + ;; Timeout waiting for server to log /PID: (\d+)\) booted in + ;; [.0-9]+s, phase: 1/ + (skip-tests "test/test_integration_cluster.rb" + "test_fork_worker_after_refork" + "test_fork_worker_before_refork" + "test_refork_phased_restart_with_fork_worker_and_high_worker_count")))) (add-before 'check 'relax-test-case-timeout (lambda _ ;; The default value is 45 s and easily causes timeouts. @@ -14049,37 +14167,30 @@ common interface over different adapters.") (define-public ruby-nio4r (package (name "ruby-nio4r") - (version "2.5.2") + (version "2.7.4") (source (origin - (method url-fetch) - (uri (rubygems-uri "nio4r" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/socketry/nio4r") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 (base32 - "0gnmvbryr521r135yz5bv8354m7xn6miiapfgpg1bnwsvxz8xj6c")))) + "1planm0yrzgkjqvxbfrcp477k030f1cyplpf8g1p7dppgzk2iqqm")))) (build-system ruby-build-system) (arguments - '(#:phases + '(#:test-target "spec" + #:phases (modify-phases %standard-phases - (add-after 'unpack 'remove-unnecessary-dependencies + (add-after 'extract-gemspec 'delete-certificate (lambda _ - (substitute* "spec/spec_helper.rb" - ;; Coveralls is for uploading test coverage information to an - ;; online service, and thus unnecessary for building the Guix - ;; package - (("require \"coveralls\"") "") - (("Coveralls\\.wear!") "") - ;; Remove rspec/retry as we are not retrying the tests - (("require \"rspec/retry\"") "") - (("config\\.display_try_failure_messages = true") "") - (("config\\.verbose_retry = true") "")))) + (substitute* "nio4r.gemspec" + (("spec.cert_chain = .*") "") + (("spec.signing_key = .*") "")))) (add-before 'check 'compile (lambda _ - (invoke "rake" "compile"))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "rspec"))))))) + (invoke "rake" "compile")))))) (native-inputs (list bundler ruby-rake-compiler ruby-rspec ruby-rubocop)) (synopsis "New I/O for Ruby") @@ -14606,8 +14717,8 @@ long-running operation if it hasn't finished in a fixed amount of time.") "0nagbf9pwy1vg09k6j4xqhbjjzrg5dwzvkn4ffvlj76fsn6vv61f")))) (build-system ruby-build-system) (arguments - ;; No tests. - '(#:tests? #f)) + '(#:tests? #f + #:gem-flags '("--" "--with-cflags=-Wno-error=implicit-function-declaration"))) (propagated-inputs (list ruby-daemons ruby-eventmachine ruby-rack)) (synopsis "Thin and fast web server for Ruby") @@ -15560,13 +15671,13 @@ expressiveness of the language with the parsing expressions.") (define-public ruby-cbor (package (name "ruby-cbor") - (version "0.5.9.6") + (version "0.5.10.1") (source (origin (method url-fetch) (uri (rubygems-uri "cbor" version)) (sha256 - (base32 "0511idr8xps9625nh3kxr68sdy6l3xy2kcz7r57g47fxb1v18jj3")))) + (base32 "1w3d5dhx4vjd707ihkcmq7fy78p5fgawcjdqw2byxnfw32gzgkbr")))) (build-system ruby-build-system) (arguments `(#:test-target "spec")) @@ -16348,16 +16459,17 @@ Resource Description Framework} vocabularies.") (define-public ruby-rdiscount (package (name "ruby-rdiscount") - (version "2.2.7") - (source (origin - (method git-fetch) ;for the full test suite - (uri (git-reference - (url "https://github.com/davidfstr/rdiscount") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1lpfxq3gv0dgmnki9jgfnc8n9k4x9vyq9miqdxv6g4kp90qyfifc")))) + (version "2.2.7.3") + (source + (origin + (method git-fetch) ;for the full test suite + (uri (git-reference + (url "https://github.com/davidfstr/rdiscount") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1lnf598sngcy6b701h33h5l9rn2abl80x0jpynz7jxb4imhd5r80")))) (build-system ruby-build-system) (native-inputs (list perl)) (synopsis "Discount Markdown Processor for Ruby") @@ -16970,13 +17082,13 @@ generation functionality.") (define-public ruby-grpc (package (name "ruby-grpc") - (version "1.62.0") + (version "1.74.1") (source (origin (method url-fetch) (uri (rubygems-uri "grpc" version)) (sha256 (base32 - "03z8yq0z228g6xxxq6s2mmslpv6psrdmi30dpmhysr4px16d897n")))) + "12qy6yga90hs2pdzkxwm80d38dbmjdxmf2szqwb40ky1jr4klfp7")))) (build-system ruby-build-system) (arguments `(#:tests? #f)) ;; has no tests |