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: c73baf6206cfd9d1f744867f2b3e35e6094a2f4304dec858ce0350c1d54c03ba
4
- data.tar.gz: 82c480aa62bdcb7c19df80a1aebeb4a7cf4dbb4ec8a199b25fb4a8abe6da69a1
3
+ metadata.gz: 4ee7ad9222681a140d6978cbe7f9f8ffccbc87409f8fc67b361625049fa1d7fa
4
+ data.tar.gz: de305206530622d0e29ad038e5de13fb872ca7758a25e4266271240463077909
5
5
  SHA512:
6
- metadata.gz: 82bcf0c2b9ee5c5d0e9365641dcd7e2e6119be86e66dadee37b1bfaa44582511b2c3e7a5f2cbf31b0164dd31d4c3823090900bb4dd9bf18ea9f215babeaa2e47
7
- data.tar.gz: f0e79e3d5cd3ad4bd09fe68975e129a3528f78f5f5ec7eaa822bf37c85631a295df2d0e10acbaf483ee62fa243ce563bd1a264688e3f3b90e1884a96d5173e1c
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
- unless key
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.
@@ -19,7 +19,7 @@ module Toolchest
19
19
  end
20
20
  end
21
21
 
22
- def create_migration
22
+ def copy_migration
23
23
  case strategy
24
24
  when "token"
25
25
  migration_template "create_toolchest_tokens.rb.tt",
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
 
@@ -1,3 +1,3 @@
1
1
  module Toolchest
2
- VERSION = "0.3.6"
2
+ VERSION = "0.3.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toolchest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nora