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

Refactor local_environment methods #2390

Merged
merged 1 commit into from
Jan 8, 2024
Merged

Refactor local_environment methods #2390

merged 1 commit into from
Jan 8, 2024

Conversation

fransan6
Copy link
Contributor

@fransan6 fransan6 commented Jan 7, 2024

Overview

Cleaned up methods to replace single if statements with early returns.

Ran bundle exec rake and there were 0 failures and 0 errors 🌈 (just 5 skips, which I had when I ran the command before refactoring).

Resolves #2388

I wasn't sure if the check_for_thin method (line 173 old, 175 new) could be refactored as it seemed that the NewRelic::LanguageSupport.object_space_usable? if-else returned @discovered_dispatcher = :thin either way. But I'm a beginner so I am sure the if-else is needed as is! Wanted to flag though, just in case.

Reviewer Checklist

  • Perform code review
  • Add performance label
  • Perform appropriate level of performance testing
  • Confirm all checks passed
  • Add version label prior to acceptance

@CLAassistant
Copy link

CLAassistant commented Jan 7, 2024

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the community To tag external issues and PRs submitted by the community label Jan 7, 2024
Copy link
Contributor

@fallwith fallwith left a comment

Choose a reason for hiding this comment

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

These changes look great, fransan6, thank you!

@fallwith fallwith merged commit ce95239 into newrelic:dev Jan 8, 2024
25 checks passed
@fransan6 fransan6 deleted the refactor-local-env-methods branch January 9, 2024 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community To tag external issues and PRs submitted by the community
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Refactor local_environment.rb methods
3 participants