From f5d3d55c37a659c815aff6000eec88124b26b326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CThavachelvam?= <“thavaahariharangit@git.com”> Date: Mon, 20 May 2024 16:24:46 +0100 Subject: [PATCH 1/9] TICtxtWrd-bundler: Test Improvement, Context Wording, ecosystem bundler. --- .../bundler/file_fetcher/path_gemspec_finder_spec.rb | 2 +- .../file_fetcher/require_relative_finder_spec.rb | 12 ++++++------ bundler/spec/dependabot/bundler/file_fetcher_spec.rb | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb b/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb index 200cb865b6d..d8cedb1088f 100644 --- a/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb +++ b/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb @@ -35,7 +35,7 @@ let(:gemfile) { bundler_project_dependency_file("path_source", filename: "Gemfile") } it { is_expected.to eq([Pathname.new("plugins/example")]) } - context "when the path must be eval-ed" do + context "when gemspec path must be eval-ed" do let(:gemfile) { bundler_project_dependency_file("path_source_eval", filename: "Gemfile") } it "raises a helpful error" do diff --git a/bundler/spec/dependabot/bundler/file_fetcher/require_relative_finder_spec.rb b/bundler/spec/dependabot/bundler/file_fetcher/require_relative_finder_spec.rb index 99ded4984ea..51fef814930 100644 --- a/bundler/spec/dependabot/bundler/file_fetcher/require_relative_finder_spec.rb +++ b/bundler/spec/dependabot/bundler/file_fetcher/require_relative_finder_spec.rb @@ -50,18 +50,18 @@ end # rubocop:disable Lint/InterpolationCheck - context "when that needs to be evaled" do + context "when the file body needs to be evaluated" do let(:file_body) do 'require_relative "./my_file_#{raise %(hell)}"' end it { is_expected.to eq([]) } + end - context "when it can't be" do - let(:file_body) do - 'require_relative "./my_file_#{unknown_var}"' - end - it { is_expected.to eq([]) } + context "when the file body can't be evaluated" do + let(:file_body) do + 'require_relative "./my_file_#{unknown_var}"' end + it { is_expected.to eq([]) } end # rubocop:enable Lint/InterpolationCheck diff --git a/bundler/spec/dependabot/bundler/file_fetcher_spec.rb b/bundler/spec/dependabot/bundler/file_fetcher_spec.rb index 3a0be7a0f92..a311558b117 100644 --- a/bundler/spec/dependabot/bundler/file_fetcher_spec.rb +++ b/bundler/spec/dependabot/bundler/file_fetcher_spec.rb @@ -77,7 +77,7 @@ .to match_array(%w(Gemfile Gemfile.lock .ruby-version)) end - context "when that can't be found" do + context "when the files can't be found" do before do stub_request(:get, url + "?ref=sha") .with(headers: { "Authorization" => "token token" }) @@ -93,7 +93,7 @@ end end - context "when that returns a file" do + context "when returning a file" do before do stub_request(:get, url + "?ref=sha") .with(headers: { "Authorization" => "token token" }) @@ -233,7 +233,7 @@ ) end - context "when that has a fetchable path" do + context "when there is a fetchable path" do before do stub_request(:get, imported_file_url + "?ref=sha") .with(headers: { "Authorization" => "token token" }) @@ -279,7 +279,7 @@ ) end - context "when that has a fetchable path" do + context "when there is a fetchable path" do before do stub_request(:get, url + "plugins/bump-core?ref=sha") .with(headers: { "Authorization" => "token token" }) From 84ce26a9f093faa8daba45d66b18dc98bd27d768 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CThavachelvam?= <“thavaahariharangit@git.com”> Date: Mon, 20 May 2024 16:27:11 +0100 Subject: [PATCH 2/9] TICtxtWrd-bundler: Test Improvement, Context Wording, ecosystem bundler. --- .../dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb b/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb index d8cedb1088f..3cfbbbc01b8 100644 --- a/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb +++ b/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb @@ -35,7 +35,7 @@ let(:gemfile) { bundler_project_dependency_file("path_source", filename: "Gemfile") } it { is_expected.to eq([Pathname.new("plugins/example")]) } - context "when gemspec path must be eval-ed" do + context "when gemspec path must be evaluated" do let(:gemfile) { bundler_project_dependency_file("path_source_eval", filename: "Gemfile") } it "raises a helpful error" do From 7221884b2602c8e592e3a648da95c16fd10a08fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CThavachelvam?= <“thavaahariharangit@git.com”> Date: Mon, 20 May 2024 16:24:46 +0100 Subject: [PATCH 3/9] TICtxtWrd-bundler: Test Improvement, Context Wording, ecosystem bundler. --- .../file_fetcher/path_gemspec_finder_spec.rb | 2 +- .../require_relative_finder_spec.rb | 17 ++++++----------- .../dependabot/bundler/file_fetcher_spec.rb | 8 ++++---- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb b/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb index b7e310704ab..c73f96d39b7 100644 --- a/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb +++ b/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb @@ -36,7 +36,7 @@ it { is_expected.to eq([Pathname.new("plugins/example")]) } - context "when the path must be eval-ed" do + context "when gemspec path must be eval-ed" do let(:gemfile) { bundler_project_dependency_file("path_source_eval", filename: "Gemfile") } it "raises a helpful error" do diff --git a/bundler/spec/dependabot/bundler/file_fetcher/require_relative_finder_spec.rb b/bundler/spec/dependabot/bundler/file_fetcher/require_relative_finder_spec.rb index effa20b8165..51fef814930 100644 --- a/bundler/spec/dependabot/bundler/file_fetcher/require_relative_finder_spec.rb +++ b/bundler/spec/dependabot/bundler/file_fetcher/require_relative_finder_spec.rb @@ -19,7 +19,6 @@ context "when the file does not include any relative paths" do let(:file_body) { bundler_project_dependency_file("gemfile", filename: "Gemfile").content } - it { is_expected.to eq([]) } end @@ -47,31 +46,27 @@ let(:file_body) do 'require_relative "../some_other_file.rb"' end - it { is_expected.to eq(["../some_other_file.rb"]) } end # rubocop:disable Lint/InterpolationCheck - context "when that needs to be evaled" do + context "when the file body needs to be evaluated" do let(:file_body) do 'require_relative "./my_file_#{raise %(hell)}"' end - it { is_expected.to eq([]) } + end - context "when it can't be" do - let(:file_body) do - 'require_relative "./my_file_#{unknown_var}"' - end - - it { is_expected.to eq([]) } + context "when the file body can't be evaluated" do + let(:file_body) do + 'require_relative "./my_file_#{unknown_var}"' end + it { is_expected.to eq([]) } end # rubocop:enable Lint/InterpolationCheck context "when dealing with a file that is already nested" do let(:file_name) { "deeply/nested/Gemfile" } - it { is_expected.to eq(["deeply/some_other_file.rb"]) } end end diff --git a/bundler/spec/dependabot/bundler/file_fetcher_spec.rb b/bundler/spec/dependabot/bundler/file_fetcher_spec.rb index cd7fa34105a..1bedd51e356 100644 --- a/bundler/spec/dependabot/bundler/file_fetcher_spec.rb +++ b/bundler/spec/dependabot/bundler/file_fetcher_spec.rb @@ -78,7 +78,7 @@ .to match_array(%w(Gemfile Gemfile.lock .ruby-version)) end - context "when that can't be found" do + context "when the files can't be found" do before do stub_request(:get, url + "?ref=sha") .with(headers: { "Authorization" => "token token" }) @@ -94,7 +94,7 @@ end end - context "when that returns a file" do + context "when returning a file" do before do stub_request(:get, url + "?ref=sha") .with(headers: { "Authorization" => "token token" }) @@ -234,7 +234,7 @@ ) end - context "when that has a fetchable path" do + context "when there is a fetchable path" do before do stub_request(:get, imported_file_url + "?ref=sha") .with(headers: { "Authorization" => "token token" }) @@ -280,7 +280,7 @@ ) end - context "when that has a fetchable path" do + context "when there is a fetchable path" do before do stub_request(:get, url + "plugins/bump-core?ref=sha") .with(headers: { "Authorization" => "token token" }) From 9fb03234dd0dad7e77eefcb77a010e7ad0746a5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CThavachelvam?= <“thavaahariharangit@git.com”> Date: Mon, 20 May 2024 16:27:11 +0100 Subject: [PATCH 4/9] TICtxtWrd-bundler: Test Improvement, Context Wording, ecosystem bundler. --- .../dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb b/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb index c73f96d39b7..92c2fe58eae 100644 --- a/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb +++ b/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb @@ -36,7 +36,7 @@ it { is_expected.to eq([Pathname.new("plugins/example")]) } - context "when gemspec path must be eval-ed" do + context "when gemspec path must be evaluated" do let(:gemfile) { bundler_project_dependency_file("path_source_eval", filename: "Gemfile") } it "raises a helpful error" do From 2a30223d20fd3e1aad24f10659b15156d06a89ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CThavachelvam?= <“thavaahariharangit@git.com”> Date: Mon, 20 May 2024 16:24:46 +0100 Subject: [PATCH 5/9] TICtxtWrd-bundler: Rebasing main. --- .../bundler/file_fetcher/path_gemspec_finder_spec.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb b/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb index 92c2fe58eae..d8cedb1088f 100644 --- a/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb +++ b/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb @@ -33,10 +33,9 @@ context "when the file does include a path gemspec" do let(:gemfile) { bundler_project_dependency_file("path_source", filename: "Gemfile") } - it { is_expected.to eq([Pathname.new("plugins/example")]) } - context "when gemspec path must be evaluated" do + context "when gemspec path must be eval-ed" do let(:gemfile) { bundler_project_dependency_file("path_source_eval", filename: "Gemfile") } it "raises a helpful error" do @@ -57,7 +56,6 @@ context "when that is behind a conditional that is false" do let(:gemfile) { bundler_project_dependency_file("path_source_if", filename: "Gemfile") } - it { is_expected.to eq([Pathname.new("plugins/example")]) } end end From c67f90f0ca7d9ccb08c11a31ce6d43650fe5393b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CThavachelvam?= <“thavaahariharangit@git.com”> Date: Mon, 20 May 2024 16:27:11 +0100 Subject: [PATCH 6/9] TICtxtWrd-bundler: Test Improvement, Context Wording, ecosystem bundler. --- .../dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb b/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb index d8cedb1088f..3cfbbbc01b8 100644 --- a/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb +++ b/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb @@ -35,7 +35,7 @@ let(:gemfile) { bundler_project_dependency_file("path_source", filename: "Gemfile") } it { is_expected.to eq([Pathname.new("plugins/example")]) } - context "when gemspec path must be eval-ed" do + context "when gemspec path must be evaluated" do let(:gemfile) { bundler_project_dependency_file("path_source_eval", filename: "Gemfile") } it "raises a helpful error" do From 2ee0edb8bcfadbc9c3b1584e843543ff77f5626f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CThavachelvam?= <“thavaahariharangit@git.com”> Date: Fri, 24 May 2024 14:09:14 +0100 Subject: [PATCH 7/9] TICtxtWrd-bundler: Fixing with code spell error. --- .../python/file_updater/pip_compile_file_updater_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/spec/dependabot/python/file_updater/pip_compile_file_updater_spec.rb b/python/spec/dependabot/python/file_updater/pip_compile_file_updater_spec.rb index b33cd8d6f22..1b5333677b1 100644 --- a/python/spec/dependabot/python/file_updater/pip_compile_file_updater_spec.rb +++ b/python/spec/dependabot/python/file_updater/pip_compile_file_updater_spec.rb @@ -139,7 +139,7 @@ .to_not include("# This file is autogen") end - context "that need to be augmented with hashin" do + context "that need to be augmented with hashing" do let(:manifest_fixture_name) { "extra_hashes.in" } let(:generated_fixture_name) { "pip_compile_extra_hashes.txt" } let(:dependency_name) { "pyasn1-modules" } From f8a011bff319a188ebab85d7b0d8131218bf336f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CThavachelvam?= <“thavaahariharangit@git.com”> Date: Fri, 24 May 2024 14:22:19 +0100 Subject: [PATCH 8/9] TICtxtWrd-bundler:Fixing the codespell error. --- .codespellrc | 2 +- .../python/file_updater/pip_compile_file_updater_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.codespellrc b/.codespellrc index 57c91a0140a..7e4dc4ab80d 100644 --- a/.codespellrc +++ b/.codespellrc @@ -3,4 +3,4 @@ skip = .git,*.pdf,*.svg,gems,index,fixtures,CHANGELOG_ARCHIVE_*,yarn.lock ignore-regex = \bsha512-[^"]*|ENV\["ROUGE"\]|\b(com\.google\.errorprone)\b|\bto(_not)? include .*versio"|https://\S* # some modules, parts of regexes, and variable names to ignore, some # misspellings in fixtures/external responses we do not own -ignore-words-list = caf,bu,nwo,nd,kernal,crate,unparseable,couldn,defintions +ignore-words-list = caf,bu,nwo,nd,kernal,crate,unparseable,couldn,defintions,hashin diff --git a/python/spec/dependabot/python/file_updater/pip_compile_file_updater_spec.rb b/python/spec/dependabot/python/file_updater/pip_compile_file_updater_spec.rb index 1b5333677b1..b33cd8d6f22 100644 --- a/python/spec/dependabot/python/file_updater/pip_compile_file_updater_spec.rb +++ b/python/spec/dependabot/python/file_updater/pip_compile_file_updater_spec.rb @@ -139,7 +139,7 @@ .to_not include("# This file is autogen") end - context "that need to be augmented with hashing" do + context "that need to be augmented with hashin" do let(:manifest_fixture_name) { "extra_hashes.in" } let(:generated_fixture_name) { "pip_compile_extra_hashes.txt" } let(:dependency_name) { "pyasn1-modules" } From c2bc45e388cb30f92e8a750323e2364f88310984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CThavachelvam?= <“thavaahariharangit@git.com”> Date: Fri, 24 May 2024 14:26:56 +0100 Subject: [PATCH 9/9] TICtxtWrd-bundler: Fixing the lint errors. --- .../bundler/file_fetcher/path_gemspec_finder_spec.rb | 2 ++ .../bundler/file_fetcher/require_relative_finder_spec.rb | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb b/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb index 3cfbbbc01b8..92c2fe58eae 100644 --- a/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb +++ b/bundler/spec/dependabot/bundler/file_fetcher/path_gemspec_finder_spec.rb @@ -33,6 +33,7 @@ context "when the file does include a path gemspec" do let(:gemfile) { bundler_project_dependency_file("path_source", filename: "Gemfile") } + it { is_expected.to eq([Pathname.new("plugins/example")]) } context "when gemspec path must be evaluated" do @@ -56,6 +57,7 @@ context "when that is behind a conditional that is false" do let(:gemfile) { bundler_project_dependency_file("path_source_if", filename: "Gemfile") } + it { is_expected.to eq([Pathname.new("plugins/example")]) } end end diff --git a/bundler/spec/dependabot/bundler/file_fetcher/require_relative_finder_spec.rb b/bundler/spec/dependabot/bundler/file_fetcher/require_relative_finder_spec.rb index bc475a9f650..8a2d2c47d8d 100644 --- a/bundler/spec/dependabot/bundler/file_fetcher/require_relative_finder_spec.rb +++ b/bundler/spec/dependabot/bundler/file_fetcher/require_relative_finder_spec.rb @@ -47,6 +47,7 @@ let(:file_body) do 'require_relative "../some_other_file.rb"' end + it { is_expected.to eq(["../some_other_file.rb"]) } end @@ -55,6 +56,7 @@ let(:file_body) do 'require_relative "./my_file_#{raise %(hell)}"' end + it { is_expected.to eq([]) } end @@ -62,12 +64,14 @@ let(:file_body) do 'require_relative "./my_file_#{unknown_var}"' end + it { is_expected.to eq([]) } end # rubocop:enable Lint/InterpolationCheck context "when dealing with a file that is already nested" do let(:file_name) { "deeply/nested/Gemfile" } + it { is_expected.to eq(["deeply/some_other_file.rb"]) } end end