Skip to content

Commit

Permalink
Add PgHero
Browse files Browse the repository at this point in the history
  • Loading branch information
TomNaessens committed May 19, 2024
1 parent 247c667 commit 539e8ce
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ gem 'record_tag_helper'

# Database
gem 'pg'
gem 'pghero'
gem "pg_query", ">= 2"

group :development do
gem 'rails-erd'
Expand Down
14 changes: 14 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -499,6 +511,8 @@ DEPENDENCIES
omniauth-zeuswpi
paper_trail
pg
pg_query (>= 2)
pghero
poltergeist
puma
rails (~> 6.1)
Expand Down
5 changes: 5 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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".

Expand Down

0 comments on commit 539e8ce

Please sign in to comment.