ruby-mcp-client 0.6.1 → 0.6.2

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: fa54ff918901d9386e2d395408c4ae23707cdc7b0f7162f348e31d24c163bc39
4
- data.tar.gz: 77b384d45849e900e11b49647602cbd681511c39ae4a03cabdbfc3571f4cf38d
3
+ metadata.gz: 15f194d4e1504310a998aeeb819e5851dea4f1f8049bf494368ad5494e611d3c
4
+ data.tar.gz: 93d8d00a95ab2436241b09253d7bb56d130122303c1e78c429cecc343d09fa82
5
5
  SHA512:
6
- metadata.gz: 8702eef3f53b5a77f5323d215d8be67678cb5148163443b94f986c03933366b23b1eeac5428e0ccbe4448aa9bf3a322f6556a29383c9c22c697685bcd483143e
7
- data.tar.gz: 108332fb14663b1c65363b4b78766fee383a0b48ee8ff5f621dabf0b340accaf435e790246713f23e1cb0653b3852b2d3bbe9725e321202933b2d8ecf6fa1d3b
6
+ metadata.gz: f7edb3c0ae40b647c03d3a70af06e08b7d1290de0326fcf34b668b08f1fb156692799e1280f4a3a17c44b9afdb18b456d949a1cc39edec396877a25a00290c8f
7
+ data.tar.gz: a169f6e4f24c9f1f4ed52e7853f00285565cfcd2aa2d8fe6049c10191dd2fcbf571c8468dea65bf6504175f1ca1ce402ad9d7353660888db2f96e57831056598
@@ -93,7 +93,8 @@ module MCPClient
93
93
 
94
94
  @mutex.synchronize do
95
95
  @consecutive_ping_failures = 0
96
- @reconnect_attempts += 1
96
+ # Reset attempt counter after a successful reconnect
97
+ @reconnect_attempts = 0
97
98
  @last_activity_time = Time.now
98
99
  end
99
100
  rescue StandardError => e
@@ -48,7 +48,7 @@ module MCPClient
48
48
  @env = env || {}
49
49
  end
50
50
 
51
- # Connect to the MCP server by launching the command process via stdout/stdin
51
+ # Connect to the MCP server by launching the command process via stdin/stdout
52
52
  # @return [Boolean] true if connection was successful
53
53
  # @raise [MCPClient::Errors::ConnectionError] if connection fails
54
54
  def connect
@@ -58,12 +58,10 @@ module MCPClient
58
58
  else
59
59
  @stdin, @stdout, @stderr, @wait_thread = Open3.popen3(*@command_array)
60
60
  end
61
+ elsif @env.any?
62
+ @stdin, @stdout, @stderr, @wait_thread = Open3.popen3(@env, @command)
61
63
  else
62
- if @env.any?
63
- @stdin, @stdout, @stderr, @wait_thread = Open3.popen3(@env, @command)
64
- else
65
- @stdin, @stdout, @stderr, @wait_thread = Open3.popen3(@command)
66
- end
64
+ @stdin, @stdout, @stderr, @wait_thread = Open3.popen3(@command)
67
65
  end
68
66
  true
69
67
  rescue StandardError => e
@@ -2,7 +2,7 @@
2
2
 
3
3
  module MCPClient
4
4
  # Current version of the MCP client gem
5
- VERSION = '0.6.1'
5
+ VERSION = '0.6.2'
6
6
 
7
7
  # JSON-RPC handshake protocol version (date-based)
8
8
  PROTOCOL_VERSION = '2024-11-05'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-mcp-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Szymon Kurcab
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-05-18 00:00:00.000000000 Z
11
+ date: 2025-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday