diff --git a/Gemfile b/Gemfile index 45530c42..954f4cce 100644 --- a/Gemfile +++ b/Gemfile @@ -111,6 +111,8 @@ gem 'record_tag_helper' # Database gem 'pg' +gem 'pghero' +gem "pg_query", ">= 2" group :development do gem 'rails-erd' diff --git a/Gemfile.lock b/Gemfile.lock index b61c515c..f1d996ad 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -148,6 +148,14 @@ GEM ffi (1.16.3) globalid (1.2.1) activesupport (>= 6.1) + google-protobuf (4.26.1) + rake (>= 13) + google-protobuf (4.26.1-arm64-darwin) + rake (>= 13) + google-protobuf (4.26.1-x86_64-darwin) + rake (>= 13) + google-protobuf (4.26.1-x86_64-linux) + rake (>= 13) hashdiff (1.1.0) hashie (5.0.0) httparty (0.22.0) @@ -251,6 +259,10 @@ GEM ast (~> 2.4.1) racc pg (1.5.6) + pg_query (5.1.0) + google-protobuf (>= 3.22.3) + pghero (3.4.1) + activerecord (>= 6) poltergeist (1.18.1) capybara (>= 2.1, < 4) cliver (~> 0.3.1) @@ -499,6 +511,8 @@ DEPENDENCIES omniauth-zeuswpi paper_trail pg + pg_query (>= 2) + pghero poltergeist puma rails (~> 6.1) diff --git a/config/routes.rb b/config/routes.rb index cf950167..bc74727e 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -11,6 +11,11 @@ end mount Sidekiq::Web => '/sidekiq' + # PG Hero + authenticate :user, -> (user) { user.admin? } do + mount PgHero::Engine, at: "pghero" + end + # The priority is based upon order of creation: first created -> highest priority. # See how all your routes lay out with "rake routes".