ruby_llm-contract 0.4.1 → 0.4.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: f8cbf4696de5e80a05baefbeda7e91e7afc322ead379e52da1e0457fae3a8ca2
4
- data.tar.gz: 67bd866954f134939d0fa87222212bd665a9d1e2ba0e3248a061f55b67ad72c8
3
+ metadata.gz: e7f3a23f6ba5f67352d32b67ba0737c60d0112dc1db866c9988bbd5d894dcb4f
4
+ data.tar.gz: 7b94ae8959fd87e695063b4e94a3e7217d8bb9b93a860c574f3f1d626bb4a94d
5
5
  SHA512:
6
- metadata.gz: c4efd526237cd354739f4868cbe020211aa27878d9dd590c828d5e7a18d613a62664bf839f51e704917a94926c55e0546938316fa3ff6367cfdb5d06263443ad
7
- data.tar.gz: 0ba0ac4f55716b360f0702d137fbdc48edfc2e9fba8c4e04d5adbe45ef561c4b1cd65c14793e1b868b3716e7417bdfdb9bb67eef2ab4f3ca69c74a4b3e911844
6
+ metadata.gz: 4abcaf1069f7e97072375027cadbcbcb2b4970a48a5d0a21cb25bc992f53cba6a3c8c6061cc24749f3162600a99017213a58e91f30b52a690deae4102ec153c9
7
+ data.tar.gz: 6ba8118f0ba2b14b43a5908afc5118f96a585026257a3fef97d07a232ac35442b88d6210e2a0c155396dde487f85d9ebb50f65ab104e645abd6ea38128300877
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.2 (2026-03-24)
4
+
5
+ - **RakeTask lazy context** — `t.context` now accepts a Proc, resolved at task runtime (after `:environment`). Fixes adapter not being available at Rake load time in Rails apps.
6
+
3
7
  ## 0.4.1 (2026-03-24)
4
8
 
5
9
  - **RakeTask `:environment` fix** — uses `defined?(::Rails)` instead of `Rake::Task.task_defined?(:environment)`. Works in Rails 8 without manual `Rake::Task.enhance`.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby_llm-contract (0.4.1)
4
+ ruby_llm-contract (0.4.2)
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.1)
168
+ ruby_llm-contract (0.4.2)
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
@@ -31,7 +31,8 @@ module RubyLLM
31
31
  require "ruby_llm/contract"
32
32
  RubyLLM::Contract.load_evals!(*@eval_dirs)
33
33
 
34
- results = RubyLLM::Contract.run_all_evals(context: @context)
34
+ context = @context.respond_to?(:call) ? @context.call : @context
35
+ results = RubyLLM::Contract.run_all_evals(context: context)
35
36
 
36
37
  if results.empty?
37
38
  if @fail_on_empty
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RubyLLM
4
4
  module Contract
5
- VERSION = "0.4.1"
5
+ VERSION = "0.4.2"
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.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justyna