summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2021-07-10 20:04:25 -0600
committermo khan <mo@mokhan.ca>2021-07-10 20:04:25 -0600
commitf6b5e73fd47c5695ab2bfb63f255c65deb33d165 (patch)
tree58a1017e6f2c69542b19f22fbda24b7224c22902
parenta970d44aa5e5c96751adb0b7fc263f6f025d59f5 (diff)
chore: connect to ngrok
-rw-r--r--.env1
-rw-r--r--.gitignore1
-rw-r--r--.ruby-version2
-rw-r--r--Gemfile5
-rw-r--r--Gemfile.lock8
-rw-r--r--config/application.rb2
-rw-r--r--config/environments/development.rb2
-rw-r--r--config/puma.rb2
8 files changed, 16 insertions, 7 deletions
diff --git a/.env b/.env
new file mode 100644
index 0000000..cdd4472
--- /dev/null
+++ b/.env
@@ -0,0 +1 @@
+NGROK_HOST=invalid.ngrok.io
diff --git a/.gitignore b/.gitignore
index 4de764e..9f52518 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,3 +38,4 @@ yarn-debug.log*
config/*.pem
Brewfile.lock.json
+.env.local
diff --git a/.ruby-version b/.ruby-version
index 85588be..45418de 100644
--- a/.ruby-version
+++ b/.ruby-version
@@ -1 +1 @@
-ruby-3.0.0
+ruby-3.0.1
diff --git a/Gemfile b/Gemfile
index 42f6bf1..5885563 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,7 +1,8 @@
source 'https://rubygems.org'
-gem 'gemoji'
-gem 'octicons_helper'
+gem 'dotenv', '~> 2.7'
+gem 'gemoji', '~> 3.0'
+gem 'octicons_helper', '~> 11.3'
gem 'primer_view_components', '0.0.14'
gem 'puma', '~> 5.0'
gem 'rails', '~> 6.1.3'
diff --git a/Gemfile.lock b/Gemfile.lock
index fd8f90a..3e33caa 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -63,6 +63,7 @@ GEM
builder (3.2.4)
concurrent-ruby (1.1.9)
crass (1.0.6)
+ dotenv (2.7.6)
erubi (1.10.0)
gemoji (3.0.1)
globalid (0.4.2)
@@ -156,8 +157,9 @@ PLATFORMS
ruby
DEPENDENCIES
- gemoji
- octicons_helper
+ dotenv (~> 2.7)
+ gemoji (~> 3.0)
+ octicons_helper (~> 11.3)
primer_view_components (= 0.0.14)
puma (~> 5.0)
rails (~> 6.1.3)
@@ -165,4 +167,4 @@ DEPENDENCIES
webpacker (~> 5.0)
BUNDLED WITH
- 2.2.22
+ 2.2.23
diff --git a/config/application.rb b/config/application.rb
index f3c3564..e94642d 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -1,5 +1,6 @@
require_relative "boot"
+require "dotenv"
require "rails"
require "active_model/railtie"
require "active_record/railtie"
@@ -8,6 +9,7 @@ require "action_view/railtie"
require "rails/test_unit/railtie"
require "primer/view_components/engine"
+Dotenv.load(".env.local", ".env.#{Rails.env}", ".env")
Bundler.require(*Rails.groups)
module Sparkles
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 6996a45..926a822 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -58,4 +58,6 @@ Rails.application.configure do
# Uncomment if you wish to allow Action Cable access from any origin.
# config.action_cable.disable_request_forgery_protection = true
+
+ config.hosts << ENV.fetch('NGROK_HOST')
end
diff --git a/config/puma.rb b/config/puma.rb
index d35cc07..623cba5 100644
--- a/config/puma.rb
+++ b/config/puma.rb
@@ -21,7 +21,7 @@ end
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
#
-#port ENV.fetch("PORT") { 3000 }
+port ENV.fetch("PORT") { 3000 }
# Specifies the `environment` that Puma will run in.
#