forked from nicolas-brousse/view_component
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't add ActionDispatch::Static middleware continued (ViewComponent#…
…1892) * Don't add ActionDispatch::Static middleware In the case that rails do not serve static files is not necessary to add ActionDispatch::Static middleware. Making possible to deploy ViewComponenets previews on a production environment where Nginx or Apache is managing the static files. * Apply suggestions from code review Co-authored-by: Joel Hawksley <joelhawksley@github.com> * Update index.md * add: prism cdn if no asset precompiler found * edit: change prism cdn version to 1.28 * Update app/helpers/preview_helper.rb Co-authored-by: Cameron Dutro <camertron@gmail.com> * Update app/helpers/preview_helper.rb Co-authored-by: Cameron Dutro <camertron@gmail.com> * Update app/helpers/preview_helper.rb Co-authored-by: Cameron Dutro <camertron@gmail.com> * Update app/helpers/preview_helper.rb Co-authored-by: Cameron Dutro <camertron@gmail.com> * Update lib/view_component/engine.rb Co-authored-by: Cameron Dutro <camertron@gmail.com> * edit: fix brocken tests * edit: refactor tests * edit: fix for rails > 6.1 * edit: fix lint issues * Update lib/view_component/engine.rb Co-authored-by: Hans Lemuet <Spone@users.noreply.github.com> --------- Co-authored-by: Daniel Gonzalez <danigonza86@gmail.com> Co-authored-by: Joel Hawksley <joelhawksley@github.com> Co-authored-by: Cameron Dutro <camertron@gmail.com> Co-authored-by: Hans Lemuet <Spone@users.noreply.github.com>
- Loading branch information
Showing
7 changed files
with
69 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# frozen_string_literal: true | ||
|
||
require "test_helper" | ||
|
||
class ViewComponent::EngineTest < ActionDispatch::IntegrationTest | ||
def test_serve_static_previews? | ||
app.config.public_file_server.enabled = false | ||
refute ViewComponent::Engine.instance.serve_static_preview_assets?(app.config) | ||
end | ||
end |