Skip to content

Fix: Require tilt, if Tilt module is defined#15

Open
aberkowitz wants to merge 1 commit into
migrs:masterfrom
aberkowitz:fix-require-tilt
Open

Fix: Require tilt, if Tilt module is defined#15
aberkowitz wants to merge 1 commit into
migrs:masterfrom
aberkowitz:fix-require-tilt

Conversation

@aberkowitz

Copy link
Copy Markdown

This Fixes #14.

Testing.

  1. Start a project that has both slack-ruby-client and sidekiq-scheduler as dependencies in the GemFile
  2. Start puma bundle exec puma -p 4000
  3. Browse to localhost:4000 and verify that you do not receive an error caused by Tilt module missing methods.

Notes

There might be a cleaner way to detect whether Tilt has been loaded in the tilt? method on lib/rack/server_pages.rb:193, which would not necessitate using Tilt, unless the user has explicitly required it. My ruby wizardry is shamefully lacking, and I do not know how to do this; I'm open to suggestions.

@aberkowitz

Copy link
Copy Markdown
Author

Tagging @dblock, because I encountered this situation using his library slack-ruby-bot-server, and he is probably the best person to opine on whether: this is a good solution, or there even needs to be a solution.

@dblock

dblock commented May 27, 2023

Copy link
Copy Markdown
Collaborator

Generally I don't think it's the job of the implementation to require.

I do think this project needs to move from Travis-CI to GHA, replacing https://github.com/migrs/rack-server-pages/blob/master/.travis.yml, before making any more changes :)

@dblock

dblock commented Jun 15, 2024

Copy link
Copy Markdown
Collaborator

Fixed CI in #17, maybe you want to pick this one up again @aberkowitz?

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.

Involuntary inclusion of tilt gem causes dependency failure

2 participants