Skip to content
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

Channel generator #95

Merged
merged 14 commits into from
Feb 3, 2021
Merged

Conversation

julianrubisch
Copy link
Contributor

@julianrubisch julianrubisch commented Jan 7, 2021

Add a generator that will provide a "batteries included" cable ready channel.

This will:

  • invoke the ActionCable generator
  • if broadcasting to a resource
  • else
    • ask for a channel identifier and insert the stream_for into channel.rb
    • insert the if (data.cableReady) CableReady.perform(data.operations) into the channel.js file, plus import

I wanted to also include a test, but failed at mocking STDIN with StringIO

Closes #94

Copy link
Contributor

@hopsoft hopsoft left a comment

Choose a reason for hiding this comment

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

Should we add details like the --stream-for and --stream-from options to the USAGE doc? Looks like there's a merge conflict, but I'm good for this to merge whenever you're ready once conflicts are resolved.

@julianrubisch
Copy link
Contributor Author

@marcoroth assured me that those details are going to be added automatically when you invoke —help

@julianrubisch
Copy link
Contributor Author

Good to go!

@hopsoft hopsoft merged commit b2c7f63 into stimulusreflex:master Feb 3, 2021
@leastbad leastbad mentioned this pull request Feb 6, 2021
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.

Provide a CableReady channel generator
3 participants