Skip to content

Conversation

@yas-okadatech
Copy link

nori のバージョンアップでString#snakecase が無くなったため、noriからStringUtils#snakecaseを移植し変更https://github.com/savonrb/nori/pull/102/files

underscoreはruby標準ではなく、ActiveSupportでした。
https://apidock.com/rails/String/underscore

@yas-okadatech yas-okadatech self-assigned this 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"
Copy link
Author

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の確認しています

@yas-okadatech yas-okadatech requested a review from Copilot June 27, 2025 00:57
Copy link

Copilot AI left a 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)

Copy link
Author

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

@yas-okadatech yas-okadatech merged commit e085add into master Jun 27, 2025
1 check passed
@yas-okadatech yas-okadatech deleted the 34122-replace-snowcase branch June 27, 2025 01:59
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