Skip to content

Commit 47edef5

Browse files
committed
fix: update default paths for handler and auth plugin directories
1 parent 20a69e2 commit 47edef5

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

lib/hooks/core/config_loader.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ module Core
88
# Loads and merges configuration from files and environment variables
99
class ConfigLoader
1010
DEFAULT_CONFIG = {
11-
handler_plugin_dir: "./handlers",
12-
auth_plugin_dir: nil,
11+
handler_plugin_dir: "./plugins/handlers",
12+
auth_plugin_dir: "./plugins/auth",
1313
log_level: "info",
1414
request_limit: 1_048_576,
1515
request_timeout: 30,

spec/unit/lib/hooks/core/config_loader_spec.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
config = described_class.load
88

99
expect(config).to include(
10-
handler_plugin_dir: "./handlers",
10+
handler_plugin_dir: "./plugins/handlers",
11+
auth_plugin_dir: "./plugins/auth",
1112
log_level: "info",
1213
request_limit: 1_048_576,
1314
request_timeout: 30,
@@ -33,7 +34,7 @@
3334
expect(config[:log_level]).to eq("debug")
3435
expect(config[:environment]).to eq("test")
3536
expect(config[:production]).to be false # should be false when environment is test
36-
expect(config[:handler_plugin_dir]).to eq("./handlers") # defaults should remain
37+
expect(config[:handler_plugin_dir]).to eq("./plugins/handlers") # defaults should remain
3738
end
3839
end
3940

@@ -69,7 +70,7 @@
6970
expect(config[:environment]).to eq("development")
7071
expect(config[:request_timeout]).to eq(60)
7172
expect(config[:production]).to be false
72-
expect(config[:handler_plugin_dir]).to eq("./handlers") # defaults should remain
73+
expect(config[:handler_plugin_dir]).to eq("./plugins/handlers") # defaults should remain
7374
end
7475
end
7576

@@ -185,7 +186,7 @@
185186
it "includes auth_plugin_dir in default configuration" do
186187
config = described_class.load
187188

188-
expect(config).to include(auth_plugin_dir: nil)
189+
expect(config).to include(auth_plugin_dir: "./plugins/auth")
189190
end
190191

191192
it "loads auth_plugin_dir from hash config" do

0 commit comments

Comments
 (0)