Repository navigation
Conversation
added 5 commits
September 22, 2026 01:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NecroRuby has revived
jekyll-feedModernized and tested on Ruby 4.0.7, the latest Ruby release.
At a glance
Full modernization report
jekyll-feed Modernization Report
Target: Ruby 4.0.7 (newest release). All changes verified against a clean
bundle install+ full test/lint/build cycle on this interpreter.Summary
The gem's actual runtime code (
lib/) already worked on Ruby 4.0.7 withoutmodification —
require "jekyll"/require "fileutils"don't touchanything Ruby 4.0 removed. The real breakage was entirely in the
development toolchain: an ancient pinned RuboCop (pulled in transitively
via
rubocop-jekyll ~> 0.12.0) that depends on stdlib gems Ruby 4.0 nolonger bundles by default. Fixing that, plus a couple of small style/lint
cleanups and two genuinely missing test cases, closes out the modernization.
Dependency changes
rubocop-jekyll:~> 0.12.0→~> 0.14(pulls RuboCop~> 1.57,replacing the broken RuboCop
1.18.4). This was necessary, notcosmetic — RuboCop 1.18.4 will not boot at all on Ruby 4.0 (see below).
simplecov(~> 0.22) as a dev dependency to measure and enforceline + branch coverage. Nothing in the gem shipped with a coverage tool
before.
nokogiri ~> 1.6,rake ~> 13.0,rspec ~> 3.0,typhoeus >= 0.7, < 2.0,jekyll >= 3.7, < 5.0) werealready loose enough to resolve to current, maintained releases
(nokogiri 1.19.4, rake 13.4.2, rspec 3.13.2, typhoeus 1.6.0, jekyll
4.4.1 as of this run) — no floor changes were needed there. Bundler
resolves an appropriately older patch of each per-Ruby-version in CI,
which is exactly why
Gemfile.lockis (deliberately) gitignored here;I left that decision alone.
Compatibility fixes (Ruby 4.0)
Ruby 4.0 demoted several former "default gems" to gems you must declare
explicitly (
Kernel#requirenow raisesLoadErrorfor them unlessdeclared). RuboCop 1.x transitively requires three of these:
benchmark,ostruct, andtsort. Added to theGemfile, guarded thesame way the existing
gem "rss" if RUBY_VERSION >= "3.0.0"line alreadydoes:
Without these,
bundle exec rubocopcrashes on boot on Ruby 4.0 withcannot load such file -- ostruct/benchmark(tsort merely warns today,but will hard-fail starting Ruby 4.1 per its own deprecation notice, so it
was addressed at the same time rather than left as a ticking time bomb).
Also:
.ruby-versionadded, pinned to4.0.7.jekyll-feed.gemspec:required_ruby_versionraised from>= 2.5.0to>= 2.6.0— 2.5 was never actually exercised by CI (the matrix starts at2.6), so the declared floor now matches the floor that's genuinely
tested. Nothing in the code required this bump on its own merits; it's a
correctness fix to the claim, not a functional change.
.rubocop.yml:AllCops.TargetRubyVersionbumped from2.5to2.6tostay consistent with the gemspec's floor.
.github/workflows/ruby.yml: added'4.0.7'to the CI matrix. Left everyother entry and the workflow structure untouched.
appveyor.yml) was deliberately not touched: itinstalls Ruby from AppVeyor's own prebuilt Windows images by folder
version (e.g.
RUBY_FOLDER_VER: "26"), and I have no way to confirm aRuby 4.0 Windows image exists there. Guessing at a folder version that
doesn't exist would silently break Windows CI with no way for me to
verify it. Flagging this for the maintainer rather than guessing.
Lint fixes (RuboCop, project's own config/cops — nothing retuned)
Upgrading RuboCop surfaced 3 real offenses, plus one now-obsolete config key
in
.rubocop.ymlitself; all fixed, none of the project's cop choices werechanged:
.rubocop.yml:Metrics/AbcSize: IgnoredMethods→ renamed toAllowedMethods(RuboCop renamed this parameter; same allowlist,same intent, still
generateingenerator.rb).Gemfile:Bundler/OrderedGems— the newbenchmark/ostruct/tsortlines needed alphabetical placement.
jekyll-feed.gemspec: removedspec.test_files = spec.files.grep(...).This cop (
Gemspec/DeprecatedAttributeAssignment) is right on themerits too:
spec.filesonly globslib/**/*, so this line has alwaysevaluated to an empty array — it was dead code, not a behavior change to
remove it.
lib/jekyll-feed/generator.rb:config["collections"].map { |c| [c, {}] }.to_h→
config["collections"].to_h { |c| [c, {}] }(Style/MapToHash,same result, one less intermediate array).
RuboCop now reports 0 offenses under the project's own
.rubocop.yml(which still inherits
rubocop-jekyll's shared config and the existing.rubocop_todo.ymlexclusions — neither was touched). Two "new cop notconfigured" advisory warnings print on every run (
Style/DataInheritance,Style/YAMLFileRead); these come fromrubocop-jekyll's own shared.rubocop.ymlnot opting intoNewCops: enable, so they are that upstreamgem's call to make, not this project's — left alone rather than papering
over with
NewCops: enablein this repo's own config.Security audit
Ran
bundler-audit check --update(installed standalone, not added as aproject dependency, since it isn't part of the maintainer's existing
tooling) against the resolved
Gemfile.lock:No CVEs, no action needed beyond the dependency bumps already described
above.
Test coverage
there's no historical percentage to report. Reported as
0.0in theJSON summary for lack of a prior measurement, not because coverage was
actually zero.
before adding any new tests: 100% line coverage, but only 91.3%
branch coverage (21/23). The existing 72-example suite already
exercised every line but missed two conditional branches, both of the
same shape: the "the destination file already exists, so don't
overwrite it" branch in
Generator#generate(line 19) andGenerator#generate_tag_feed(line 98).spec/jekyll-feed_spec.rb) plus 2 tiny fixture files(
spec/fixtures/feed/existing.xml,spec/fixtures/feed/by_tag/ghost_tag.xml) that pre-populate a feeddestination path and assert the plugin leaves the pre-existing file
untouched instead of overwriting it. Chose synthetic collection/tag
names (
"existing","ghost_tag") specifically so these new fixturesdon't collide with any path the other 72 existing examples already
assert on.
(23/23), 74 examples, 0 failures.
Design decisions / things I did NOT do
.github/workflows/release.yml(publishes the gem) orscript/release— out of scope per instructions, and it wasn't broken.History.markdown— it's clearly bot-maintained on merge(see recent commits "Update history to reflect merge of #NNN"), so hand
editing it would just create merge noise for the maintainer's bot.
NewCops: enableor otherwise retune any RuboCop copconfiguration beyond the one renamed parameter (
IgnoredMethods→AllowedMethods) that RuboCop itself required to keep behaving the same.bundler-auditas a permanent dev dependency/CI step — ranit as a one-off audit per the task's request, but adding new CI jobs
around it felt like scope creep beyond "modernize the existing test
matrix."
above) — flagging rather than guessing.
required_ruby_version; only raised it to match thealready-tested CI floor (2.6).
Verification performed
All of the following were run to completion in this environment on Ruby
4.0.7, from a clean
bundle install(noGemfile.lockwas carried overfrom before; it's gitignored by the maintainer's own choice and was
regenerated fresh):
bundle install— resolves cleanly, 66 gems.bundle exec rspec(script/test) — 74 examples, 0 failures.bundle exec rubocop(script/fmt) — 0 offenses.bundle exec rake build— buildsjekyll-feed-0.17.0.gemsuccessfully.bundler-audit check --update— 0 vulnerabilities against 1245 advisories.One environment note unrelated to the gem itself: this sandbox's shell had
stray
BUNDLER_SETUP/BUNDLE_LOCKFILE/BUNDLE_GEMFILEenv varsleaking in from an unrelated Rails app mounted elsewhere on the box, which
made every
ruby/bundleinvocation try toBundler.setupagainst thatother app's Gemfile.lock. Unsetting those four vars before each command
was required to get a clean run; this has nothing to do with the gem or
its configuration and needs no fix in this repository.
About this PR — what NecroRuby is, CI, and smaller pieces
NecroRuby is a bot that brings quality open-source Ruby libraries
up-to-date with the modern Ruby ecosystem — upgrading dependencies,
restoring test coverage, tightening security, and improving documentation
for gems whose last release is over a year old.
NecroRuby is a fully autonomous process and is capable of mistakes. If you
disagree with any of these changes, just say so on this PR (or close it) and
NecroRuby will move on — it won't argue, and it won't keep nudging you. If
you have questions, ask here and it will answer.
Checks may not have run yet. GitHub holds workflow runs from first-time
contributors until a maintainer approves one. Approving a run here would
let NecroRuby see its work against your CI rather than only its own — and
fix it if it fails.
This arrives as one pull request because a single PR is easier to track and
keeps one review thread and one CI signal. It is already one commit per
concern, so it can be reviewed a commit at a time. If you'd rather have
genuinely separate pull requests, comment "please split this up" and
NecroRuby will:
itself is left completely alone — same branch, same diff, same threads.
docs, lint — each targeting that feature branch, so you can review and
approve them independently. Every file appears in exactly one part.
proposes has been reviewed in a small, single-concern PR.
Nothing merges into
the default branchwithout you merging it.🤖 Opened automatically by NecroRuby, an UpWoof.ai service.