Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:family, :givenのaliasをclearでも使えるようにする #67

Merged
merged 4 commits into from
Apr 28, 2024

Conversation

izumitomo
Copy link
Contributor

概要

Gimei::UniqueGenerator#clearの引数に、:lastと:firstのaliasである:family, :givenをそれぞれ受け取れるようにしました。
ご検討いただければ幸いです。

背景

Gimei::Name#first, #last の alias として,#family, #given が定義されていますが、現状ではGimei::UniqueGenerator#clearにはそのaliasが定義されておらず、使えない状態となっています。
READMEにはclearではaliasを使わないように記載されていますが、誤ってaliasをclearの引数に追加しても返り値が正常なclear処理と差分がなく、ユーザが気付きにくい状態となっています。

その他

変更に伴い、併せてREADMEを変更しています。
また、testのtypoを修正しました。

@coveralls
Copy link

coveralls commented Apr 23, 2024

Coverage Status

coverage: 100.0%. remained the same
when pulling 178f0bc on izumitomo:izumitomo/add-alias-for-clear
into 81040aa on willnet:main.

@willnet
Copy link
Owner

willnet commented Apr 23, 2024

@izumitomo 方針は問題ないと思うのですが、Ruby3.2以下の環境だとテストが失敗するようです。そこが解消できればLGTMです

@izumitomo
Copy link
Contributor Author

@willnet
自分のテストの書き方が悪く、Rubyの環境依存ではなく確率で落ちるテストとなっていました🙇‍♂
修正しました!

@willnet willnet merged commit b557df7 into willnet:main Apr 28, 2024
12 checks passed
@willnet
Copy link
Owner

willnet commented Apr 28, 2024

1.4.0リリースしました!

Release v1.4.0 · willnet/gimei

@izumitomo
Copy link
Contributor Author

@willnet ありがとうございます!

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.

3 participants