From 915a7eeaf06d5f906c07c7c1b69b4d1ec5e5bb48 Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Fri, 15 Sep 2017 08:44:42 +1000 Subject: [PATCH] feat(resources): improve usage of title and name attributes --- lib/pact_broker/api/decorators/pact_collection_decorator.rb | 3 +-- lib/pact_broker/api/decorators/pact_versions_decorator.rb | 3 +-- lib/pact_broker/api/decorators/webhook_decorator.rb | 2 -- lib/pact_broker/api/decorators/webhooks_decorator.rb | 1 - 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/pact_broker/api/decorators/pact_collection_decorator.rb b/lib/pact_broker/api/decorators/pact_collection_decorator.rb index bacc0ee7f..e4f6bc3e9 100644 --- a/lib/pact_broker/api/decorators/pact_collection_decorator.rb +++ b/lib/pact_broker/api/decorators/pact_collection_decorator.rb @@ -29,8 +29,7 @@ def create_representable_pact pact represented.collect do | pact | { :href => latest_pact_url(options[:base_url], pact), - :name => "Latest pact between #{pact.consumer.name} and #{pact.provider.name}", - :title => "Pact" + :title => "Latest pact between #{pact.consumer.name} and #{pact.provider.name}", } end end diff --git a/lib/pact_broker/api/decorators/pact_versions_decorator.rb b/lib/pact_broker/api/decorators/pact_versions_decorator.rb index 1b0b29fd1..037b9dad3 100644 --- a/lib/pact_broker/api/decorators/pact_versions_decorator.rb +++ b/lib/pact_broker/api/decorators/pact_versions_decorator.rb @@ -11,8 +11,7 @@ class PactVersionsDecorator < BaseDecorator link :self do | context | { href: context[:resource_url], - title: "Pact versions", - name: "All versions of the pact between #{context[:consumer_name]} and #{context[:provider_name]}" + title: "All versions of the pact between #{context[:consumer_name]} and #{context[:provider_name]}" } end diff --git a/lib/pact_broker/api/decorators/webhook_decorator.rb b/lib/pact_broker/api/decorators/webhook_decorator.rb index 00f1d5ea2..7e2093777 100644 --- a/lib/pact_broker/api/decorators/webhook_decorator.rb +++ b/lib/pact_broker/api/decorators/webhook_decorator.rb @@ -43,9 +43,7 @@ class WebhookDecorator < BaseDecorator title: "Test the execution of the webhook by sending a POST request to this URL", href: webhook_execution_url(represented, options[:base_url]) } - end - end end end diff --git a/lib/pact_broker/api/decorators/webhooks_decorator.rb b/lib/pact_broker/api/decorators/webhooks_decorator.rb index 3517bbce3..3b5cb2ae0 100644 --- a/lib/pact_broker/api/decorators/webhooks_decorator.rb +++ b/lib/pact_broker/api/decorators/webhooks_decorator.rb @@ -38,7 +38,6 @@ class WebhooksDecorator < BaseDecorator templated: true }] end - end end end