toolchest 0.3.6 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4ee7ad9222681a140d6978cbe7f9f8ffccbc87409f8fc67b361625049fa1d7fa
|
|
4
|
+
data.tar.gz: de305206530622d0e29ad038e5de13fb872ca7758a25e4266271240463077909
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3f6945c51b3a496589c4f0f5f582b7582b59a3d2b4e422bece7b3c81f40ec3e56e6994860dd6a018d09851c8a80b2437179c4a2d155160b5440a0e6fe01a42a0
|
|
7
|
+
data.tar.gz: 274c31289b34696fb6f8b7c5469ebe9d627d94880aa57b9b7fd1834f0eca9706078a75e64917198bb966f153f18547fddb276f4ffd6151a5cb2fa8732e3b147e
|
|
@@ -37,14 +37,9 @@ module Toolchest
|
|
|
37
37
|
# Returns [mount_path, config] or renders 404 and returns [nil, nil].
|
|
38
38
|
def resolve_mount
|
|
39
39
|
if params[:rest].present?
|
|
40
|
-
# Suffixed path (RFC 8414) — must match a configured mount exactly.
|
|
41
40
|
path = "/#{params[:rest]}"
|
|
42
41
|
key = Toolchest.mount_keys.find { |k| Toolchest.configuration(k).mount_path == path }
|
|
43
|
-
|
|
44
|
-
head :not_found
|
|
45
|
-
return [nil, nil]
|
|
46
|
-
end
|
|
47
|
-
return [path, Toolchest.configuration(key)]
|
|
42
|
+
return [path, Toolchest.configuration(key)] if key
|
|
48
43
|
end
|
|
49
44
|
|
|
50
45
|
# No suffix (e.g. Cursor). Use default_oauth_mount if set.
|
data/lib/toolchest/app.rb
CHANGED
|
@@ -17,6 +17,12 @@ module Toolchest
|
|
|
17
17
|
def call(env)
|
|
18
18
|
Engine.ensure_initialized!
|
|
19
19
|
env["toolchest.mount_key"] = @mount_key.to_s
|
|
20
|
+
|
|
21
|
+
cfg = Toolchest.configuration(@mount_key)
|
|
22
|
+
if cfg.mount_path.nil? && env["SCRIPT_NAME"].present?
|
|
23
|
+
cfg.mount_path = env["SCRIPT_NAME"]
|
|
24
|
+
end
|
|
25
|
+
|
|
20
26
|
@router.call(env)
|
|
21
27
|
end
|
|
22
28
|
|
data/lib/toolchest/version.rb
CHANGED