From d2a7c07e92d721345e921241252ea97fdc702d72 Mon Sep 17 00:00:00 2001 From: xuan-cao-swi Date: Thu, 29 Jan 2026 14:28:11 -0500 Subject: [PATCH 1/2] NH-128063: cleanup Rakefile --- Rakefile | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/Rakefile b/Rakefile index a0a649fe..7d9da1fe 100755 --- a/Rakefile +++ b/Rakefile @@ -7,37 +7,7 @@ # # Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -require 'rubygems' -require 'fileutils' -require 'net/http' -require 'optparse' -require 'digest' -require 'open-uri' -require 'bundler/setup' require 'bundler/gem_tasks' -require 'rake/testtask' - -Rake::TestTask.new do |t| - t.verbose = false - t.warning = false - t.ruby_opts = [] - t.libs << 'test' - - gem_file = ENV['BUNDLE_GEMFILE']&.split('/')&.last - - case gem_file - when 'unit.gemfile' - t.test_files = FileList['test/api/*_test.rb'] + - FileList['test/solarwinds_apm/*_test.rb'] + - FileList['test/opentelemetry/*_test.rb'] + - FileList['test/noop/*_test.rb'] + - FileList['test/support/*_test.rb'] + - FileList['test/sampling/*_test.rb'] - - FileList['test/opentelemetry/otlp_processor_*_test.rb'] - end -end - -################ Docker Task ################ desc "Run an official docker ruby image with the specified tag. The test suite is launched if runtests is set to true, else a shell session is started for interactive test runs. The platform @@ -121,7 +91,6 @@ task :rubocop do _arg1, arg2 = ARGV rubocop_file = "#{__dir__}/rubocop_result.txt" - FileUtils.rm_f(rubocop_file) new_file = File.new(rubocop_file, 'w') new_file.close From 61f8fa92eb6e4e3bbe7b2a23dde3f274fe8a51a9 Mon Sep 17 00:00:00 2001 From: Xuan <112967240+xuan-cao-swi@users.noreply.github.com> Date: Thu, 29 Jan 2026 14:36:37 -0500 Subject: [PATCH 2/2] Update Rakefile Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- Rakefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 7d9da1fe..7e7811a9 100755 --- a/Rakefile +++ b/Rakefile @@ -91,8 +91,7 @@ task :rubocop do _arg1, arg2 = ARGV rubocop_file = "#{__dir__}/rubocop_result.txt" - new_file = File.new(rubocop_file, 'w') - new_file.close + File.write(rubocop_file, '') `bundle exec rubocop --auto-correct` if arg2 == 'auto-safe' `bundle exec rubocop --auto-correct-all` if arg2 == 'auto-all'