Commit 336136b

mo khan <mo@mokhan.ca>
2021-07-11 02:31:30
add github controller to try to receive a webook
1 parent f6b5e73
Changed files (3)
app/controllers/githubs_controller.rb
@@ -0,0 +1,12 @@
+class GithubsController < ApplicationController
+  skip_before_action :verify_authenticity_token
+
+  # After installation callback
+  def show
+  end
+
+  # web hooks
+  def create
+    head :no_content
+  end
+end
config/puma.rb
@@ -13,10 +13,10 @@ threads min_threads_count, max_threads_count
 #
 if ENV.fetch("RAILS_ENV", "development") == "development"
   worker_timeout 3600
-  ssl_bind('127.0.0.1', ENV.fetch("PORT") { 3000 }, {
-    cert: './config/certificate.pem',
-    key: './config/key.pem',
-  })
+  #ssl_bind('127.0.0.1', ENV.fetch("SSL_PORT") { 3443 }, {
+    #cert: './config/certificate.pem',
+    #key: './config/key.pem',
+  #})
 end
 
 # Specifies the `port` that Puma will listen on to receive requests; default is 3000.
config/routes.rb
@@ -1,6 +1,5 @@
 Rails.application.routes.draw do
-  # For details on the DSL available within this file,
-  # see https://guides.rubyonrails.org/routing.html
+  resource :github, only: [:show, :create]
   resources :sparkles, only: [:index, :create]
   resources :users, only: [:show]
   root "sparkles#index"