Skip to content

Commit

Permalink
Replace Plek.current with Plek.new
Browse files Browse the repository at this point in the history
It's going to be deprecated alphagov/plek#94
  • Loading branch information
AgaDufrat committed Oct 5, 2022
1 parent 407f618 commit 5ace548
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/lib/services.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/presenters/content_item/shareable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion app/presenters/content_item_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/presenters/content_item/shareable_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5ace548

Please sign in to comment.