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

Could this gem be rails independent? #19

Closed
oliverswitzer opened this issue Mar 8, 2019 · 5 comments
Closed

Could this gem be rails independent? #19

oliverswitzer opened this issue Mar 8, 2019 · 5 comments

Comments

@oliverswitzer
Copy link

Was hoping to make use of this really useful gem for my simple sinatra app but unfortunately it looks like it depends on Rails concerns and active support.

This doesn't seem super necessary, however, and was wondering about the possibility of making this gem capable of working without being used in a rails context?

@ssaunier
Copy link
Owner

ssaunier commented Mar 9, 2019

You're right I could have avoided it, the implementation I chose was to be plug & play in a Rails controller. It uses 2 features of ActiveSupport:

  • Concerns
  • HashWithIndifferentAccess

All the logic is in this file: https://github.com/ssaunier/github_webhook/blob/master/lib/github_webhook/processor.rb

@nickhammond
Copy link

@chrismytton built something similar for Sinatra https://github.com/chrismytton/sinatra-github_webhooks.

@chrismytton
Copy link

Thanks for the plug, @nickhammond 🙂

I also made a pure Rack solution rack-github_webhooks, which works without Sinatra or Rails.

@ssaunier
Copy link
Owner

Thank you @nickhammond & @chrismytton!

Closing this issue as there are alternative gems now 🍾

@ssaunier
Copy link
Owner

FYI I added those two alternatives to the README

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

No branches or pull requests

4 participants