Skip to content

Conversation

@tokengeek
Copy link
Contributor

A number of bugs have been introduced or missed due to the way attributes are exposed by fog. Fog transforms the top level of attributes from the JSON sources (String) to Symbols, but does not act recursively.

This results in accessing nested structures with a mix of Symbol and String keys which inevitably is missed or incorrectly specced out.

This adds a simple wrapper around Api#attributes that takes the fog attributes and allows indifferent access with Symbols or Strings.

A number of bugs have been introduced or missed due to the way
attributes are exposed by fog. Fog transforms the top level of
attributes from the JSON sources (String) to Symbols, but does not act
recursively.

This results in accessing nested structures with a mix of Symbol and
String keys which inevitably is missed or incorrectly specced out.

This adds a simple wrapper around `Api#attributes` that takes the fog
attributes and allows indifferent access with Symbols or Strings.
@tokengeek tokengeek merged commit 70f172c into master Dec 19, 2024
5 checks passed
@tokengeek tokengeek deleted the indifferent_attributes branch December 19, 2024 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants