-
Notifications
You must be signed in to change notification settings - Fork 0
nori のバージョンアップでString#snakecase が無くなったため、StringUtils#snakecaseに変更 #2
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
Conversation
| spec.require_paths = ["lib"] | ||
|
|
||
| spec.add_runtime_dependency "savon", ">= 2.3.0", '< 3.0.0' | ||
| spec.add_runtime_dependency "nori", "2.6.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#1
で、一時的に追加したものなので、削除
ローカルでは、2.7.1 (String#snakecaseがないもの)でrspecの確認しています
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the code to replace deprecated String#snakecase (from nori) with a new implementation in StringUtils, and removes the nori dependency.
- Removed runtime dependency on nori in soapforce.gemspec
- Introduced Soapforce::StringUtils.snakecase for converting strings to snake case
- Updated all usages of snakecase across the codebase and bumped the gem version
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| soapforce.gemspec | Removed the nori dependency |
| lib/soapforce/version.rb | Bumped the version with an additional suffix |
| lib/soapforce/string_utils.rb | Added a new snakecase implementation copied from nori |
| lib/soapforce/sobject.rb | Updated snakecase usage to reference StringUtils.snakecase |
| lib/soapforce/result.rb | Updated snakecase usage to reference StringUtils.snakecase |
| lib/soapforce/query_result.rb | Updated snakecase usage to reference StringUtils.snakecase |
| lib/soapforce/client.rb | Updated snakecase usage in lambda and key_name implementation |
| lib/soapforce.rb | Added require for the new StringUtils module |
Comments suppressed due to low confidence (2)
lib/soapforce/version.rb:2
- [nitpick] The new version string includes an unconventional 'trocco' suffix. Consider adding documentation or an in-code comment to clarify its purpose for future maintainers.
VERSION = "0.8.0.trocco.0.0.1"
lib/soapforce/string_utils.rb:10
- Ensure that there are unit tests covering various edge cases for the new snakecase method to maintain its expected behavior.
def self.snakecase(inputstring)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これもclaude作です。
こちらを参考にすると問題なさそうです
https://syucream.hatenablog.jp/entry/2023/06/28/115812
nori のバージョンアップでString#snakecase が無くなったため、noriからStringUtils#snakecaseを移植し変更https://github.com/savonrb/nori/pull/102/files
underscoreはruby標準ではなく、ActiveSupportでした。
https://apidock.com/rails/String/underscore