public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rubygem-mechanize] rawhide: 2.14.2
@ 2026-10-27  8:22 Mamoru TASAKA
  0 siblings, 0 replies; only message in thread
From: Mamoru TASAKA @ 2026-10-27  8:22 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/rubygem-mechanize
Branch : rawhide
Commit : 216cc079f62ee42c1f7b23fe68ee396a6396a4c6
Author : Mamoru TASAKA <mtasaka@fedoraproject.org>
Date   : 2026-10-27T17:21:46+09:00
Stats  : +54/-65 in 5 file(s)
URL    : https://src.fedoraproject.org/rpms/rubygem-mechanize/c/216cc079f62ee42c1f7b23fe68ee396a6396a4c6?branch=rawhide

Log:
2.14.2

---
diff --git a/.gitignore b/.gitignore
index edb662e..7894b01 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /mechanize-*.gem
+/mechanize-*-test-missing-files.tar.gz

diff --git a/mechanize-create-missing-test-files.sh b/mechanize-create-missing-test-files.sh
new file mode 100644
index 0000000..cd1b058
--- /dev/null
+++ b/mechanize-create-missing-test-files.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+usage() {
+	echo "$0 <VERSION>"
+}
+
+set -e
+set -x
+
+if [ $# -lt 1 ] ; then
+	usage
+	exit 1
+fi
+
+GEMNAME=mechanize
+VERSION=$1
+
+TMPDIR=$(mktemp -d /tmp/${GEMNAME}-XXXXXX)
+CURDIR=$(pwd)
+
+pushd $TMPDIR
+
+git clone https://github.com/sparklemotion/${GEMNAME}
+cd ${GEMNAME}/
+
+git reset --hard v$VERSION
+cd ..
+
+tar czf $CURDIR/${GEMNAME}-${VERSION}-test-missing-files.tar.gz \
+	--exclude=${GEMNAME}/test/htdocs \
+	${GEMNAME}/test/ \
+	${GEMNAME}/examples/ \
+
+
+popd
+rm -rf $TMPDIR
+

diff --git a/rubygem-mechanize-pr677-support-net_http_0_10.patch b/rubygem-mechanize-pr677-support-net_http_0_10.patch
deleted file mode 100644
index c38292b..0000000
--- a/rubygem-mechanize-pr677-support-net_http_0_10.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From fffbf2e2ae3504dc7a4a4e49b5c4e8fbf56820bb Mon Sep 17 00:00:00 2001
-From: Mike Dalessio <mike.dalessio@gmail.com>
-Date: Wed, 21 Oct 2026 17:02:10 -0400
-Subject: [PATCH 1/2] ci: run Ruby < 3.2 on ubuntu-24.04
-
-GitHub moved `ubuntu-latest` to `ubuntu-26.04`, where `setup-ruby` has
-no Ruby older than 3.2, so the 2.6 through 3.1 jobs failed before
-running any test. The job name keeps the `test (<version>)` form that
-the branch protection rules require.
----
- .github/workflows/ci.yml | 13 +++++++++++--
- 1 file changed, 11 insertions(+), 2 deletions(-)
-
-From 2a7080d0e210ad4701aba2bef22ffd1f9498d701 Mon Sep 17 00:00:00 2001
-From: Mike Dalessio <mike.dalessio@gmail.com>
-Date: Wed, 21 Oct 2026 17:02:10 -0400
-Subject: [PATCH 2/2] fix: get ruby-head CI green
-
-When ruby updated net-http to 0.10.0, the behavior introduced to read
-response lines with `readuntil` instead of `readline` broke `TestCase`
-where it uses a `StringIO` as a fake socket.
-
-Wrap the `StringIO` in a `Net::BufferedIO`, like `Net::HTTP` wraps a
-real socket.
-
-For downstream tests that use `Mechanize::TestCase`, the fake now reads
-like a real socket: `read_body` yields fragments of at most 16 KiB, and
-a body shorter than its `Content-Length` raises `EOFError` when
-`ignore_eof` is false.
----
- CHANGELOG.md               |  1 +
- lib/mechanize/test_case.rb | 11 ++---------
- 2 files changed, 3 insertions(+), 9 deletions(-)
-
-diff --git a/lib/mechanize/test_case.rb b/lib/mechanize/test_case.rb
-index 926a63bf..d1166d03 100644
---- a/lib/mechanize/test_case.rb
-+++ b/lib/mechanize/test_case.rb
-@@ -262,15 +262,8 @@ def request(req, *data, &block)
-     response['Content-Type'] ||= 'text/html'
-     response['Content-Length'] = res['Content-Length'] || res.body.length.to_s
- 
--    io = StringIO.new(res.body)
--    response.instance_variable_set :@socket, io
--    def io.read clen, dest = nil, _ = nil
--      if dest then
--        dest << super(clen)
--      else
--        super clen
--      end
--    end
-+    socket = Net::BufferedIO.new(StringIO.new(res.body))
-+    response.instance_variable_set :@socket, socket
- 
-     body_exist = req.response_body_permitted? &&
-       response_klass.body_permitted?

diff --git a/rubygem-mechanize.spec b/rubygem-mechanize.spec
index 57307f1..5e6b5af 100644
--- a/rubygem-mechanize.spec
+++ b/rubygem-mechanize.spec
@@ -1,11 +1,11 @@
 # Initially Generated from mechanize-0.8.5.gem by gem2rpm -*- rpm-spec -*-
 
-%global	majorver		2.14.1
+%global	majorver		2.14.2
 %undefine	preminorver	
 %global	rpmminorver		.%(echo %preminorver | sed -e 's|^\\.\\.*||')
 %global	fullver		%{majorver}%{?preminorver}
 
-%global	baserelease		2
+%global	baserelease		1
 
 %global	gem_name		mechanize
 
@@ -19,13 +19,13 @@ Release:	%{?preminorver:0.}%{baserelease}%{?preminorver:%{rpmminorver}}%{?dist}
 License:	MIT
 URL:		https://github.com/sparklemotion/mechanize
 Source0:	https://rubygems.org/gems/%{gem_name}-%{fullver}.gem
+Source1:	%{gem_name}-%{version}-test-missing-files.tar.gz
+# Source1 is generated by $bash %%SOURCE12 %%version
+Source2:	%{gem_name}-create-missing-test-files.sh
 # Kill ntlm-http support
 # https://github.com/sparklemotion/mechanize/issues/282
 Patch0:	rubygem-mechanize-2.8.0-disable-ntlm-http.patch
 Patch1:	rubygem-mechanize-2.6.0-disable-ntlm-http-test.patch
-# https://github.com/sparklemotion/mechanize/pull/677
-# handle net-http-0.10.0 change
-Patch2:	rubygem-mechanize-pr677-support-net_http_0_10.patch
 
 BuildRequires:	ruby(release)
 BuildRequires:	ruby-devel
@@ -74,7 +74,8 @@ Requires:	ruby(rubygems)
 This package contains documentation for %{name}.
 
 %prep
-%setup -q -n %{gem_name}-%{version}
+%setup -q -n %{gem_name}-%{version} -a 1
+cp -a %{gem_name}/*/ .
 mv ../%{gem_name}-%{version}.gemspec .
 
 # Permission
@@ -83,7 +84,6 @@ find . -name \*.rb -print0 | xargs --null chmod 0644
 # Patches
 %patch -P0 -p1 -b .ntlm
 %patch -P1 -p1 -b .ntlmtest
-%patch -P2 -p1 -b .net_http
 
 sed -i -e '\@ntlm-http@d' %{gem_name}-%{version}.gemspec
 # Kill also this for now
@@ -113,6 +113,8 @@ gem build %{gem_name}-%{version}.gemspec
 mkdir -p %{buildroot}%{gem_dir}
 cp -a ./%{gem_dir}/* %{buildroot}%{gem_dir}
 
+cp -a examples/ %{buildroot}%{gem_instdir}/
+
 # Clean up
 pushd %{buildroot}%{gem_instdir}
 rm -rf \
@@ -125,7 +127,6 @@ rm -rf \
 	Gemfile \
 	Rakefile \
 	*.gemspec \
-	test/ \
 	%{nil}
 popd
 rm -f %{buildroot}%{gem_cache}
@@ -152,7 +153,9 @@ popd
 %doc	%{gem_instdir}/[A-Z]*.md
 %license	%{gem_instdir}/LICENSE.txt
 %dir	%{gem_instdir}
+%dir	%{gem_instdir}/test/
 %{gem_libdir}/
+%{gem_instdir}/test/htdocs/
 %{gem_spec}
 
 %files	doc
@@ -160,6 +163,9 @@ popd
 %{gem_instdir}/examples/
 
 %changelog
+* Tue Oct 27 2026 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.14.2-1
+- 2.14.2
+
 * Mon Oct 26 2026 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.14.1-2
 - Backport upstream patch to net-http 0.10 in ruby4.1
 

diff --git a/sources b/sources
index a60d57e..9db949c 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
-SHA512 (mechanize-2.14.1.gem) = d15d877d6514ab479a178aa682244e5a521256ca431f329be44045e5a80843ba4864919bea49376b1dc6ab400cdaae0e5fc14b99b1ce2091e0d6c078633153ad
+SHA512 (mechanize-2.14.2.gem) = 14cbfd4bde1ca588708683e1023b5f77841e7aec2a27e3c7e6cecd56509dbcd7ca8c0a29799b59437668f04e4d9d061ce21a354214dc7746731efcfba9d9a8f3
+SHA512 (mechanize-2.14.2-test-missing-files.tar.gz) = db91f65847ce09ce3195d5b5b106f83ab7ec349be907e419453d282dd97a8b18e407629e8ce435863576ae3ab7b2b0cecc35d8914411a5ca7cc351aa785c8ee7

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-27  8:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-27  8:22 [rpms/rubygem-mechanize] rawhide: 2.14.2 Mamoru TASAKA

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox