Skip to content

[Tooling] Replace ActiveSupport's String#parameterize with a pure-Ruby helper#1808

Merged
iangmaia merged 2 commits into
trunkfrom
iangmaia/fix-activesupport-parameterize
May 12, 2026
Merged

[Tooling] Replace ActiveSupport's String#parameterize with a pure-Ruby helper#1808
iangmaia merged 2 commits into
trunkfrom
iangmaia/fix-activesupport-parameterize

Conversation

@iangmaia
Copy link
Copy Markdown
Contributor

Fix

release-toolkit v14.3.1 dropped its activesupport runtime dependency. generate_prototype_build_number in our Fastfile still calls String#parameterize, which will raise NoMethodError as soon as we bump release-toolkit to >= 14.3.1 (currently pinned to ~> 13.8). Proactive fix so the bump doesn't break Prototype Builds — wordpress-android already hit this.

Adds a tiny pure-Ruby parameterize helper (downcase, replace runs of non-[a-z0-9_-] with -, squeeze, strip leading/trailing -) and routes the two call sites through it. Output matches ActiveSupport's String#parameterize for the branch/commit names involved.

Test

  1. ruby -c fastlane/Fastfile passes.
  2. Prototype Build CI step still produces the expected build number for typical branch names.

Review

The helper is a drop-in replacement for the two .parameterize call sites; behavior is unchanged for the inputs we pass (git branch / ref names).

Release

Release notes are not needed (CI/tooling only).

🤖 Generated with Claude Code

iangmaia and others added 2 commits May 11, 2026 15:05
…y helper

release-toolkit v14.3.1 dropped its `activesupport` runtime dependency, so
`String#parameterize` (used in `generate_prototype_build_number`) will raise
`NoMethodError` once the toolkit is bumped to >=14.3.1 (currently `~> 13.8`).
Add a small pure-Ruby `parameterize` helper that reproduces the behavior we
rely on.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@iangmaia iangmaia marked this pull request as ready for review May 11, 2026 13:15
@iangmaia iangmaia requested review from Copilot and twstokes and removed request for Copilot May 11, 2026 13:15
@iangmaia iangmaia self-assigned this May 11, 2026
@iangmaia iangmaia requested a review from mokagio May 11, 2026 13:15
@iangmaia iangmaia added the tooling Related to anything that supports the building & maintaining of the project. label May 11, 2026
@iangmaia iangmaia added this to the Future milestone May 11, 2026
@wpmobilebot
Copy link
Copy Markdown
Collaborator

📲 You can test the changes from this Pull Request in Simplenote Android by scanning the QR code below to install the corresponding build.

App NameSimplenote Android
Build TypeDebug
Commitc055961
Direct Downloadsimplenote-android-prototype-build-pr1808-c055961-019e172d-416f-40fa-9d7a-298a343ca1cd.apk

@iangmaia iangmaia enabled auto-merge May 11, 2026 13:24
@mokagio
Copy link
Copy Markdown
Contributor

mokagio commented May 12, 2026

Thanks @iangmaia! I run into this issue in Gravatar's Android SDK Automattic/Gravatar-SDK-Android#683 but didn't think to check other repos. Shame on me.

@iangmaia iangmaia merged commit 5722014 into trunk May 12, 2026
18 checks passed
@iangmaia iangmaia deleted the iangmaia/fix-activesupport-parameterize branch May 12, 2026 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tooling Related to anything that supports the building & maintaining of the project.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants