From 6814f2aa6704d108386b6fd8b961a87ec382fc6d Mon Sep 17 00:00:00 2001 From: Jordan Owens Date: Tue, 2 Aug 2022 15:45:05 -0400 Subject: [PATCH] Deprecate Sinatra Reloader --- CHANGELOG.md | 2 ++ README.md | 5 +++-- sinatra-contrib/README.md | 4 +++- sinatra-contrib/lib/sinatra/reloader.rb | 3 +++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2554a373b9..a13a9b7c1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ * New: Add AES GCM encryption support for session cookies. [#1324] (https://github.com/sinatra/sinatra/pull/1324) by Michael Coyne +* Deprecated: Sinatra Reloader will be removed in the next major release. + * Fix: Internal Sinatra errors now extend `Sinatra::Error`. This fixes [#1204](https://github.com/sinatra/sinatra/issues/1204) and [#1518](https://github.com/sinatra/sinatra/issues/1518). [bda8c29d](https://github.com/sinatra/sinatra/commit/bda8c29d70619d53f5b1c181140638d340695514) by Jordan Owens * Fix: Preserve query param value if named route param nil. [#1676](https://github.com/sinatra/sinatra/pull/1676) by Jordan Owens diff --git a/README.md b/README.md index 874145cc27..fb26ab97ac 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,9 @@ ruby myapp.rb View at: [http://localhost:4567](http://localhost:4567) The code you changed will not take effect until you restart the server. -Please restart the server every time you change or use -[sinatra/reloader](http://www.sinatrarb.com/contrib/reloader). +Please restart the server every time you change or use a code reloader +like [rerun](https://github.com/alexch/rerun) or +[rack-unreloader](https://github.com/jeremyevans/rack-unreloader). It is recommended to also run `gem install puma`, which Sinatra will pick up if available. diff --git a/sinatra-contrib/README.md b/sinatra-contrib/README.md index d9140e7379..c39ade275d 100644 --- a/sinatra-contrib/README.md +++ b/sinatra-contrib/README.md @@ -58,7 +58,9 @@ existing APIs. Currently included: -* [`sinatra/reloader`][sinatra-reloader]: Automatically reloads Ruby files on code changes. +* [`sinatra/reloader`][sinatra-reloader]: Automatically reloads Ruby files on code changes. **DEPRECATED**: Please consider +consider using an alternative like [rerun](https://github.com/alexch/rerun) or +[rack-unreloader](https://github.com/jeremyevans/rack-unreloader) instead. ### Other Tools diff --git a/sinatra-contrib/lib/sinatra/reloader.rb b/sinatra-contrib/lib/sinatra/reloader.rb index 6c309770a7..8f7f19a9f6 100644 --- a/sinatra-contrib/lib/sinatra/reloader.rb +++ b/sinatra-contrib/lib/sinatra/reloader.rb @@ -5,6 +5,9 @@ module Sinatra # = Sinatra::Reloader # + # DEPRECATED: Please consider using an alternative like + # rerun or rack-unreloader instead. + # # Extension to reload modified files. Useful during development, # since it will automatically require files defining routes, filters, # error handlers and inline templates, with every incoming request,