rails-ai-context 5.38.0 → 5.38.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/CHANGELOG.md +10 -0
- data/docs/COMPATIBILITY.md +1 -1
- data/docs/SETUP.md +2 -3
- data/lib/rails_ai_context/initializer_settings.rb +7 -3
- data/lib/rails_ai_context/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dc6f9d299fcbb297980a2df35b574499d9f8d3e4255e2152227b0e7c4d955684
|
|
4
|
+
data.tar.gz: 3fea85a7eaa8bc7c057ccd875cf8d6f239ee51d45bd2a0ad443661d604c3df91
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 497a19810f190637d46c78d8472783895312fe78bdcbbcbbbeb01ba4dc448b44d2e85244f07899ac3a2f294716745452aeeeb9fcc824a19fdf019b8858257ad4
|
|
7
|
+
data.tar.gz: 7a4944882c737f03e6e2242017e50ef0b85215f2357ef068030497fff4ef12e2ad7bb5212a5b3e90fb4de60235c09d578e1c6c1ba868404f2d29274cc7a22423
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [5.38.1] - 2026-10-29
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **An app whose bundle resolves prism 2 can install this gem.** The gemspec
|
|
13
|
+
now takes `prism >= 1.4, < 3.0`, and a CI leg runs the suite on prism 2.1.0.
|
|
14
|
+
- **An initializer that does not parse names the line of the unclosed string,
|
|
15
|
+
heredoc, `def` or `if` under prism 2 too,** which reports a missing closer at
|
|
16
|
+
its opener. An error at the end of the input names the file's last line.
|
|
17
|
+
|
|
8
18
|
## [5.38.0] - 2026-10-27
|
|
9
19
|
|
|
10
20
|
### Security
|
data/docs/COMPATIBILITY.md
CHANGED
|
@@ -20,7 +20,7 @@ document is aspirational.
|
|
|
20
20
|
- **mcp gem:** `>= 0.13, < 2.0`
|
|
21
21
|
- **thor:** `>= 1.2, < 3.0` (1.0 and 1.1 fail to load on Ruby 3.1+: they
|
|
22
22
|
reference `DidYouMean::SPELL_CHECKERS`, which did_you_mean removed)
|
|
23
|
-
- **prism:** `>= 1.4, <
|
|
23
|
+
- **prism:** `>= 1.4, < 3.0` (CI legs pin 1.4.0 and 2.1.0 exactly on Ruby 3.2 and run the suite against each)
|
|
24
24
|
- **concurrent-ruby:** `>= 1.2, < 3.0`
|
|
25
25
|
- **zeitwerk:** `~> 2.5` (2.5 is what railties 7.0 allows; a CI leg pins 2.5.0 on Rails 7.0 and Ruby 3.1)
|
|
26
26
|
- **json:** unconstrained by this gem, but `json >= 3.0` and Rails 7.0 to 8.0 do
|
data/docs/SETUP.md
CHANGED
|
@@ -174,7 +174,7 @@ which leaves the committed file as it is.
|
|
|
174
174
|
repository's root wrote an app's own `.mcp.json`, which sessions started in
|
|
175
175
|
the app read, a `--scope local` install that reaches those sessions runs the
|
|
176
176
|
plugin beside it; `doctor` names the one to turn off.
|
|
177
|
-
- **The gem comes first.** The plugin needs rails-ai-context 5.
|
|
177
|
+
- **The gem comes first.** The plugin needs rails-ai-context 5.38.0 or later,
|
|
178
178
|
installed for the `ruby` on Claude Code's `PATH` (Ruby 3.1 or later); `gem
|
|
179
179
|
update rails-ai-context` brings an older one up. A shim version manager
|
|
180
180
|
(rbenv, asdf, or mise with its shims on `PATH`) picks that Ruby by the folder
|
|
@@ -202,8 +202,7 @@ which leaves the committed file as it is.
|
|
|
202
202
|
listed as failed in `/mcp`, and Claude Code then skips the server in new
|
|
203
203
|
sessions for about 15 minutes: reconnect it in `/mcp` once the cause is
|
|
204
204
|
fixed. A session gets no rules where the server has no tools for them to
|
|
205
|
-
name, but for a folder of several apps on
|
|
206
|
-
Windows: there
|
|
205
|
+
name, but for a folder of several apps on Windows: there
|
|
207
206
|
the rules come with a last line naming the
|
|
208
207
|
`rails-ai-context --app-path <app> tool <name>` commands to run instead.
|
|
209
208
|
- **Install the gem, not its setup, for Claude Code.** Where the app's
|
|
@@ -198,7 +198,9 @@ module RailsAiContext
|
|
|
198
198
|
result = source && AstCache.parse_string(source)
|
|
199
199
|
if result&.errors&.any?
|
|
200
200
|
error = result.errors.find { |e| e.type != :unexpected_token_close_context } || result.errors.first
|
|
201
|
-
|
|
201
|
+
line = ERRORS_AT_OPENER ? error.location.start_line : unclosed_line(result.value) || error.location.start_line
|
|
202
|
+
# An error at the end of the input sits on the line after a trailing newline.
|
|
203
|
+
found.refusals << refusal(relative, [ line, source.lines.size ].min, "this file", nil,
|
|
202
204
|
"this file does not parse as Ruby (#{error.message}), so the static tier serves nothing until it is fixed.")
|
|
203
205
|
elsif result.nil? || too_deep?(result.value)
|
|
204
206
|
found.refusals << refusal(relative, 1, "this file")
|
|
@@ -211,8 +213,10 @@ module RailsAiContext
|
|
|
211
213
|
found
|
|
212
214
|
end
|
|
213
215
|
|
|
214
|
-
#
|
|
215
|
-
#
|
|
216
|
+
# prism 2 reports a missing closer at its opener; prism 1 reports it at the end of the input, where
|
|
217
|
+
# the tree gives each unclosed node an empty closing and the innermost one is what the error names.
|
|
218
|
+
ERRORS_AT_OPENER = Gem::Version.new(Prism::VERSION) >= Gem::Version.new("2")
|
|
219
|
+
|
|
216
220
|
def unclosed_line(root)
|
|
217
221
|
stack = [ root ]
|
|
218
222
|
lines = []
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails-ai-context
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.38.
|
|
4
|
+
version: 5.38.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- crisnahine
|
|
@@ -92,7 +92,7 @@ dependencies:
|
|
|
92
92
|
version: '1.4'
|
|
93
93
|
- - "<"
|
|
94
94
|
- !ruby/object:Gem::Version
|
|
95
|
-
version: '
|
|
95
|
+
version: '3.0'
|
|
96
96
|
type: :runtime
|
|
97
97
|
prerelease: false
|
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -102,7 +102,7 @@ dependencies:
|
|
|
102
102
|
version: '1.4'
|
|
103
103
|
- - "<"
|
|
104
104
|
- !ruby/object:Gem::Version
|
|
105
|
-
version: '
|
|
105
|
+
version: '3.0'
|
|
106
106
|
- !ruby/object:Gem::Dependency
|
|
107
107
|
name: concurrent-ruby
|
|
108
108
|
requirement: !ruby/object:Gem::Requirement
|