Skip to content

Use WebsocketClient protocol to support mocking #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 8, 2018
Merged

Use WebsocketClient protocol to support mocking #23

merged 2 commits into from
Nov 8, 2018

Conversation

fb55
Copy link
Member

@fb55 fb55 commented Oct 3, 2018

fixes #22

@freak4pc
Copy link
Member

freak4pc commented Oct 3, 2018

CI is failing @fb55

@fb55
Copy link
Member Author

fb55 commented Oct 4, 2018

Turns out there is actually a missing property in this protocol. I've opened daltoniam/Starscream#564 to fix this.

@freak4pc
Copy link
Member

freak4pc commented Oct 4, 2018

Nice catch @fb55 ! Thanks for taking care of this 🎉 !

@fassko
Copy link
Member

fassko commented Oct 9, 2018

@fb55 Your PR daltoniam/Starscream/pull/564 is merged and I released Starscream 3.0.6

@fb55
Copy link
Member Author

fb55 commented Oct 9, 2018

I'm having issues updating the dependencies to make tests pass for this PR. Would appreciate if someone could tackle #21, so this can piggy-back on it.

@freak4pc
Copy link
Member

freak4pc commented Oct 9, 2018

I'm on it @fb55 ;-)

@fb55
Copy link
Member Author

fb55 commented Oct 9, 2018

Amazing, thanks :)

@freak4pc
Copy link
Member

freak4pc commented Oct 9, 2018

@fb55 I rebased your branch on top of master but build is still failing. I'm not sure you'll be able to use the protocol this way unless it would be protocol WebSocketClient: class. I think it'll actually need to be a concrete class if you're using a DelegateProxy 🤔

@fb55
Copy link
Member Author

fb55 commented Oct 29, 2018

@freak4pc Should be good to go now. tl;dr Protocol types do not conform to themselves, the way around this is to use a generic that conforms to the protocol.

A bit of background: I went to Stack Overflow for this, where this response helped figure things out.

@fb55
Copy link
Member Author

fb55 commented Nov 8, 2018

@freak4pc Would appreciate a review for this!

@freak4pc
Copy link
Member

freak4pc commented Nov 8, 2018

Hey @fb55 ! Looks goo, thank you for this! 🙏

@freak4pc freak4pc merged commit e107d9b into RxSwiftCommunity:master Nov 8, 2018
@rxswiftcommunity
Copy link

Thanks a lot for contributing @fb55! I've invited you to join the
RxSwiftCommunity GitHub organization – no pressure to accept! If you'd like
more information on what this means, check out our contributor guidelines
and feel free to reach out with any questions.

Generated by 🚫 dangerJS

c0diq pushed a commit to c0diq/Starscream that referenced this pull request Jan 25, 2019
@fb55 fb55 deleted the patch-1 branch February 26, 2019 22:53
@fb55
Copy link
Member Author

fb55 commented Feb 26, 2019

@freak4pc I created a release for this — hope that's okay!

@fb55
Copy link
Member Author

fb55 commented Feb 26, 2019

There seems to be an error that prevents the publish script from working: https://circleci.com/gh/RxSwiftCommunity/RxStarscream/56

@freak4pc
Copy link
Member

freak4pc commented Mar 1, 2019

Hey Felix. Sorry, didn't have the time to look into this, I'll try to take a poke at this today. Thanks for letting me know !

@freak4pc
Copy link
Member

freak4pc commented Mar 1, 2019

Pushed 0.10 manually. Thanks !

HouseTechDev pushed a commit to HouseTechDev/IosWebsocket that referenced this pull request Nov 18, 2022
HouseTechDev added a commit to HouseTechDev/IosWebsocket that referenced this pull request Apr 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use WebsocketClient protocol to support mocking
3 participants