Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Sameeran/ff 913 handle variant types in ruby #6

Merged
merged 10 commits into from
Sep 11, 2023

Conversation

sameerank
Copy link
Collaborator

@sameerank sameerank commented Sep 9, 2023

I also added the rubocop linter to GH actions, which resulted in a number of formatting changes in this PR, as well.

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
Copy link
Collaborator Author

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.

@github-advanced-security
Copy link

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.

Copy link

@github-advanced-security github-advanced-security bot left a 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.

lib/variation_type.rb Fixed Show fixed Hide fixed
lib/variation_type.rb Fixed Show fixed Hide fixed
spec/client_spec.rb Fixed Show fixed Hide fixed
spec/client_spec.rb Fixed Show fixed Hide fixed
spec/client_spec.rb Fixed Show fixed Hide fixed
lib/client.rb Fixed Show fixed Hide fixed
Copy link
Member

@leoromanovsky leoromanovsky left a 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 😄

Comment on lines +312 to +317
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']]
Copy link
Member

Choose a reason for hiding this comment

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

nice

@sameerank sameerank merged commit e42a71a into main Sep 11, 2023
@sameerank sameerank deleted the sameeran/ff-913-handle-variant-types-in-ruby branch September 11, 2023 16:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants