Skip to content

Commit

Permalink
Merge pull request #92 from alphagov/sengi/version
Browse files Browse the repository at this point in the history
Release version 4.1.0.
  • Loading branch information
sengi authored Oct 3, 2022
2 parents 586d0c0 + cdadda1 commit 0f9c8e8
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 5 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

# Unreleased

Nothing yet.

# 4.1.0

* Deprecate usage of `Plek.current` this method will be removed in next
major version. This adds a warning for users.
* Remove public setter methods for `parent_domain` and `external_domain`.
These are not used anywhere so there are no API compatibility issues.
* Allow setting `GOVUK_APP_DOMAIN=""` (empty string). Similarly for
`GOVUK_APP_DOMAIN_EXTERNAL`. This allows single-label domains to be used in
service URLs instead of FQDNs, which eliminates a lot of configuration
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source "http://rubygems.org"
source "https://rubygems.org"

# Specify your gem's dependencies in plek.gemspec
gemspec
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ component, for example `frontend` or `content-store`, as opposed to

## Versioning policy

This is versioned according to [Semantic Versioning 2.0](http://semver.org/)
This is versioned according to [Semantic Versioning 2.0](https://semver.org/)
5 changes: 4 additions & 1 deletion lib/plek.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ class << self
# Plek.current.find('foo')
# as well as the new style:
# Plek.new.find('foo')
alias_method :current, :new
def current(...)
warn "Plek.current is deprecated and will be removed. Use Plek.new or Plek.find instead."
new(...)
end

# Convenience wrapper. The same as calling +Plek.new.find+.
# @see #find
Expand Down
2 changes: 1 addition & 1 deletion lib/plek/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class Plek
VERSION = "4.0.0".freeze
VERSION = "4.1.0".freeze
end
6 changes: 5 additions & 1 deletion test/plek_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ def test_should_return_dash_divided_source_in_production

def test_should_be_able_to_use_current_for_old_style_calls
ClimateControl.modify GOVUK_APP_DOMAIN: "foo.bar.baz" do
assert_equal Plek.new.find("foo"), Plek.current.find("foo")
old_style = nil
assert_output("", "Plek.current is deprecated and will be removed. Use Plek.new or Plek.find instead.\n") do
old_style = Plek.current.find("foo")
end
assert_equal Plek.new.find("foo"), old_style
end
end

Expand Down

0 comments on commit 0f9c8e8

Please sign in to comment.