From 4c1e6e04d13bd72051f5eae1a9e3f1a0af3fe090 Mon Sep 17 00:00:00 2001 From: Hannah Ramadan Date: Mon, 6 Jan 2025 13:03:38 +0000 Subject: [PATCH] Update patch order --- lib/boot/strap.rb | 8 ++++---- test/new_relic/boot/strap_test.rb | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/boot/strap.rb b/lib/boot/strap.rb index 7b6ac650f8..59366c8555 100644 --- a/lib/boot/strap.rb +++ b/lib/boot/strap.rb @@ -27,11 +27,11 @@ # - Next, use the "RUBYOPT" environment variable to require ("-r") this # file (note that the ".rb" extension is dropped): # ``` -# export RUBYOPT="-r /newrelic/lib/boot/strap" +# export RUBYOPT="-r /Users/hramadan/newrelic-ruby-agent/lib/boot/strap.rb" # ``` # - Add your New Relic license key as an environment variable. # ``` -# export NEW_RELIC_LICENSE_KEY=1a2b3c4d5e67f8g9h0i +# export NEW_RELIC_LICENSE_KEY=47ae68e8919929c1d99fa3a1a36a0aa8c06ba690 # ``` # - Launch an existing Ruby app as usual. For a Ruby on Rails app, this might # involve running `bin/rails server`. @@ -44,9 +44,9 @@ module NRBundlerPatch NR_AGENT_GEM = 'newrelic_rpm' def require(*_groups) - super - require_newrelic + + super end def require_newrelic diff --git a/test/new_relic/boot/strap_test.rb b/test/new_relic/boot/strap_test.rb index f22d880421..e93ac1de87 100644 --- a/test/new_relic/boot/strap_test.rb +++ b/test/new_relic/boot/strap_test.rb @@ -26,7 +26,7 @@ def test_the_overall_prepend_based_monkeypatch end assert_equal 2, required_gems.size, "Expected 2 gems to be required, saw #{required_gems.size}." - assert_equal [PhonyBundler::DEFAULT_GEM_NAME, 'newrelic_rpm'], required_gems, + assert_equal ['newrelic_rpm', PhonyBundler::DEFAULT_GEM_NAME], required_gems, "Expected to see 'newrelic_rpm' required. Only saw #{required_gems}" end