Skip to content

Use activesupport inflectors#117

Merged
Bhacaz merged 6 commits intomasterfrom
use_active_support_inflectors
Aug 6, 2025
Merged

Use activesupport inflectors#117
Bhacaz merged 6 commits intomasterfrom
use_active_support_inflectors

Conversation

@ericproulx
Copy link
Contributor

@ericproulx ericproulx commented Apr 16, 2025

Remove Inflector's camel, camel_lower, dash and underscore and use active support equivalent.

Fix #115

@ericproulx ericproulx requested a review from Bhacaz April 16, 2025 17:43
    require 'active_support/core_ext/hash/keys'
Remove camel, camel_lower, dash and underscore and use active support equivalent
@ericproulx ericproulx force-pushed the use_active_support_inflectors branch from 6c79185 to 4dd7b92 Compare April 16, 2025 17:46
@ericproulx
Copy link
Contributor Author

@Bhacaz je catch pas pourquoi c'est plus bas. Le else n'est pas possible, mais c'est comme si il s'attend à un test qui passe là. Bon après, je sais qu'un select/case c'est pas le best, mais ça reste 4 cas simple, facile à lire

@Bhacaz
Copy link
Collaborator

Bhacaz commented Apr 16, 2025

@Bhacaz je catch pas pourquoi c'est plus bas. Le else n'est pas possible, mais c'est comme si il s'attend à un test qui passe là. Bon après, je sais qu'un select/case c'est pas le best, mais ça reste 4 cas simple, facile à lire

Ça me gène pas que ça descende.

@Bhacaz Bhacaz requested a review from Copilot April 16, 2025 19:11
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.

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

lib/bright_serializer/entity/base.rb:17

  • [nitpick] Consider adding or updating tests to validate that the key transformation using ActiveSupport's camelize(:lower) behaves as expected across all relevant cases.
@definition = Inflector.deep_transform_keys_in_object(@definition) { |k| k.to_s.camelize(:lower) }

Bhacaz
Bhacaz previously approved these changes Apr 16, 2025
Copy link
Collaborator

@Bhacaz Bhacaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything seems to work as expected

@ericproulx ericproulx force-pushed the use_active_support_inflectors branch from a14d556 to 48d0d2f Compare April 17, 2025 09:26
@ericproulx ericproulx force-pushed the use_active_support_inflectors branch from 2a7468f to 449d067 Compare April 17, 2025 10:15
@Bhacaz Bhacaz merged commit a98a225 into master Aug 6, 2025
8 checks passed
@Bhacaz Bhacaz deleted the use_active_support_inflectors branch August 6, 2025 13:32
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.

Ruby 3.4 warnings

3 participants