Skip to content

Add colour presenter aliases - #151

Open
OskarEichler wants to merge 1 commit into
ku1ik:masterfrom
OskarEichler:songstats/rainbow-colour-alias
Open

Add colour presenter aliases#151
OskarEichler wants to merge 1 commit into
ku1ik:masterfrom
OskarEichler:songstats/rainbow-colour-alias

Conversation

@OskarEichler

Copy link
Copy Markdown

Rainbow's top-level API aliases colour to color, but the returned enabled and disabled presenter objects do not. This makes Rainbow('text').colour(:red) unavailable even though the spelling is advertised by the factory API, and disabled-mode parity is missing too.

Add the same alias to Presenter and NullPresenter.

Verification:

  • release/master fail the isolated enabled/disabled reflection and invocation model; this branch passes all four checks on Ruby 3.2.11 and 4.0.6
  • full suite: 220 examples / 0 failures on both Rubies
  • isolated rainbow_spec no longer depends on another spec's global String monkey patch
  • 15-file RuboCop run: 0 offenses on both Rubies
  • rebuilt 14-file gem passes the packaged model

No API break.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant