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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a00a0de19ee6f632122b0258c6bc879fdc534bbd037904305fed174d941fa067
4
- data.tar.gz: e0863f0111e4fccd2a12a26f3b73305e8647d63bda7ba095f1823ea2aedf6641
3
+ metadata.gz: 36149e337f1a334d91a8a59cce1df6b090e621cafbb08886114f775d93cbd643
4
+ data.tar.gz: 45bc13bd494a4b4de5742f29b0919a9c77515f4c301c3f347f9235caec08d8a2
5
5
  SHA512:
6
- metadata.gz: 2187c702565f4e6342bdf3d363b010d36e7ccc1f570d093a2b1521b5ceda764c2dbe441544c4228d6dc532f71a50f7adf188012809fe8fd20e21b582f7a7a441
7
- data.tar.gz: fd9a8f33981d17923300ee7eb06a2b02f48047c305597e144689fe304bda0d4dcb4d534d9165200359ca6df82fc8f114fb21f5b0823e0b5cfb7d30073fb0822a
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 "bundle exec rspec"
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 "bundle exec rspec"
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 `bundle exec rspec` after changes"
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 "bundle exec rspec"
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 "bundle exec rspec"
262
+ else "rails test"
263
263
  end
264
264
  end
265
265
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsAiContext
4
- VERSION = "0.15.1"
4
+ VERSION = "0.15.2"
5
5
  end
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: 0.15.1
4
+ version: 0.15.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - crisnahine