Deprecate old config 'server_port' #1084

Merged
merged 3 commits into from May 12, 2013

Projects

None yet

3 participants

@maul-esel
Contributor

This deprecates the no longer used server_port config option and fixes #1050.

@parkr parkr commented on an outdated diff May 11, 2013
lib/jekyll/configuration.rb
@@ -164,6 +164,15 @@ def backwards_compatibilize
config.delete('server')
end
+ if config.has_key? 'server_port'
+ Jekyll::Logger.warn "Deprecation:", "The 'server_port' configuration option" +
+ " has been renamed to 'port'. Update your config file" +
@parkr
parkr May 11, 2013 Member

Can you add a please here, please? :)

@parkr parkr commented on an outdated diff May 11, 2013
lib/jekyll/configuration.rb
@@ -164,6 +164,15 @@ def backwards_compatibilize
config.delete('server')
end
+ if config.has_key? 'server_port'
+ Jekyll::Logger.warn "Deprecation:", "The 'server_port' configuration option" +
+ " has been renamed to 'port'. Update your config file" +
+ " accordingly."
+ # copy but don't overwrite:
+ config['port'] = config['server_port'] unless config.has_key?('port')
@parkr
parkr May 11, 2013 Member

smart to preserve the old one :)

@parkr
Member
parkr commented May 11, 2013

You rock. 👍 from me! Just need @mattr-'s approval and we can merge. :)

@mattr-
Member
mattr- commented May 12, 2013

looks ok to me. 👍

@parkr parkr merged commit 9140aad into jekyll:master May 12, 2013

1 check passed

default The Travis CI build passed
Details
@maul-esel maul-esel deleted the maul-esel:deprecate-old-config branch May 12, 2013
@parkr parkr added a commit that referenced this pull request May 12, 2013
@parkr parkr Update history to reflect merge of #1084 d9e056b
@parkr parkr referenced this pull request May 12, 2013
Closed

server_port deprecated? #1050

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment