nori のバージョンアップでString#snakecase が無くなったため、StringUtils#snakecaseに変更#2
Merged
yas-okadatech merged 2 commits intomasterfrom Jun 27, 2025
Merged
nori のバージョンアップでString#snakecase が無くなったため、StringUtils#snakecaseに変更#2yas-okadatech merged 2 commits intomasterfrom
yas-okadatech merged 2 commits intomasterfrom
Conversation
yas-okadatech
commented
Jun 27, 2025
| spec.require_paths = ["lib"] | ||
|
|
||
| spec.add_runtime_dependency "savon", ">= 2.3.0", '< 3.0.0' | ||
| spec.add_runtime_dependency "nori", "2.6.0" |
Author
There was a problem hiding this comment.
#1
で、一時的に追加したものなので、削除
ローカルでは、2.7.1 (String#snakecaseがないもの)でrspecの確認しています
There was a problem hiding this comment.
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)
yas-okadatech
commented
Jun 27, 2025
Author
There was a problem hiding this comment.
これもclaude作です。
こちらを参考にすると問題なさそうです
https://syucream.hatenablog.jp/entry/2023/06/28/115812
kentoyoshida
approved these changes
Jun 27, 2025
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.
nori のバージョンアップでString#snakecase が無くなったため、noriからStringUtils#snakecaseを移植し変更https://github.com/savonrb/nori/pull/102/files
underscoreはruby標準ではなく、ActiveSupportでした。
https://apidock.com/rails/String/underscore