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

fix: emit a deprecation warning for https and don't mention it in generated config #382

Merged
merged 2 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ _Please add entries here for your pull requests that are not yet released._
### Fixed
- Recommend `server` option instead of deprecated `https` option when `--https` is provided [PR 380](https://github.com/shakacode/shakapacker/pull/380) by [G-Rath](https://github.com/g-rath)
- Recompile assets on asset host change [PR 364](https://github.com/shakacode/shakapacker/pull/364) by [ahangarha](https://github.com/ahangarha).
- Add deprecation warning for `https` option in `shakapacker.yml` (use `server: 'https'` instead) [PR 382](https://github.com/shakacode/shakapacker/pull/382) by [G-Rath](https://github.com/g-rath).

## [v7.1.0] - September 30, 2023

Expand Down
2 changes: 0 additions & 2 deletions lib/install/config/shakapacker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ development:
# Keys not described there are documented inline and in https://github.com/shakacode/shakapacker/
dev_server:
# For running dev server with https, set `server: https`.
# You may use `https: true` instead but notice that it is deprecated in favor of `server: https`
# Ensure only one of these entries is set.
# server: https

host: localhost
Expand Down
8 changes: 7 additions & 1 deletion lib/shakapacker/dev_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ def port
end

def https?
case fetch(:https)
value = fetch(:https)

unless value.nil?
puts "WARNING: `https: true` has been deprecated in favor of `server: 'https'`"
end

case value
when true, "true", Hash
true
else
Expand Down