Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Grape::Config by ActiveSupport::Configurable #2332

Merged
merged 5 commits into from
May 28, 2023

Conversation

ericproulx
Copy link
Contributor

This PR replaces Grape::Config::Configuration by ActiveSupport::Configurable. Same behavior is expected

@ericproulx ericproulx requested a review from dblock May 27, 2023 20:44
Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

What do you think about inheriting/extending Config from ActiveSupport::Configurable instead and keeping reset? It's a common pattern used in tests (you had to copy that code too here).

Refactor request_spec which was build_params_with instead of the actual config
@ericproulx
Copy link
Contributor Author

What do you think about inheriting/extending Config from ActiveSupport::Configurable instead and keeping reset? It's a common pattern used in tests (you had to copy that code too here).

The test wasn't actually testing the config part but the build_param_with options. I got rid of the around and use the option properly. I know it's a common practice in test to do the reset but it's only for testing not production. I tend to avoid functions that are just needed when testing.

@dblock dblock merged commit 3b7901c into ruby-grape:master May 28, 2023
23 checks passed
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.

None yet

2 participants