From e6f944de8d42d78a3741f66d778da4e5d8a659e5 Mon Sep 17 00:00:00 2001 From: Robert Brodie Date: Mon, 14 Oct 2024 23:08:42 -0400 Subject: [PATCH] Re-enable RSpec/SpecFilePathSuffix and update Webhook paths to work with 1.0 in the path --- .rubocop.yml | 3 --- lib/jira/resource/webhook.rb | 6 +++++- spec/integration/{webhook.rb => webhook_spec.rb} | 0 3 files changed, 5 insertions(+), 4 deletions(-) rename spec/integration/{webhook.rb => webhook_spec.rb} (100%) diff --git a/.rubocop.yml b/.rubocop.yml index 6bfe7da4..c430c72c 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -139,9 +139,6 @@ RSpec/RepeatedSubjectCall: RSpec/SpecFilePathFormat: Enabled: false -RSpec/SpecFilePathSuffix: - Enabled: false - RSpec/StubbedMock: Enabled: false diff --git a/lib/jira/resource/webhook.rb b/lib/jira/resource/webhook.rb index 6c6c2fd0..a231bb52 100644 --- a/lib/jira/resource/webhook.rb +++ b/lib/jira/resource/webhook.rb @@ -16,8 +16,12 @@ def self.full_url(client) client.options[:context_path] + REST_BASE_PATH end + def self.singular_path(client, key, prefix = '/') + "#{full_url(client)}#{prefix}/#{endpoint_name}/#{key}" + end + def self.collection_path(client, prefix = '/') - full_url(client) + prefix + endpoint_name + "#{full_url(client)}#{prefix}/#{endpoint_name}" end def self.all(client, options = {}) diff --git a/spec/integration/webhook.rb b/spec/integration/webhook_spec.rb similarity index 100% rename from spec/integration/webhook.rb rename to spec/integration/webhook_spec.rb