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

Don't add ActionDispatch::Static middleware continued #1892

Merged
merged 22 commits into from
Nov 7, 2023

Conversation

reeganviljoen
Copy link
Collaborator

What are you trying to accomplish?

I am attempting to finish #1091 by adding prism through a cdn when no asset pipeline is present

What approach did you choose and why?

When their is no asset pipeline I decided to serve prism through a cdn

danigonza and others added 8 commits October 7, 2021 19:31
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.
Copy link
Contributor

@camertron camertron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for picking this up @reeganviljoen!

app/helpers/preview_helper.rb Outdated Show resolved Hide resolved
app/helpers/preview_helper.rb Outdated Show resolved Hide resolved
app/helpers/preview_helper.rb Outdated Show resolved Hide resolved
app/helpers/preview_helper.rb Outdated Show resolved Hide resolved
lib/view_component/engine.rb Outdated Show resolved Hide resolved
@reeganviljoen
Copy link
Collaborator Author

@camertron can you please re-review this when you can 🙏

Copy link
Contributor

@camertron camertron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @reeganviljoen, looks good 👍

@reeganviljoen
Copy link
Collaborator Author

@camertron Its been rebased and is ready to merge 🙏

lib/view_component/engine.rb Outdated Show resolved Hide resolved
@camertron camertron merged commit 00cdde8 into ViewComponent:main Nov 7, 2023
claudiob pushed a commit to claudiob/view_component that referenced this pull request Dec 22, 2023
…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 <[email protected]>

* 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 <[email protected]>

* Update app/helpers/preview_helper.rb

Co-authored-by: Cameron Dutro <[email protected]>

* Update app/helpers/preview_helper.rb

Co-authored-by: Cameron Dutro <[email protected]>

* Update app/helpers/preview_helper.rb

Co-authored-by: Cameron Dutro <[email protected]>

* Update lib/view_component/engine.rb

Co-authored-by: Cameron Dutro <[email protected]>

* 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 <[email protected]>

---------

Co-authored-by: Daniel Gonzalez <[email protected]>
Co-authored-by: Joel Hawksley <[email protected]>
Co-authored-by: Cameron Dutro <[email protected]>
Co-authored-by: Hans Lemuet <[email protected]>
claudiob pushed a commit to claudiob/view_component that referenced this pull request Jan 3, 2024
…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 <[email protected]>

* 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 <[email protected]>

* Update app/helpers/preview_helper.rb

Co-authored-by: Cameron Dutro <[email protected]>

* Update app/helpers/preview_helper.rb

Co-authored-by: Cameron Dutro <[email protected]>

* Update app/helpers/preview_helper.rb

Co-authored-by: Cameron Dutro <[email protected]>

* Update lib/view_component/engine.rb

Co-authored-by: Cameron Dutro <[email protected]>

* 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 <[email protected]>

---------

Co-authored-by: Daniel Gonzalez <[email protected]>
Co-authored-by: Joel Hawksley <[email protected]>
Co-authored-by: Cameron Dutro <[email protected]>
Co-authored-by: Hans Lemuet <[email protected]>
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.

4 participants