Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yabeda-hanami #74

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lauth/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ gem "rom-factory", "~> 0.11.0"
gem "rom-sql", "~> 3.6", git: "https://github.com/mlibrary/rom-sql.git", tag: "v3.6.2-0.1"
gem "mysql2"

gem "yabeda-hanami", "~> 0.1"
gem "yabeda-http_requests", "~> 0.2"
gem "yabeda-puma-plugin", "~> 0.7"
gem "yabeda-prometheus", "~> 0.9"

group :development do
gem "hanami-webconsole", "~> #{HANAMI_VERSION}"
gem "guard-puma"
Expand Down
161 changes: 94 additions & 67 deletions lauth/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,25 @@ GIT
GEM
remote: https://rubygems.org/
specs:
anyway_config (2.6.3)
ruby-next-core (~> 1.0)
ast (2.4.2)
better_errors (2.10.1)
coderay (>= 1.0.0)
erubi (>= 1.0.0)
rack (>= 0.9.0)
rouge (>= 1.0.0)
bigdecimal (3.1.4)
binding_of_caller (1.0.0)
debug_inspector (>= 0.0.1)
bigdecimal (3.1.7)
binding_of_caller (1.0.1)
debug_inspector (>= 1.2.0)
coderay (1.1.3)
concurrent-ruby (1.2.2)
concurrent-ruby (1.2.3)
database_cleaner-core (2.0.1)
database_cleaner-sequel (2.0.2)
database_cleaner-core (~> 2.0.0)
sequel
debug_inspector (1.1.0)
diff-lcs (1.5.0)
dotenv (2.8.1)
debug_inspector (1.2.0)
diff-lcs (1.5.1)
dotenv (3.1.0)
dry-auto_inject (1.0.1)
dry-core (~> 1.0)
zeitwerk (~> 2.6)
Expand Down Expand Up @@ -75,7 +76,8 @@ GEM
dry-inflector (~> 1.0, < 2)
dry-transformer (1.0.1)
zeitwerk (~> 2.6)
dry-types (1.7.1)
dry-types (1.7.2)
bigdecimal (~> 3.0)
concurrent-ruby (~> 1.0)
dry-core (~> 1.0)
dry-inflector (~> 1.0)
Expand Down Expand Up @@ -106,69 +108,69 @@ GEM
guard (~> 2.14)
guard-compat (~> 1.2)
puma (>= 4.0, < 7)
hanami (2.1.0.rc2)
hanami (2.1.0)
bundler (>= 1.16, < 3)
dry-configurable (~> 1.0, < 2)
dry-core (~> 1.0, < 2)
dry-inflector (~> 1.0, < 2)
dry-logger (~> 1.0, < 2)
dry-monitor (~> 1.0, >= 1.0.1, < 2)
dry-system (~> 1.0, < 2)
hanami-cli (~> 2.1.rc)
hanami-utils (~> 2.1.rc)
hanami-cli (~> 2.1)
hanami-utils (~> 2.1)
zeitwerk (~> 2.6)
hanami-assets (2.1.0.rc2)
hanami-assets (2.1.0)
zeitwerk (~> 2.6)
hanami-cli (2.1.0.rc2)
hanami-cli (2.1.1)
bundler (~> 2.1)
dry-cli (~> 1.0, < 2)
dry-files (~> 1.0, >= 1.0.2, < 2)
dry-inflector (~> 1.0, < 2)
rake (~> 13.0)
zeitwerk (~> 2.6)
hanami-controller (2.1.0.rc2)
hanami-controller (2.1.0)
dry-configurable (~> 1.0, < 2)
dry-core (~> 1.0)
hanami-utils (~> 2.1.rc)
hanami-utils (~> 2.1)
rack (~> 2.0)
zeitwerk (~> 2.6)
hanami-reloader (2.1.0.rc2)
hanami-cli (~> 2.1.rc)
hanami-reloader (2.1.0)
hanami-cli (~> 2.1)
zeitwerk (~> 2.6)
hanami-router (2.1.0.rc2)
hanami-router (2.1.0)
mustermann (~> 3.0)
mustermann-contrib (~> 3.0)
rack (~> 2.0)
hanami-rspec (2.1.0.rc2)
hanami-cli (~> 2.1.rc)
hanami-rspec (2.1.0)
hanami-cli (~> 2.1)
rake (~> 13.0)
rspec (~> 3.12)
zeitwerk (~> 2.6)
hanami-utils (2.1.0.rc2)
hanami-utils (2.1.0)
concurrent-ruby (~> 1.0)
dry-core (~> 1.0, < 2)
dry-transformer (~> 1.0, < 2)
hanami-validations (2.1.0.rc2)
hanami-validations (2.1.0)
dry-validation (>= 1.10, < 2)
zeitwerk (~> 2.6.0)
hanami-view (2.1.0.rc2)
hanami-view (2.1.0)
dry-configurable (~> 1.0)
dry-core (~> 1.0)
dry-inflector (~> 1.0, < 2)
temple (~> 0.10.0, >= 0.10.2)
tilt (~> 2.3)
zeitwerk (~> 2.6)
hanami-webconsole (2.1.0.rc2)
hanami-webconsole (2.1.0)
better_errors (~> 2.10, >= 2.10.1)
binding_of_caller (~> 1.0)
hansi (0.2.1)
i18n (1.14.1)
i18n (1.14.4)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
json (2.6.3)
json (2.7.2)
language_server-protocol (3.17.0.3)
lint_roller (1.1.0)
listen (3.8.0)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
lumberjack (1.2.10)
Expand All @@ -178,31 +180,32 @@ GEM
mustermann-contrib (3.0.0)
hansi (~> 0.2.0)
mustermann (= 3.0.0)
mysql2 (0.5.5)
mysql2 (0.5.6)
nenv (0.3.0)
nio4r (2.5.9)
nio4r (2.7.1)
notiffany (0.1.3)
nenv (~> 0.1)
shellany (~> 0.0)
parallel (1.23.0)
parser (3.2.2.4)
parallel (1.24.0)
parser (3.3.0.5)
ast (~> 2.4.1)
racc
prometheus-client (4.2.2)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
puma (6.4.0)
puma (6.4.2)
nio4r (~> 2.0)
racc (1.7.3)
rack (2.2.8)
rack (2.2.9)
rack-test (2.1.0)
rack (>= 1.3)
rainbow (3.1.1)
rake (13.1.0)
rake (13.2.1)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
regexp_parser (2.8.2)
regexp_parser (2.9.0)
rexml (3.2.6)
rom (5.3.0)
rom-changeset (~> 5.3, >= 5.3.0)
Expand All @@ -212,7 +215,7 @@ GEM
dry-core (~> 1.0)
rom-core (~> 5.3)
transproc (~> 1.0, >= 1.1.0)
rom-core (5.3.0)
rom-core (5.3.1)
concurrent-ruby (~> 1.1)
dry-configurable (~> 1.0)
dry-core (~> 1.0)
Expand All @@ -231,64 +234,84 @@ GEM
dry-core (~> 1.0)
dry-initializer (~> 3.0, >= 3.0.1)
rom-core (~> 5.3, >= 5.3.0)
rouge (4.2.0)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.3)
rouge (4.2.1)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.0)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.6)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.1)
rubocop (1.57.2)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rubocop (1.62.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.4)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-performance (1.19.1)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-ast (1.31.2)
parser (>= 3.3.0.4)
rubocop-performance (1.20.2)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-next-core (1.0.2)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
sequel (5.74.0)
sequel (5.79.0)
bigdecimal
shellany (0.0.1)
standard (1.32.0)
sniffer (0.5.0)
anyway_config (>= 1.0)
dry-initializer (~> 3)
standard (1.35.1)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.57.2)
rubocop (~> 1.62.0)
standard-custom (~> 1.0.0)
standard-performance (~> 1.2)
standard-performance (~> 1.3)
standard-custom (1.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.50)
standard-performance (1.2.1)
standard-performance (1.3.1)
lint_roller (~> 1.1)
rubocop-performance (~> 1.19.1)
rubocop-performance (~> 1.20.2)
temple (0.10.3)
thor (1.3.0)
thor (1.3.1)
tilt (2.3.0)
transproc (1.1.1)
unicode-display_width (2.5.0)
zeitwerk (2.6.12)
yabeda (0.12.0)
anyway_config (>= 1.0, < 3)
concurrent-ruby
dry-initializer
yabeda-hanami (0.1.1)
hanami (~> 2.1)
yabeda (~> 0.12)
yabeda-http_requests (0.2.1)
sniffer
yabeda
yabeda-prometheus (0.9.1)
prometheus-client (>= 3.0, < 5.0)
rack
yabeda (~> 0.10)
yabeda-puma-plugin (0.7.1)
json
puma
yabeda (~> 0.5)
zeitwerk (2.6.13)

PLATFORMS
aarch64-linux
arm64-darwin-22
x86_64-linux

DEPENDENCIES
database_cleaner-sequel
Expand All @@ -312,6 +335,10 @@ DEPENDENCIES
rom-factory (~> 0.11.0)
rom-sql (~> 3.6)!
standard
yabeda-hanami (~> 0.1)
yabeda-http_requests (~> 0.2)
yabeda-prometheus (~> 0.9)
yabeda-puma-plugin (~> 0.7)

BUNDLED WITH
2.4.21
3 changes: 3 additions & 0 deletions lauth/config.ru
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# frozen_string_literal: true

require "hanami/boot"
require "yabeda/prometheus"

use Yabeda::Prometheus::Exporter

run Hanami.app
21 changes: 21 additions & 0 deletions lauth/config/providers/instrument.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# frozen_string_literal: true

require "yabeda/hanami"

Hanami.app.register_provider :instrument, namespace: true do
prepare do
Yabeda::Hanami.install!

config = Yabeda::Hanami.config

config.notifications = target["notifications"]

Yabeda.configure!
end

start do
_config = Yabeda::Hanami.config

Yabeda::Hanami.subscribe!
end
end