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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1687874b77d0e965b186cf7f488579e65c9b318f9c24c0a888f9871aa20d30ff
4
- data.tar.gz: 37315fe836966e9ebae13d72012140e3abd8a06c09456e492d68655896312e8b
3
+ metadata.gz: c46190c19ff929aa46aa5b39b6857af623f0ca6ede8187a58220c5e8e5ea0fe2
4
+ data.tar.gz: fc4d8fec213be486de2398a9fc050d3a683d3b610012bf4107f2bd09e34bea7d
5
5
  SHA512:
6
- metadata.gz: 0a53f83579b00a493e0bf824a8a6cf784c13aefc4a5ef401efc3a59e5632178f7213380855093e6a7de319c6cbde0e4113d58bdf38dae04e3a1b0ff9e63b9f5c
7
- data.tar.gz: f269bc6f6127042ea83118a262b794ddb288995533178290ce2dcc00b197548767bbef1397f2760bb65abb38ad0a8771932085ad63668e9b37a1ecfb5764dbc2
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] - TBD
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
- # Borrow all the assertion methods from Test
55
- # but keep ActiveSupport::TestCase as the base
56
- include Minitest::Promptfoo::Test.instance_methods(false).each_with_object(Module.new) { |m, mod|
57
- mod.define_method(m, Minitest::Promptfoo::Test.instance_method(m))
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
- attr_accessor :_providers
64
+ def debug?
65
+ ENV["DEBUG_PROMPT_TEST"] == "1"
66
+ end
63
67
 
64
68
  def providers
65
- @_providers || "echo"
69
+ @providers || "echo"
66
70
  end
67
71
 
68
- def providers=(value)
69
- @_providers = value
70
- end
72
+ attr_writer :providers
71
73
 
72
74
  def inherited(subclass)
73
75
  super
74
- subclass._providers = _providers
76
+ subclass.providers = providers if defined?(@providers)
75
77
  end
76
78
  end
77
79
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Minitest
4
4
  module Promptfoo
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-promptfoo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Waters