-
Notifications
You must be signed in to change notification settings - Fork 0
Sameeran/ff 913 handle variant types in ruby #6
Sameeran/ff 913 handle variant types in ruby #6
Conversation
assigned_variation = get_assignment_variation(subject_key, flag_key, subject_attributes, nil, logger) | ||
assigned_variation&.value | ||
end | ||
deprecate :get_assignment, 'the get_<typed>_assignment methods', 2024, 1 |
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.
Example output in stdout when this deprecated function is called
.NOTE: EppoClient::Client#get_assignment is deprecated; use the get_<typed>_assignment methods instead. It will be removed on or after 2024-01.
EppoClient::Client#get_assignment called from /Users/sameeran/ruby-sdk/spec/client_spec.rb:264.
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
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.
Rubocop found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
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.
used to use rails a lot - remembering rubocop with fondness 😄
get_typed_assignment = { | ||
'string' => client.method(:get_string_assignment), | ||
'numeric' => client.method(:get_numeric_assignment), | ||
'boolean' => client.method(:get_boolean_assignment), | ||
'json' => client.method(:get_json_string_assignment) | ||
}[test_case['valueType']] |
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.
nice
I also added the rubocop linter to GH actions, which resulted in a number of formatting changes in this PR, as well.