Skip to content

Commit

Permalink
revert dotenv in Gemfile, leverage vanilla ENV for db switcher
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Kulp committed Feb 4, 2025
1 parent 49b1f97 commit a5200d8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
5 changes: 2 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require 'dotenv/load'
source 'https://rubygems.org'

# database, ORM, server
Expand All @@ -19,13 +18,13 @@ gem 'puppeteer-ruby', '~> 0.45.6'
# image processing
gem 'mini_magick', '~> 4.12.0'

if ENV['BYOS_DATABASE'] == 'sqlite'
byos_database = ENV.fetch('BYOS_DATABASE', 'pg')
if byos_database == 'sqlite'
gem 'sqlite3'
else
gem 'pg'
end


group :development, :test do
gem 'debug'
end
7 changes: 2 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2024.1203)
mini_magick (4.12.0)
mini_portile2 (2.8.8)
minitest (5.25.4)
mustermann (3.0.3)
ruby2_keywords (~> 0.0.1)
nio4r (2.7.4)
pg (1.5.9)
pry (0.15.2)
coderay (~> 1.1)
method_source (~> 1.0)
Expand Down Expand Up @@ -107,9 +107,6 @@ GEM
sinatra-activerecord (2.0.28)
activerecord (>= 4.1)
sinatra (>= 1.0)
sqlite3 (2.5.0)
mini_portile2 (~> 2.8.0)
sqlite3 (2.5.0-x86_64-darwin)
stringio (3.1.2)
tilt (2.6.0)
timeout (0.4.2)
Expand All @@ -133,13 +130,13 @@ DEPENDENCIES
forme
json
mini_magick (~> 4.12.0)
pg
pry
puma
puppeteer-ruby (~> 0.45.6)
rackup
rake
sinatra-activerecord
sqlite3

BUNDLED WITH
2.5.6
1 change: 0 additions & 1 deletion dotenv-sample
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
BASE_URL="http://192.168.68.57:4567"
APP_ENV="production"
BYOS_DATABASE= # 'sqlite' or 'pg' - leave blank for postgres

0 comments on commit a5200d8

Please sign in to comment.