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

Rails v7.1 driven 'rails' / 'rails_prepend' suite updates #2248

Merged
merged 12 commits into from
Oct 11, 2023

Conversation

fallwith
Copy link
Contributor

@fallwith fallwith commented Oct 10, 2023

Update the multiverse 'rails' suite (which also has content reused by the 'rails_prepend' suite) for Rails v7.1 compatibility

resolves #2243
resolves #2244

Update the multiverse 'rails' suite for Rails v7.1 compatibility
leverage before suite logic for Rails v7.1 hacks
remove experimental Hash monkeypatch hack
Introduce Rails Edge testing to the 'rails' multiverse suite, for
Rubies 3.0 and above
The browser monitoring 'installed?' instance var has moved
move the `MyApp` Rails app out into its own `my_app.rb` file, and make
sure it gets loaded before the Rails test helpers do. those helpers will
expect an app to be in play by the time they are loaded.
@fallwith fallwith changed the title Rails v7.1 driven 'rails' suite updates Rails v7.1 driven 'rails' / 'rails_prepend' suite updates Oct 10, 2023
lib/new_relic/control/frameworks/rails.rb Outdated Show resolved Hide resolved
test/multiverse/suites/rails/Envfile Outdated Show resolved Hide resolved
test/multiverse/suites/rails/before_suite.rb Show resolved Hide resolved
rails < 7 - use 'select'
rails = 7.0 - use 'pluck'
rails >= 7.1 - use 'ids'
- start testing Rails Edge
- stop testing amusing 'plucky' debugging
For the constants related to browser monitoring, include
`BROWSER_MONITORING` in their names so that its more clear as to what
they are used for.
kaylareopelle
kaylareopelle previously approved these changes Oct 10, 2023
- set an env var for CI workflows to denote CI workflow presence
- use a common Envfile helper to unshift Rails Edge onto the list of gem
  versions to test against
- update `active_record_pg`, `rails`, and `rails_prepend` to use the
  helper
- do not touch `active_record` at this time
kaylareopelle
kaylareopelle previously approved these changes Oct 11, 2023
Copy link
Contributor

@kaylareopelle kaylareopelle left a comment

Choose a reason for hiding this comment

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

One non-blocking comment. Approved as-is!

use 'unshift' to avoid confusion with Ruby module prepend behavior
def unshift_rails_edge(gem_version_array = [])
return if ci_for_pr?

# Unshift Rails Edge (representing the latest GitHub primary branch
Copy link
Contributor

Choose a reason for hiding this comment

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

Very helpful comment! Cool we get to test with the latest now

@github-actions
Copy link
Contributor

SimpleCov Report

Coverage Threshold
Line 94.23% 94%
Branch 85.65% 85%

@fallwith fallwith merged commit 6e1390c into dev Oct 11, 2023
@fallwith fallwith deleted the pumpkin_spiced_rails_tests branch October 11, 2023 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
4 participants