rails-ai-context 0.15.1 → 0.15.2
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 +6 -0
- data/lib/rails_ai_context/serializers/claude_serializer.rb +2 -2
- data/lib/rails_ai_context/serializers/copilot_serializer.rb +11 -1
- data/lib/rails_ai_context/serializers/markdown_serializer.rb +10 -0
- data/lib/rails_ai_context/serializers/opencode_serializer.rb +2 -2
- 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: 36149e337f1a334d91a8a59cce1df6b090e621cafbb08886114f775d93cbd643
|
|
4
|
+
data.tar.gz: 45bc13bd494a4b4de5742f29b0919a9c77515f4c301c3f347f9235caec08d8a2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 05aa1e4216100cc18572615abf83ea1e22cb1faf77b594a9cb9fea4a4bfab2919a18189a5648455598b051aa6e8b89db00c39ae7ad3018f82aa95bb4bc760064
|
|
7
|
+
data.tar.gz: eb59ad0f7fa0c3df2147bb31f1f9b85a69a1a461fd248ade6f97928ed775d727537ddab744aea83284ed6931a0ab997e6c5c46f6e0f716cc5a5f4724b6f4890f
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ 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
|
+
## [0.15.2] - 2026-03-22
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **Test command detection** — Serializers now use detected test framework (minitest → `rails test`, rspec → `bundle exec rspec`) instead of hardcoding `bundle exec rspec`. Default is `rails test` (the Rails default). Contributed by @curi (PR #13).
|
|
13
|
+
|
|
8
14
|
## [0.15.1] - 2026-03-22
|
|
9
15
|
|
|
10
16
|
### Fixed
|
|
@@ -278,7 +278,7 @@ module RailsAiContext
|
|
|
278
278
|
case framework
|
|
279
279
|
when "rspec" then "bundle exec rspec"
|
|
280
280
|
when "minitest" then "rails test"
|
|
281
|
-
else "
|
|
281
|
+
else "rails test"
|
|
282
282
|
end
|
|
283
283
|
end
|
|
284
284
|
|
|
@@ -307,7 +307,7 @@ module RailsAiContext
|
|
|
307
307
|
case framework
|
|
308
308
|
when "rspec" then "bundle exec rspec"
|
|
309
309
|
when "minitest" then "rails test"
|
|
310
|
-
else "
|
|
310
|
+
else "rails test"
|
|
311
311
|
end
|
|
312
312
|
end
|
|
313
313
|
|
|
@@ -137,11 +137,21 @@ module RailsAiContext
|
|
|
137
137
|
lines << "## Conventions"
|
|
138
138
|
lines << "- Follow existing patterns and naming conventions"
|
|
139
139
|
lines << "- Use MCP tools to check schema before writing migrations"
|
|
140
|
-
lines << "- Run `
|
|
140
|
+
lines << "- Run `#{detect_test_command}` after changes"
|
|
141
141
|
lines << ""
|
|
142
142
|
|
|
143
143
|
lines.join("\n")
|
|
144
144
|
end
|
|
145
|
+
|
|
146
|
+
def detect_test_command
|
|
147
|
+
tests = context[:tests]
|
|
148
|
+
framework = tests.is_a?(Hash) ? tests[:framework] : nil
|
|
149
|
+
case framework
|
|
150
|
+
when "rspec" then "bundle exec rspec"
|
|
151
|
+
when "minitest" then "rails test"
|
|
152
|
+
else "rails test"
|
|
153
|
+
end
|
|
154
|
+
end
|
|
145
155
|
end
|
|
146
156
|
|
|
147
157
|
# Internal: full-mode Copilot serializer (wraps MarkdownSerializer)
|
|
@@ -503,6 +503,16 @@ module RailsAiContext
|
|
|
503
503
|
_This context file is auto-generated. Run `rails ai:context` to regenerate._
|
|
504
504
|
MD
|
|
505
505
|
end
|
|
506
|
+
|
|
507
|
+
def detect_test_command
|
|
508
|
+
tests = context[:tests]
|
|
509
|
+
framework = tests.is_a?(Hash) ? tests[:framework] : nil
|
|
510
|
+
case framework
|
|
511
|
+
when "rspec" then "bundle exec rspec"
|
|
512
|
+
when "minitest" then "rails test"
|
|
513
|
+
else "rails test"
|
|
514
|
+
end
|
|
515
|
+
end
|
|
506
516
|
end
|
|
507
517
|
end
|
|
508
518
|
end
|
|
@@ -233,7 +233,7 @@ module RailsAiContext
|
|
|
233
233
|
case framework
|
|
234
234
|
when "rspec" then "bundle exec rspec"
|
|
235
235
|
when "minitest" then "rails test"
|
|
236
|
-
else "
|
|
236
|
+
else "rails test"
|
|
237
237
|
end
|
|
238
238
|
end
|
|
239
239
|
|
|
@@ -259,7 +259,7 @@ module RailsAiContext
|
|
|
259
259
|
case framework
|
|
260
260
|
when "rspec" then "bundle exec rspec"
|
|
261
261
|
when "minitest" then "rails test"
|
|
262
|
-
else "
|
|
262
|
+
else "rails test"
|
|
263
263
|
end
|
|
264
264
|
end
|
|
265
265
|
|