Skip to content

Commit 915a7ee

Browse files
committed
feat(resources): improve usage of title and name attributes
1 parent 3a9a178 commit 915a7ee

File tree

4 files changed

+2
-7
lines changed

4 files changed

+2
-7
lines changed

lib/pact_broker/api/decorators/pact_collection_decorator.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ def create_representable_pact pact
2929
represented.collect do | pact |
3030
{
3131
:href => latest_pact_url(options[:base_url], pact),
32-
:name => "Latest pact between #{pact.consumer.name} and #{pact.provider.name}",
33-
:title => "Pact"
32+
:title => "Latest pact between #{pact.consumer.name} and #{pact.provider.name}",
3433
}
3534
end
3635
end

lib/pact_broker/api/decorators/pact_versions_decorator.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ class PactVersionsDecorator < BaseDecorator
1111
link :self do | context |
1212
{
1313
href: context[:resource_url],
14-
title: "Pact versions",
15-
name: "All versions of the pact between #{context[:consumer_name]} and #{context[:provider_name]}"
14+
title: "All versions of the pact between #{context[:consumer_name]} and #{context[:provider_name]}"
1615
}
1716
end
1817

lib/pact_broker/api/decorators/webhook_decorator.rb

-2
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ class WebhookDecorator < BaseDecorator
4343
title: "Test the execution of the webhook by sending a POST request to this URL",
4444
href: webhook_execution_url(represented, options[:base_url])
4545
}
46-
4746
end
48-
4947
end
5048
end
5149
end

lib/pact_broker/api/decorators/webhooks_decorator.rb

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ class WebhooksDecorator < BaseDecorator
3838
templated: true
3939
}]
4040
end
41-
4241
end
4342
end
4443
end

0 commit comments

Comments
 (0)