html2md_mcp_client 0.1.0 → 0.2.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: 34d52357bfe3faf50a85c791fa1414d29eb0ab42d83b80626097b7adf833e124
4
- data.tar.gz: 7dfb0223f53396746eaf21a5269ee67484a558b9b73cb3098f6a3e70e68a8f18
3
+ metadata.gz: 46468e0870a51991423deb96277081f233006f39f3a265d33d35567c38bd64e9
4
+ data.tar.gz: 98c2d87ded5ff1d8b9641ac38f845f5912e622ee045a09930fc9169591f84bb7
5
5
  SHA512:
6
- metadata.gz: 15e7d4a875fa147807dd36c0e718a1b09416a74851181cf0d3dea2fecc26c4cc769b00aad5e254a0960da224bc9ef817e3b64b60dc9684e10e1148216f53f420
7
- data.tar.gz: ac8489cb3eef307458c09610f09dfb13f99f54ea282a7ce14cd630854af819b78d6880e8d1f0b0eedaf6cc7e897b2de5d73ddd735e6e7d34cf1d3337e88210b2
6
+ metadata.gz: 040de8322dd8523f6adad126d63c10170e09b242401baf5388b1d2243c6d2ec8895ee9874a959d305445d179243de9fd77f3b98060e20080538c9b01ea473aec
7
+ data.tar.gz: 4cf6be14b86eda38382b75f35e17434d628d30dcf1b81425d211002da1e27b03cd08b01e15afa97bdad5e00e368bec6559bad2ef071ef8cdb0eea9d49180d98e
@@ -5,8 +5,8 @@ Gem::Specification.new do |s|
5
5
  s.name = 'html2md_mcp_client'
6
6
  s.version = Html2mdMcpClient::VERSION
7
7
  s.platform = Gem::Platform::RUBY
8
- s.authors = ['Searchbird']
9
- s.email = ['dev@searchbird.io']
8
+ s.authors = ['Roscommon']
9
+ s.email = ['ross@roscommonhq.com']
10
10
  s.homepage = 'https://github.com/roscom/html2md_mcp_client'
11
11
  s.summary = 'Ruby client for the Model Context Protocol (MCP)'
12
12
  s.description = 'Connects to MCP servers over HTTP or stdio. Supports tools, resources, and prompts.'
@@ -34,7 +34,9 @@ module Html2mdMcpClient
34
34
  end
35
35
 
36
36
  JSON.parse(body)
37
- rescue Errno::ECONNREFUSED, Errno::EHOSTUNREACH, SocketError => e
37
+ rescue Errno::ECONNREFUSED, Errno::EHOSTUNREACH, Errno::ENETUNREACH,
38
+ Errno::ECONNRESET, Errno::ETIMEDOUT, Errno::EPIPE,
39
+ SocketError, Net::OpenTimeout, Net::ReadTimeout => e
38
40
  raise ConnectionError, "Cannot connect to #{@uri}: #{e.message}"
39
41
  rescue JSON::ParserError => e
40
42
  raise ProtocolError, "Invalid JSON response: #{e.message}"
@@ -1,3 +1,3 @@
1
1
  module Html2mdMcpClient
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.2.2'.freeze
3
3
  end
@@ -81,6 +81,41 @@ RSpec.describe Html2mdMcpClient::Transport::Http do
81
81
  .to raise_error(Html2mdMcpClient::ConnectionError, /Cannot connect/)
82
82
  end
83
83
 
84
+ it 'raises ConnectionError on open timeout' do
85
+ stub_request(:post, url).to_raise(Net::OpenTimeout)
86
+
87
+ expect { transport.send_request({ jsonrpc: '2.0', id: 1, method: 'test', params: {} }) }
88
+ .to raise_error(Html2mdMcpClient::ConnectionError, /Cannot connect/)
89
+ end
90
+
91
+ it 'raises ConnectionError on read timeout' do
92
+ stub_request(:post, url).to_raise(Net::ReadTimeout)
93
+
94
+ expect { transport.send_request({ jsonrpc: '2.0', id: 1, method: 'test', params: {} }) }
95
+ .to raise_error(Html2mdMcpClient::ConnectionError, /Cannot connect/)
96
+ end
97
+
98
+ it 'raises ConnectionError on network unreachable' do
99
+ stub_request(:post, url).to_raise(Errno::ENETUNREACH)
100
+
101
+ expect { transport.send_request({ jsonrpc: '2.0', id: 1, method: 'test', params: {} }) }
102
+ .to raise_error(Html2mdMcpClient::ConnectionError, /Cannot connect/)
103
+ end
104
+
105
+ it 'raises ConnectionError on connection reset' do
106
+ stub_request(:post, url).to_raise(Errno::ECONNRESET)
107
+
108
+ expect { transport.send_request({ jsonrpc: '2.0', id: 1, method: 'test', params: {} }) }
109
+ .to raise_error(Html2mdMcpClient::ConnectionError, /Cannot connect/)
110
+ end
111
+
112
+ it 'raises ConnectionError on connection timed out' do
113
+ stub_request(:post, url).to_raise(Errno::ETIMEDOUT)
114
+
115
+ expect { transport.send_request({ jsonrpc: '2.0', id: 1, method: 'test', params: {} }) }
116
+ .to raise_error(Html2mdMcpClient::ConnectionError, /Cannot connect/)
117
+ end
118
+
84
119
  it 'raises ProtocolError on invalid JSON' do
85
120
  stub_request(:post, url).to_return(status: 200, body: 'not json')
86
121
 
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html2md_mcp_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
- - Searchbird
7
+ - Roscommon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
@@ -41,7 +41,7 @@ dependencies:
41
41
  description: Connects to MCP servers over HTTP or stdio. Supports tools, resources,
42
42
  and prompts.
43
43
  email:
44
- - dev@searchbird.io
44
+ - ross@roscommonhq.com
45
45
  executables: []
46
46
  extensions: []
47
47
  extra_rdoc_files: []