ruby_llm-contract 0.4.0 → 0.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a423ef1b370ae97651d256fdc3776bd895d1eebc81a2b1c4adac305292e2a7a0
4
- data.tar.gz: 685ec9b00a369748ca897e38ae498e26d9fc31644aac8c41f096a704bceadd7d
3
+ metadata.gz: f8cbf4696de5e80a05baefbeda7e91e7afc322ead379e52da1e0457fae3a8ca2
4
+ data.tar.gz: 67bd866954f134939d0fa87222212bd665a9d1e2ba0e3248a061f55b67ad72c8
5
5
  SHA512:
6
- metadata.gz: 34ab0e678a2de57812a7b8391d406cabe3bb13cf0399669a9bcba18609fc69488d0ef4d2e4a6675436da71fc9b67d3f4c9e264e8fdbef475b07d020d9d8b9d34
7
- data.tar.gz: 3aca7548473e4f6e32df442296344013d6081564b56fb5d0081aefc1ea0ab6129896ed852e723c2678548d265797e3568fc4bcf0ca219ca6e220c9ecba35bc9c
6
+ metadata.gz: c4efd526237cd354739f4868cbe020211aa27878d9dd590c828d5e7a18d613a62664bf839f51e704917a94926c55e0546938316fa3ff6367cfdb5d06263443ad
7
+ data.tar.gz: 0ba0ac4f55716b360f0702d137fbdc48edfc2e9fba8c4e04d5adbe45ef561c4b1cd65c14793e1b868b3716e7417bdfdb9bb67eef2ab4f3ca69c74a4b3e911844
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.1 (2026-03-24)
4
+
5
+ - **RakeTask `:environment` fix** — uses `defined?(::Rails)` instead of `Rake::Task.task_defined?(:environment)`. Works in Rails 8 without manual `Rake::Task.enhance`.
6
+ - **Concurrent eval deterministic** — `clone_for_concurrency` protocol, `ContextHelpers` extracted.
7
+ - **README** — added eval history, concurrency, quality tracking examples.
8
+
3
9
  ## 0.4.0 (2026-03-24)
4
10
 
5
11
  Observability & Scale — see what changed, run it fast, debug it easily.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby_llm-contract (0.4.0)
4
+ ruby_llm-contract (0.4.1)
5
5
  dry-types (~> 1.7)
6
6
  ruby_llm (~> 1.0)
7
7
  ruby_llm-schema (~> 0.3)
@@ -165,7 +165,7 @@ CHECKSUMS
165
165
  rubocop-ast (1.49.1) sha256=4412f3ee70f6fe4546cc489548e0f6fcf76cafcfa80fa03af67098ffed755035
166
166
  ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
167
167
  ruby_llm (1.14.0) sha256=57c6f7034fc4a44504ea137d70f853b07824f1c1cdbe774ab3ab3522e7098deb
168
- ruby_llm-contract (0.4.0)
168
+ ruby_llm-contract (0.4.1)
169
169
  ruby_llm-schema (0.3.0) sha256=a591edc5ca1b7f0304f0e2261de61ba4b3bea17be09f5cf7558153adfda3dec6
170
170
  unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
171
171
  unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
data/README.md CHANGED
@@ -135,6 +135,28 @@ expect(ClassifyTicket).to pass_eval("regression")
135
135
  .without_regressions
136
136
  ```
137
137
 
138
+ ## Track quality over time
139
+
140
+ ```ruby
141
+ # Save every eval run
142
+ report = ClassifyTicket.run_eval("regression", context: { model: "gpt-4.1-nano" })
143
+ report.save_history!(model: "gpt-4.1-nano")
144
+
145
+ # View trend
146
+ history = report.eval_history(model: "gpt-4.1-nano")
147
+ history.score_trend # => :stable_or_improving | :declining
148
+ history.drift? # => true (score dropped > 10%)
149
+ ```
150
+
151
+ ## Run evals fast
152
+
153
+ ```ruby
154
+ # 4x faster with parallel execution
155
+ report = ClassifyTicket.run_eval("regression",
156
+ context: { model: "gpt-4.1-nano" },
157
+ concurrency: 4)
158
+ ```
159
+
138
160
  ## Predict cost before running
139
161
 
140
162
  ```ruby
@@ -98,7 +98,7 @@ module RubyLLM
98
98
  end
99
99
 
100
100
  def task_prerequisites
101
- Rake::Task.task_defined?(:environment) ? [:environment] : []
101
+ defined?(::Rails) ? [:environment] : []
102
102
  end
103
103
  end
104
104
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RubyLLM
4
4
  module Contract
5
- VERSION = "0.4.0"
5
+ VERSION = "0.4.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_llm-contract
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justyna