minitest-promptfoo 0.1.0 → 0.1.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 +5 -1
- data/lib/minitest/promptfoo/rails.rb +13 -11
- data/lib/minitest/promptfoo/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: c46190c19ff929aa46aa5b39b6857af623f0ca6ede8187a58220c5e8e5ea0fe2
|
|
4
|
+
data.tar.gz: fc4d8fec213be486de2398a9fc050d3a683d3b610012bf4107f2bd09e34bea7d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8e59555be654b7ab5aa40e1f08747a4d71989a25c162cf57a6ba8ee4cbf4c4365c7f3d9844c61937fb1d82b445bdedc9982e61ae515eb8ac87f5b212771c5c18
|
|
7
|
+
data.tar.gz: a8002f9d6f25419abcbb0f89b687246d15c2b89ada13219fed14b11fcf13cb271ce3e694f173a6472d5d0ae38100dc73a3c1fd11e56092c62862cbb43cf67fbe
|
data/CHANGELOG.md
CHANGED
|
@@ -21,6 +21,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
21
21
|
- Comprehensive README with examples
|
|
22
22
|
- Basic test coverage
|
|
23
23
|
|
|
24
|
-
## [0.1.0] -
|
|
24
|
+
## [0.1.0] - Blinded by the Light
|
|
25
25
|
|
|
26
26
|
- Initial release
|
|
27
|
+
|
|
28
|
+
## [0.1.1] - Spirit in the Night
|
|
29
|
+
|
|
30
|
+
- Fixed bug causing unbound method call in Rails apps
|
|
@@ -51,27 +51,29 @@ module Minitest
|
|
|
51
51
|
class RailsTest < ActiveSupport::TestCase
|
|
52
52
|
include Minitest::Promptfoo::Rails
|
|
53
53
|
|
|
54
|
-
#
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
# Copy instance methods from Test
|
|
55
|
+
Minitest::Promptfoo::Test.instance_methods(false).each do |method_name|
|
|
56
|
+
define_method(method_name) do |*args, **kwargs, &block|
|
|
57
|
+
# Delegate to Test's implementation
|
|
58
|
+
Minitest::Promptfoo::Test.instance_method(method_name).bind_call(self, *args, **kwargs, &block)
|
|
59
|
+
end
|
|
60
|
+
end
|
|
59
61
|
|
|
60
62
|
# Include class methods
|
|
61
63
|
class << self
|
|
62
|
-
|
|
64
|
+
def debug?
|
|
65
|
+
ENV["DEBUG_PROMPT_TEST"] == "1"
|
|
66
|
+
end
|
|
63
67
|
|
|
64
68
|
def providers
|
|
65
|
-
@
|
|
69
|
+
@providers || "echo"
|
|
66
70
|
end
|
|
67
71
|
|
|
68
|
-
|
|
69
|
-
@_providers = value
|
|
70
|
-
end
|
|
72
|
+
attr_writer :providers
|
|
71
73
|
|
|
72
74
|
def inherited(subclass)
|
|
73
75
|
super
|
|
74
|
-
subclass.
|
|
76
|
+
subclass.providers = providers if defined?(@providers)
|
|
75
77
|
end
|
|
76
78
|
end
|
|
77
79
|
end
|