Internal Release 0.5.1
- Allow protocol version to be set at the server level through configuration instead of a class method, providing more flexibility in protocol version management [#43](https://github.com/Shopify/mcp-ruby/pull/43) @topherbullock - Fixed instrumentation handling to ensure accurate timing information and proper error reporting [#42](https://github.com/Shopify/mcp-ruby/pull/42) @tobiasbales - Improved error handling and reporting in the server - Fixed timing information collection in instrumentation - Added proper error types for different failure scenarios - Enhanced test coverage for error cases - [Allow protocol version to be set at the server level #43](https://github.com/Shopify/mcp-ruby/pull/43) @topherbullock - [Fix instrumentation handling #42](https://github.com/Shopify/mcp-ruby/pull/42) @tobiasbales
This commit is contained in:
parent
7175d49108
commit
d2b6a33788
1 changed files with 248 additions and 86 deletions
|
|
@ -34,5 +34,32 @@ module ModelContextProtocol
|
|||
assert_equal test_exception, reported_exception
|
||||
assert_equal test_context, reported_context
|
||||
end
|
||||
|
||||
test "initializes with default protocol version" do
|
||||
config = Configuration.new
|
||||
assert_equal Configuration::DEFAULT_PROTOCOL_VERSION, config.protocol_version
|
||||
end
|
||||
|
||||
test "allows setting a custom protocol version" do
|
||||
config = Configuration.new
|
||||
custom_version = "2025-03-27"
|
||||
config.protocol_version = custom_version
|
||||
assert_equal custom_version, config.protocol_version
|
||||
end
|
||||
|
||||
test "merges protocol version from other configuration" do
|
||||
config1 = Configuration.new(protocol_version: "2025-03-27")
|
||||
config2 = Configuration.new(protocol_version: "2025-03-28")
|
||||
config3 = Configuration.new
|
||||
|
||||
merged = config1.merge(config2)
|
||||
assert_equal "2025-03-28", merged.protocol_version
|
||||
|
||||
merged = config1.merge(config3)
|
||||
assert_equal "2025-03-27", merged.protocol_version
|
||||
|
||||
merged = config3.merge(config1)
|
||||
assert_equal "2025-03-27", merged.protocol_version
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue