From 9b3ce3691df25e98ea3eb2182f699df48013e647 Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Fri, 16 Jan 2026 16:12:58 +0100 Subject: [PATCH 01/10] Update rubocop-disable_syntax gem to 0.2.0 --- Gemfile.lock | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ed5221a..999a19b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -48,8 +48,9 @@ GEM rubocop-ast (1.49.0) parser (>= 3.3.7.2) prism (~> 1.7) - rubocop-disable_syntax (0.1.1) - rubocop (>= 1.50) + rubocop-disable_syntax (0.2.0) + lint_roller + rubocop (>= 1.72.0) rubocop-performance (1.26.1) lint_roller (~> 1.1) rubocop (>= 1.75.0, < 2.0) @@ -121,7 +122,7 @@ CHECKSUMS rspec-support (3.13.6) sha256=2e8de3702427eab064c9352fe74488cc12a1bfae887ad8b91cba480ec9f8afb2 rubocop (1.82.1) sha256=09f1a6a654a960eda767aebea33e47603080f8e9c9a3f019bf9b94c9cab5e273 rubocop-ast (1.49.0) sha256=49c3676d3123a0923d333e20c6c2dbaaae2d2287b475273fddee0c61da9f71fd - rubocop-disable_syntax (0.1.1) sha256=fba0b24edbd3de049ccaac8473c18fed308b5bd991e389a3368965f6cb88edbb + rubocop-disable_syntax (0.2.0) sha256=1e61645773b3fc2f74e995ec65f605f7db59437c274fdfd4f385f60bf86af73e rubocop-performance (1.26.1) sha256=cd19b936ff196df85829d264b522fd4f98b6c89ad271fa52744a8c11b8f71834 rubocop-rake (0.7.1) sha256=3797f2b6810c3e9df7376c26d5f44f3475eda59eb1adc38e6f62ecf027cbae4d rubocop-rspec (3.9.0) sha256=8fa70a3619408237d789aeecfb9beef40576acc855173e60939d63332fdb55e2 @@ -136,4 +137,4 @@ CHECKSUMS unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f BUNDLED WITH - 4.0.4 + 4.0.4 From 0144c18d263b6c97eb3497f66d2100180413c840 Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Fri, 16 Jan 2026 16:15:01 +0100 Subject: [PATCH 02/10] Fix rubocop warnings --- spec/errbit_plugin/registry_spec.rb | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/spec/errbit_plugin/registry_spec.rb b/spec/errbit_plugin/registry_spec.rb index 3ce12e6..c9859a1 100644 --- a/spec/errbit_plugin/registry_spec.rb +++ b/spec/errbit_plugin/registry_spec.rb @@ -4,7 +4,7 @@ RSpec.describe ErrbitPlugin::Registry do before do - ErrbitPlugin::Registry.clear_issue_trackers + described_class.clear_issue_trackers end let(:tracker) { @@ -24,17 +24,21 @@ def self.label .with(tracker) .and_return(double(valid?: true, message: "")) end + it "add new issue_tracker plugin" do - ErrbitPlugin::Registry.add_issue_tracker(tracker) - expect(ErrbitPlugin::Registry.issue_trackers).to eq({ + described_class.add_issue_tracker(tracker) + + expect(described_class.issue_trackers).to eq({ "something" => tracker }) end + context "with already issue_tracker with this key" do it "raise ErrbitPlugin::AlreadyRegisteredError" do - ErrbitPlugin::Registry.add_issue_tracker(tracker) + described_class.add_issue_tracker(tracker) + expect { - ErrbitPlugin::Registry.add_issue_tracker(tracker) + described_class.add_issue_tracker(tracker) }.to raise_error(ErrbitPlugin::AlreadyRegisteredError) end end @@ -46,8 +50,9 @@ def self.label .to receive(:new) .with(tracker) .and_return(double(valid?: false, message: "foo", errors: [])) + expect { - ErrbitPlugin::Registry.add_issue_tracker(tracker) + described_class.add_issue_tracker(tracker) }.to raise_error(ErrbitPlugin::IncompatibilityError) end @@ -58,7 +63,7 @@ def self.label .and_return(double(valid?: false, message: "foo", errors: ["one", "two"])) begin - ErrbitPlugin::Registry.add_issue_tracker(tracker) + described_class.add_issue_tracker(tracker) rescue ErrbitPlugin::IncompatibilityError => e expect(e.message).to eq("one; two") end From ef74a11d0c1d05ab9794af1d2e83736b26821bb4 Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Fri, 16 Jan 2026 16:15:58 +0100 Subject: [PATCH 03/10] Upgrade rubocop config --- .rubocop.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 70644d5..bfab522 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,10 +1,8 @@ -require: - - rubocop-disable_syntax - plugins: - rubocop-performance - rubocop-rake - rubocop-rspec + - rubocop-disable_syntax AllCops: TargetRubyVersion: 4.0 From e179af14aa59d1757003f04024cee049ea3e6cd1 Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Fri, 16 Jan 2026 16:17:15 +0100 Subject: [PATCH 04/10] Fix rubocop warning --- lib/errbit_plugin/registry.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/errbit_plugin/registry.rb b/lib/errbit_plugin/registry.rb index 1ff9bdc..8b603f6 100644 --- a/lib/errbit_plugin/registry.rb +++ b/lib/errbit_plugin/registry.rb @@ -11,7 +11,7 @@ module Registry def self.add_issue_tracker(klass) key = klass.label - if issue_trackers.has_key?(key) + if issue_trackers.key?(key) raise AlreadyRegisteredError, "issue_tracker '#{key}' already registered" end From 2de98dd43f3f024de3867a61ae8cf57655238b96 Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Fri, 16 Jan 2026 16:20:16 +0100 Subject: [PATCH 05/10] Fix rubocop warnings --- spec/errbit_plugin/registry_spec.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/errbit_plugin/registry_spec.rb b/spec/errbit_plugin/registry_spec.rb index c9859a1..73c6778 100644 --- a/spec/errbit_plugin/registry_spec.rb +++ b/spec/errbit_plugin/registry_spec.rb @@ -7,14 +7,14 @@ described_class.clear_issue_trackers end - let(:tracker) { + let(:tracker) do tracker = Class.new(ErrbitPlugin::IssueTracker) do def self.label "something" end end tracker - } + end describe ".add_issue_tracker" do context "with issue_tracker class valid" do @@ -37,9 +37,9 @@ def self.label it "raise ErrbitPlugin::AlreadyRegisteredError" do described_class.add_issue_tracker(tracker) - expect { + expect do described_class.add_issue_tracker(tracker) - }.to raise_error(ErrbitPlugin::AlreadyRegisteredError) + end.to raise_error(ErrbitPlugin::AlreadyRegisteredError) end end end @@ -51,9 +51,9 @@ def self.label .with(tracker) .and_return(double(valid?: false, message: "foo", errors: [])) - expect { + expect do described_class.add_issue_tracker(tracker) - }.to raise_error(ErrbitPlugin::IncompatibilityError) + end.to raise_error(ErrbitPlugin::IncompatibilityError) end it "puts the errors in the exception message" do From c944aa566be732603d477c1d47a1b0603ea9f127 Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Fri, 16 Jan 2026 16:20:25 +0100 Subject: [PATCH 06/10] Update rubocop config --- .rubocop.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.rubocop.yml b/.rubocop.yml index bfab522..52237cd 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -344,6 +344,14 @@ RSpec/IndexedLet: RSpec/NamedSubject: Enabled: false +# Ignore example length +RSpec/ExampleLength: + Enabled: false + +# Ignore maximum example group nesting +RSpec/NestedGroups: + Enabled: false + # Naming rules: # Disable anonymous block forwarding. From bf619422a11c8fd3f558e8c324009d383473bd26 Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Fri, 16 Jan 2026 16:27:39 +0100 Subject: [PATCH 07/10] Fix rubocop warnings --- .../issue_tracker_validator_spec.rb | 64 ++++++++++--------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/spec/errbit_plugin/issue_tracker_validator_spec.rb b/spec/errbit_plugin/issue_tracker_validator_spec.rb index e5a7aa1..a1b151b 100644 --- a/spec/errbit_plugin/issue_tracker_validator_spec.rb +++ b/spec/errbit_plugin/issue_tracker_validator_spec.rb @@ -44,7 +44,7 @@ def url end it "valid" do - expect(ErrbitPlugin::IssueTrackerValidator.new(klass).valid?).to be true + expect(described_class.new(klass).valid?).to eq(true) end end @@ -91,13 +91,13 @@ def url end it "not valid" do - expect(ErrbitPlugin::IssueTrackerValidator.new(klass).valid?).to be false + expect(described_class.new(klass).valid?).to eq(false) end it "says :not_inherited" do - is = ErrbitPlugin::IssueTrackerValidator.new(klass) + is = described_class.new(klass) is.valid? - expect(is.errors).to eql [[:not_inherited]] + expect(is.errors).to eq([[:not_inherited]]) end end @@ -137,13 +137,13 @@ def url end it "not valid" do - expect(ErrbitPlugin::IssueTrackerValidator.new(klass).valid?).to be false + expect(described_class.new(klass).valid?).to eq(false) end it "say not implement label method" do - is = ErrbitPlugin::IssueTrackerValidator.new(klass) + is = described_class.new(klass) is.valid? - expect(is.errors).to eql [[:class_method_missing, :label]] + expect(is.errors).to eq([[:class_method_missing, :label]]) end end @@ -183,13 +183,13 @@ def url end it "not valid" do - expect(ErrbitPlugin::IssueTrackerValidator.new(klass).valid?).to be false + expect(described_class.new(klass).valid?).to eq(false) end it "say not implement icons method" do - is = ErrbitPlugin::IssueTrackerValidator.new(klass) + is = described_class.new(klass) is.valid? - expect(is.errors).to eql [[:class_method_missing, :icons]] + expect(is.errors).to eq([[:class_method_missing, :icons]]) end end @@ -229,13 +229,13 @@ def url end it "not valid" do - expect(ErrbitPlugin::IssueTrackerValidator.new(klass).valid?).to be false + expect(described_class.new(klass).valid?).to eq(false) end it "say not implement fields method" do - is = ErrbitPlugin::IssueTrackerValidator.new(klass) + is = described_class.new(klass) is.valid? - expect(is.errors).to eql [[:class_method_missing, :fields]] + expect(is.errors).to eq([[:class_method_missing, :fields]]) end end @@ -275,13 +275,13 @@ def url end it "not valid" do - expect(ErrbitPlugin::IssueTrackerValidator.new(klass).valid?).to be false + expect(described_class.new(klass).valid?).to eq(false) end it "say not implement configured? method" do - is = ErrbitPlugin::IssueTrackerValidator.new(klass) + is = described_class.new(klass) is.valid? - expect(is.errors).to eql [[:instance_method_missing, :configured?]] + expect(is.errors).to eq([[:instance_method_missing, :configured?]]) end end @@ -321,13 +321,13 @@ def url end it "not valid" do - expect(ErrbitPlugin::IssueTrackerValidator.new(klass).valid?).to be false + expect(described_class.new(klass).valid?).to eq(false) end it "say not implement errors method" do - is = ErrbitPlugin::IssueTrackerValidator.new(klass) + is = described_class.new(klass) is.valid? - expect(is.errors).to eql [[:instance_method_missing, :errors]] + expect(is.errors).to eq([[:instance_method_missing, :errors]]) end end @@ -367,12 +367,13 @@ def url end it "not valid" do - expect(ErrbitPlugin::IssueTrackerValidator.new(klass).valid?).to be false + expect(described_class.new(klass).valid?).to eq(false) end + it "say not implement create_issue method" do - is = ErrbitPlugin::IssueTrackerValidator.new(klass) + is = described_class.new(klass) is.valid? - expect(is.errors).to eql [[:instance_method_missing, :create_issue]] + expect(is.errors).to eq([[:instance_method_missing, :create_issue]]) end end @@ -413,12 +414,13 @@ def url end it "is valid" do - expect(ErrbitPlugin::IssueTrackerValidator.new(klass).valid?).to be true + expect(described_class.new(klass).valid?).to eq(true) end + it "not say not implement close_issue method" do - is = ErrbitPlugin::IssueTrackerValidator.new(klass) + is = described_class.new(klass) is.valid? - expect(is.errors).not_to eql [[:instance_method_missing, :close_issue]] + expect(is.errors).not_to eq([[:instance_method_missing, :close_issue]]) end end @@ -458,13 +460,13 @@ def close_issue end it "not valid" do - expect(ErrbitPlugin::IssueTrackerValidator.new(klass).valid?).to be false + expect(described_class.new(klass).valid?).to eq(false) end it "say not implement url method" do - is = ErrbitPlugin::IssueTrackerValidator.new(klass) + is = described_class.new(klass) is.valid? - expect(is.errors).to eql [[:instance_method_missing, :url]] + expect(is.errors).to eq([[:instance_method_missing, :url]]) end end @@ -504,13 +506,13 @@ def url end it "not valid" do - expect(ErrbitPlugin::IssueTrackerValidator.new(klass).valid?).to be false + expect(described_class.new(klass).valid?).to eq(false) end it "say not implement note method" do - is = ErrbitPlugin::IssueTrackerValidator.new(klass) + is = described_class.new(klass) is.valid? - expect(is.errors).to eql [[:class_method_missing, :note]] + expect(is.errors).to eq([[:class_method_missing, :note]]) end end end From 5541814c3779c8cb09e739dc32d092262805c565 Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Fri, 16 Jan 2026 16:36:38 +0100 Subject: [PATCH 08/10] Fix rubocop warnings --- .rubocop.yml | 4 ++++ lib/errbit_plugin/issue_tracker_validator.rb | 4 ++-- spec/errbit_plugin/registry_spec.rb | 8 +++----- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 52237cd..fc0e33b 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -352,6 +352,10 @@ RSpec/ExampleLength: RSpec/NestedGroups: Enabled: false +# Ignore subject after let declarations +RSpec/LeadingSubject: + Enabled: false + # Naming rules: # Disable anonymous block forwarding. diff --git a/lib/errbit_plugin/issue_tracker_validator.rb b/lib/errbit_plugin/issue_tracker_validator.rb index 6f65ebf..df594b2 100644 --- a/lib/errbit_plugin/issue_tracker_validator.rb +++ b/lib/errbit_plugin/issue_tracker_validator.rb @@ -37,7 +37,7 @@ def implements_instance_methods? end end - impl.all? { |value| value == true } + impl.all?(true) end def implements_class_methods? @@ -50,7 +50,7 @@ def implements_class_methods? end end - impl.all? { |value| value == true } + impl.all?(true) end def instance diff --git a/spec/errbit_plugin/registry_spec.rb b/spec/errbit_plugin/registry_spec.rb index 73c6778..554aaeb 100644 --- a/spec/errbit_plugin/registry_spec.rb +++ b/spec/errbit_plugin/registry_spec.rb @@ -13,6 +13,7 @@ def self.label "something" end end + tracker end @@ -62,11 +63,8 @@ def self.label .with(tracker) .and_return(double(valid?: false, message: "foo", errors: ["one", "two"])) - begin - described_class.add_issue_tracker(tracker) - rescue ErrbitPlugin::IncompatibilityError => e - expect(e.message).to eq("one; two") - end + expect { described_class.add_issue_tracker(tracker) } + .to raise_error(ErrbitPlugin::IncompatibilityError, "one; two") end end end From f4635220651907a2c129c5bbb67f9bfbd8f43bf2 Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Fri, 16 Jan 2026 16:39:41 +0100 Subject: [PATCH 09/10] Ruby 3.4 --- .github/workflows/rspec.yml | 2 +- .rubocop.yml | 2 +- .standard.yml | 2 +- errbit_plugin.gemspec | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rspec.yml b/.github/workflows/rspec.yml index 8341bbd..c54f8be 100644 --- a/.github/workflows/rspec.yml +++ b/.github/workflows/rspec.yml @@ -21,7 +21,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["4.0", "head"] + ruby: ["3.4", "4.0", "head"] steps: - name: Harden the runner (Audit all outbound calls) diff --git a/.rubocop.yml b/.rubocop.yml index fc0e33b..6c119a9 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -5,7 +5,7 @@ plugins: - rubocop-disable_syntax AllCops: - TargetRubyVersion: 4.0 + TargetRubyVersion: 3.4 NewCops: enable # We use standard as a linter and formatter instead Rubocop. diff --git a/.standard.yml b/.standard.yml index 323fdc2..65c3e05 100644 --- a/.standard.yml +++ b/.standard.yml @@ -1 +1 @@ -ruby_version: 4.0 +ruby_version: 3.4 diff --git a/errbit_plugin.gemspec b/errbit_plugin.gemspec index a7cc0af..82b966d 100644 --- a/errbit_plugin.gemspec +++ b/errbit_plugin.gemspec @@ -12,7 +12,7 @@ Gem::Specification.new do |spec| spec.description = "Base to create an errbit plugin" spec.homepage = "https://github.com/errbit/errbit_plugin" spec.license = "MIT" - spec.required_ruby_version = ">= 4.0.0" + spec.required_ruby_version = ">= 3.4.0" spec.metadata["homepage_uri"] = spec.homepage spec.metadata["source_code_uri"] = spec.homepage From 8edafd76df88de63818ef76219b8bfb7f89465fd Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Fri, 16 Jan 2026 16:40:17 +0100 Subject: [PATCH 10/10] Add workflow_dispatch: {} --- .github/workflows/rspec.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rspec.yml b/.github/workflows/rspec.yml index c54f8be..9fd2ee6 100644 --- a/.github/workflows/rspec.yml +++ b/.github/workflows/rspec.yml @@ -8,6 +8,7 @@ on: pull_request: branches: - main + workflow_dispatch: {} schedule: - cron: "0 21 * * 6"