rails-ai-context 4.5.0 → 4.5.1
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 +4 -4
- data/exe/rails-ai-context +19 -7
- data/lib/rails_ai_context/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9f75359acda5dcf480e297948934c7be7500fb3af5ff9daacd952a77105186e8
|
|
4
|
+
data.tar.gz: 17bfbc76237408f30a51d2b67bf4a5a8ed72b437bf03824bc41a937bd600477b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4cbe45e0efb3f6fc078cebd82dc0e1f6ac7246c6ea9ad53928c5588d1ddd1b937911e805f2d88f268c226d0277423860efbf860911cec5c8f1fb39c9d21d474f
|
|
7
|
+
data.tar.gz: bef426277ceda95f46d3bad899e188c6716b5d838af0b02b5d40349d3944b5a951cbe47889762b23b58b962e96fb7cd229ff2e775dedb1f35a2feb0342a8203a
|
data/exe/rails-ai-context
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
|
+
# Standalone mode: the RubyGems exe wrapper activates our gem and all transitive
|
|
5
|
+
# dependencies BEFORE this script runs. When inside a Rails app, Bundler.setup
|
|
6
|
+
# may need different versions of those deps (e.g., bigdecimal 4.1.0 activated here
|
|
7
|
+
# but Gemfile.lock wants 4.0.1). Clear non-default gem activations so Bundler can
|
|
8
|
+
# resolve cleanly. The $LOAD_PATH entries remain (Bundler.setup replaces them anyway).
|
|
9
|
+
if defined?(Gem) && Gem.respond_to?(:loaded_specs)
|
|
10
|
+
Gem.loaded_specs.delete_if { |_, spec| !spec.default_gem? }
|
|
11
|
+
end
|
|
12
|
+
|
|
4
13
|
require "thor"
|
|
5
14
|
require "yaml"
|
|
6
15
|
|
|
@@ -381,21 +390,24 @@ class RailsAiContextCLI < Thor
|
|
|
381
390
|
exit 1
|
|
382
391
|
end
|
|
383
392
|
|
|
384
|
-
#
|
|
393
|
+
# Save $LOAD_PATH before Rails boot.
|
|
385
394
|
# Bundler.setup (in config/boot.rb) strips $LOAD_PATH to Gemfile-only gems.
|
|
386
|
-
# In standalone mode (gem not in Gemfile), this
|
|
387
|
-
#
|
|
388
|
-
#
|
|
389
|
-
require
|
|
390
|
-
|
|
395
|
+
# In standalone mode (gem not in Gemfile), this removes our gem and mcp paths.
|
|
396
|
+
# We restore them after boot so lazy requires (mcp, etc.) still resolve.
|
|
397
|
+
#
|
|
398
|
+
# We do NOT require mcp or rails_ai_context before boot — that would activate
|
|
399
|
+
# gem versions that conflict with Bundler's resolution (e.g., bigdecimal).
|
|
400
|
+
# Instead, paths are restored and gems load lazily using Bundler-resolved deps.
|
|
391
401
|
pre_boot_paths = $LOAD_PATH.dup
|
|
392
402
|
|
|
393
403
|
require config_path
|
|
394
404
|
|
|
395
|
-
# Restore
|
|
405
|
+
# Restore paths that Bundler.setup stripped (standalone mode).
|
|
396
406
|
# For Gemfile users, this is a no-op — no paths were removed.
|
|
397
407
|
(pre_boot_paths - $LOAD_PATH).each { |p| $LOAD_PATH << p }
|
|
398
408
|
|
|
409
|
+
require "rails_ai_context"
|
|
410
|
+
|
|
399
411
|
RailsAiContext::Configuration.auto_load!
|
|
400
412
|
end
|
|
401
413
|
end
|