Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
inherit_gem:
rubocop-shopify: rubocop.yml

plugins:
- rubocop-minitest
- rubocop-rake

Naming/FileName:
Exclude:
- 'lib/mcp-ruby.rb'
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ gemspec
# Specify development dependencies below
gem "minitest", "~> 5.1", require: false
gem "rake", "~> 13.0"
gem "rubocop-minitest"
gem "rubocop-rake"
gem "rubocop-shopify", require: false

gem "minitest-reporters"
Expand Down
2 changes: 1 addition & 1 deletion test/model_context_protocol/prompt_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def template(args, server_context:)
assert_equal "a mock prompt for testing", prompt.description
assert_equal "test_argument", prompt.arguments.first.name
assert_equal "Test argument", prompt.arguments.first.description
assert_equal true, prompt.arguments.first.required
assert prompt.arguments.first.required

expected_template_result = {
description: "Hello, world!",
Expand Down
2 changes: 1 addition & 1 deletion test/model_context_protocol/server_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class ServerTest < ActiveSupport::TestCase
assert_kind_of Array, result[:tools]
assert_equal "test_tool", result[:tools][0][:name]
assert_equal "Test tool", result[:tools][0][:description]
assert_equal({}, result[:tools][0][:inputSchema])
assert_empty(result[:tools][0][:inputSchema])
assert_instrumentation_data({ method: "tools/list" })
end

Expand Down
2 changes: 1 addition & 1 deletion test/model_context_protocol/tool/input_schema_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class InputSchemaTest < ActiveSupport::TestCase

test "missing_required_arguments returns an empty array if no required arguments are missing" do
input_schema = InputSchema.new(properties: { message: { type: "string" } }, required: [:message])
assert_equal [], input_schema.missing_required_arguments({ message: "Hello, world!" })
assert_empty input_schema.missing_required_arguments({ message: "Hello, world!" })
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class StdioTransportTest < ActiveSupport::TestCase
response = JSON.parse(output.string, symbolize_names: true)
assert_equal("2.0", response[:jsonrpc])
assert_equal("123", response[:id])
assert_equal({}, response[:result])
assert_empty(response[:result])
refute(@transport.instance_variable_get(:@open))
ensure
$stdin = original_stdin
Expand Down