@@ -14,43 +14,51 @@ require "rubocop/rake_task"
1414
1515RuboCop ::RakeTask . new
1616
17- task default : [ :rubocop , :test , : conformance]
17+ task default : [ :rubocop , :test , " conformance:test" ]
1818
19- desc "Run MCP conformance tests (PORT, SCENARIO, SPEC_VERSION, VERBOSE)"
20- task :conformance do |t |
21- next unless npx_available? ( t . name )
19+ namespace :conformance do
20+ desc "Run MCP conformance tests (PORT, SCENARIO, SPEC_VERSION, VERBOSE)"
21+ task :test do |t |
22+ next unless npx_available? ( t . name )
2223
23- require_relative "conformance/server_runner"
24- require_relative "conformance/client_runner"
24+ require_relative "conformance/server_runner"
25+ require_relative "conformance/client_runner"
2526
26- options = { }
27- options [ :port ] = Integer ( ENV [ "PORT" ] ) if ENV [ "PORT" ]
28- options [ :scenario ] = ENV [ "SCENARIO" ] if ENV [ "SCENARIO" ]
29- options [ :spec_version ] = ENV [ "SPEC_VERSION" ] if ENV [ "SPEC_VERSION" ]
30- options [ :verbose ] = true if ENV [ "VERBOSE" ]
27+ options = { }
28+ options [ :port ] = Integer ( ENV [ "PORT" ] ) if ENV [ "PORT" ]
29+ options [ :scenario ] = ENV [ "SCENARIO" ] if ENV [ "SCENARIO" ]
30+ options [ :spec_version ] = ENV [ "SPEC_VERSION" ] if ENV [ "SPEC_VERSION" ]
31+ options [ :verbose ] = true if ENV [ "VERBOSE" ]
3132
32- Conformance ::ServerRunner . new ( **options ) . run
33- Conformance ::ClientRunner . new ( **options . reject { |key , _value | key == :port } ) . run
34- end
33+ Conformance ::ServerRunner . new ( **options ) . run
34+ Conformance ::ClientRunner . new ( **options . reject { |key , _value | key == :port } ) . run
35+ end
3536
36- desc "List available conformance scenarios"
37- task :conformance_list do |t |
38- next unless npx_available? ( t . name )
37+ desc "List available conformance scenarios"
38+ task :list do |t |
39+ next unless npx_available? ( t . name )
3940
40- system ( "npx" , "--yes" , "@modelcontextprotocol/conformance" , "list" , "--server" )
41- system ( "npx" , "--yes" , "@modelcontextprotocol/conformance" , "list" , "--client" )
42- end
41+ system ( "npx" , "--yes" , "@modelcontextprotocol/conformance" , "list" , "--server" )
42+ system ( "npx" , "--yes" , "@modelcontextprotocol/conformance" , "list" , "--client" )
43+ end
4344
44- desc "Start the conformance server (PORT)"
45- task :conformance_server do
46- require_relative "conformance/server"
45+ desc "Start the conformance server (PORT)"
46+ task :server do
47+ require_relative "conformance/server"
4748
48- options = { }
49- options [ :port ] = Integer ( ENV [ "PORT" ] ) if ENV [ "PORT" ]
49+ options = { }
50+ options [ :port ] = Integer ( ENV [ "PORT" ] ) if ENV [ "PORT" ]
5051
51- Conformance ::Server . new ( **options ) . start
52+ Conformance ::Server . new ( **options ) . start
53+ end
5254end
5355
56+ # The other two former names now fail with a "Did you mean?" suggestion, but a bare `conformance`
57+ # would match the `conformance/` directory: Rake synthesizes a file task for it and exits 0 without
58+ # running anything. This keeps the name pointing at the suite instead of at that silent no-op.
59+ desc "Alias for conformance:test"
60+ task conformance : "conformance:test"
61+
5462namespace :docs do
5563 desc "Serve the documentation site locally at http://localhost:4000 (PORT)"
5664 task :preview do
0 commit comments