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

Adding check for Restroom-mw statements #285

Open
andrea-dintino opened this issue Jan 14, 2022 · 3 comments
Open

Adding check for Restroom-mw statements #285

andrea-dintino opened this issue Jan 14, 2022 · 3 comments
Assignees

Comments

@andrea-dintino
Copy link
Member

andrea-dintino commented Jan 14, 2022

The Zencode parser returning Zencode pattern not found could also try and match a list of Restroom-mw statements. The statements are all contained in files .ts or .js in a structure like this :

const actions = {
  CONNECT: "I have a valid redis connection on {}",
  WRITE: "write all data as a hash into redis",
  WRITE_WITH_KEY: "write all data into redis under the key {}",
};

Therefore the list can be generated with a script and the script put in CI

@jaromil
Copy link
Member

jaromil commented Jan 24, 2022

It can be a rule unknown observe restroom where in DATA the caller also passes a JSON array named restroom containing statements formatted as Zencode (with single quotes '' in place of {}), then the ZEN.parser() function should be modified to observe with a simple match these statements before producing an error.

I can take it from the ZEN.parser() onwards.

@andrea-dintino
Copy link
Member Author

@puria watcha say?

@puria
Copy link
Member

puria commented May 31, 2023

that I have a PR from 7 months waiting to be merged in dyne/restroom-mw#206 that exposes all the sentences.
I was lazy, need to write tests and also a small refactorin to include them in cliroom. Will do that, as soon as it's merged, you can ask the list of all the restroom sentences, from any restroom instance under http://restroom-instance-address/sids

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants