Skip to content
This repository has been archived by the owner on Jul 7, 2024. It is now read-only.

Commit

Permalink
DRY
Browse files Browse the repository at this point in the history
  • Loading branch information
zhulik committed Jan 26, 2023
1 parent e0d3603 commit 1fbb266
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
4 changes: 0 additions & 4 deletions backup-stats-collector/function/lib/function.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# frozen_string_literal: true

require "async/process"
require "aws-sdk-s3"
require "zeitwerk"

loader = Zeitwerk::Loader.for_gem
loader.setup

Expand Down
8 changes: 6 additions & 2 deletions base/config.ru
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@
require "sinatra"
require "sentry-ruby"

require "zeitwerk"
require "async/process"
require "aws-sdk-s3"

require_relative "lib/function"

if ENV.key?("SENTRY_DSN")
Sentry.init do |config|
config.dsn = ENV.fetch("SENTRY_DSN", nil)
end
end

require_relative "lib/function"

set :bind, "0.0.0.0"

get "/healthcheck" do
Expand Down
2 changes: 0 additions & 2 deletions hass-listener/function/lib/function.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# frozen_string_literal: true

require "zeitwerk"

loader = Zeitwerk::Loader.for_gem
loader.setup

Expand Down
4 changes: 0 additions & 4 deletions time-passed/function/lib/function.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# frozen_string_literal: true

require "zeitwerk"

require "aws-sdk-s3"

loader = Zeitwerk::Loader.for_gem
loader.setup

Expand Down

0 comments on commit 1fbb266

Please sign in to comment.