Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Jekyll server monkey-patch to mirror Core #499

Merged
merged 1 commit into from
Sep 26, 2019

Conversation

ashmaroli
Copy link
Member

@ashmaroli ashmaroli commented Sep 25, 2019

Summary

  • Mark the methods as private since #start_up_webrick is a private method in the upstream command class
  • From Jekyll 3.7 onward, local variable server is an instance_variable in the overridden method upstream

Reference

The upstream method definition as of v4.0.0:

    def start_up_webrick(opts, destination)
      @reload_reactor.start(opts) if opts["livereload"]

      @server = WEBrick::HTTPServer.new(webrick_opts(opts)).tap { |o| o.unmount("") }
      @server.mount(opts["baseurl"].to_s, Servlet, destination, file_handler_opts)

      Jekyll.logger.info "Server address:", server_address(@server, opts)
      launch_browser @server, opts if opts["open_url"]
      boot_or_detach @server, opts
    end

* Mark the methods as `private` since #start_up_webrick is a private method
  in the upstream command class
* From Jekyll 3.7 onwards, local variable `server` is an instance_variable
  in the overridden method upstream
@ashmaroli ashmaroli merged commit af53dd8 into jekyll:master Sep 26, 2019
@ashmaroli ashmaroli deleted the patch-monkey-patch branch September 26, 2019 13:45
@zocoi
Copy link
Contributor

zocoi commented Sep 27, 2019

Just want to say thank you for the work to make this gem compatible with parent 4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants