diff --git a/app/lib/services.rb b/app/lib/services.rb index da4d5487d..41cc8bb22 100644 --- a/app/lib/services.rb +++ b/app/lib/services.rb @@ -4,7 +4,7 @@ module Services def self.content_store @content_store ||= GdsApi::ContentStore.new( - Plek.current.find("content-store"), + Plek.new.find("content-store"), # Disable caching to avoid caching a stale max-age in the cache control # headers, which would cause this app to set the wrong max-age on its # own responses diff --git a/app/presenters/content_item/shareable.rb b/app/presenters/content_item/shareable.rb index 30e98f427..f6bc1be38 100644 --- a/app/presenters/content_item/shareable.rb +++ b/app/presenters/content_item/shareable.rb @@ -28,7 +28,7 @@ def twitter_share_url end def share_url - url_encode(Plek.current.website_root + content_item["base_path"]) + url_encode(Plek.new.website_root + content_item["base_path"]) end end end diff --git a/app/presenters/content_item_presenter.rb b/app/presenters/content_item_presenter.rb index 51b96526a..024a996fd 100644 --- a/app/presenters/content_item_presenter.rb +++ b/app/presenters/content_item_presenter.rb @@ -65,7 +65,7 @@ def content_id end def web_url - Plek.current.website_root + content_item["base_path"] + Plek.new.website_root + content_item["base_path"] end def canonical_url diff --git a/test/presenters/content_item/shareable_test.rb b/test/presenters/content_item/shareable_test.rb index 229ea2e6e..b7b60e4d2 100644 --- a/test/presenters/content_item/shareable_test.rb +++ b/test/presenters/content_item/shareable_test.rb @@ -15,7 +15,7 @@ def initialize end def expected_path - url_encode("#{Plek.current.website_root}/a/base/path") + url_encode("#{Plek.new.website_root}/a/base/path") end test "presents the twitter share url" do