Skip to content

Rename websocket client class and expand websocket tests#389

Merged
l5yth merged 1 commit intomainfrom
l5y-rename-websocket-class-to-ws-and-file-to-ws.rb
Nov 1, 2025
Merged

Rename websocket client class and expand websocket tests#389
l5yth merged 1 commit intomainfrom
l5y-rename-websocket-class-to-ws-and-file-to-ws.rb

Conversation

@l5yth
Copy link
Collaborator

@l5yth l5yth commented Oct 31, 2025

Summary

  • rename the websocket client class to Eth::Client::Ws and update loader references
  • expand the dummy websocket server and add end-to-end websocket client coverage mirroring HTTP/IPCs tests
  • rename the websocket spec to ws_spec.rb and document the new behaviour

Testing

  • rufo .
  • black .
  • bundle exec rspec spec/eth/client/ws_spec.rb --format documentation
  • bundle exec rspec (fails: requires running Ethereum nodes and solc toolchain)
  • pytest
  • npm test (fails: repository has no package.json)

https://chatgpt.com/codex/tasks/task_e_6904ec79f384832baaaf130d8198ed96

@l5yth l5yth added the codex Codex is a durable, decentralised data storage protocol label Oct 31, 2025 — with ChatGPT Codex Connector
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 26 to 28
# Provides a WS/S-RPC client with automatic reconnection support.
class Client::Websocket < Client
class Client::Ws < Client

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep deprecated WebSocket constant available

Renaming the client class to Client::Ws removes the previously public Client::Websocket constant and drops the require "eth/client/websocket" entry, so any existing code that explicitly instantiates Eth::Client::Websocket or requires that file will now raise NameError/LoadError. This library has been shipping the old constant for years and the commit does not provide an alias or deprecation path, so the change is a breaking API regression. Consider defining Client::Websocket = Client::Ws and keeping the old require stub to preserve backwards compatibility.

Useful? React with 👍 / 👎.

@codecov
Copy link

codecov bot commented Oct 31, 2025

Codecov Report

❌ Patch coverage is 98.76543% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 99.19%. Comparing base (d62a7e5) to head (6f47332).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
spec/eth/client/ws_spec.rb 98.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #389      +/-   ##
==========================================
+ Coverage   99.09%   99.19%   +0.09%     
==========================================
  Files          91       91              
  Lines        6659     6732      +73     
==========================================
+ Hits         6599     6678      +79     
+ Misses         60       54       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@l5yth l5yth merged commit b6e0100 into main Nov 1, 2025
7 of 8 checks passed
@l5yth l5yth deleted the l5y-rename-websocket-class-to-ws-and-file-to-ws.rb branch November 1, 2025 07:47
ShiningRay added a commit to ShiningRay/eth.rb that referenced this pull request Dec 24, 2025
* commit 'ab969176faf033eb0a6387b875ee3aa677c4bacf':
  build(deps): bump JamesIves/github-pages-deploy-action (q9f#395)
  build(deps): bump actions/checkout from 5 to 6 (q9f#394)
  add JSONRPC error code to Client::RpcError (q9f#392)
  Update README.md (q9f#393)
  build(deps): bump github/codeql-action from 3 to 4 (q9f#390)
  client/ws: fix client origin headers for ws requests (q9f#391)
  Rename websocket client to Ws and expand websocket tests (q9f#389)
  Add WebSocket transport to client (q9f#388)
  Support tuple arrays in ABI coder (q9f#387)
  Format EIP-4844 transaction constant (q9f#386)
  Fix ABI tuple handling for ethers test cases (q9f#385)
  Increase blob throughput limits (q9f#363)
  feat: use httpx for http requests (q9f#377) (q9f#382)
  fix: transform hash keys to strings in encoder for component type compatibility (q9f#378)
  fix: improve error handling for missing keys in component encoding (q9f#376)
  build(deps): bump actions/checkout from 4 to 5 (q9f#379)

# Conflicts:
#	eth.gemspec
#	lib/eth/client/http.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex Codex is a durable, decentralised data storage protocol

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant