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

TeaPadding does not understand #readStream #3

Closed
fortizpenaloza opened this issue Oct 8, 2018 · 6 comments
Closed

TeaPadding does not understand #readStream #3

fortizpenaloza opened this issue Oct 8, 2018 · 6 comments
Assignees
Labels

Comments

@fortizpenaloza
Copy link
Collaborator

Hi,

I registered the following routes:

GET -> '/data-streams/identifier:IsUUID/data-points'
GET -> '/data-streams'
GET -> '/data-streams/identifier:IsUUID'

and performing a GET on '/data-streams' I've got a MNU from TeaPadding.

IsUUID implementation of #matchesTo: and IsInteger look alike, I changed the regex pattern.

In the stack I found a TeaRequestMatcher trying to match the request's URL '/data-streams' to '/data-streams/identifier:IsUUID/data-points' by padding the segments of the first one and getting the following collection ('data-streams', TeaPadding, TeaPadding).

Then tries to match them from left to right until it gets the MNU trying to match the type constraint IsUUID to the first TeaPadding.

I think I can easily fix it by changing the IsUUID class>>#matchesTo: implementation taking into account that a TeaPadding can show up but I find hard to image that I'm the first one running into this issue.

Am I missing something?

@zeroflag zeroflag self-assigned this Oct 8, 2018
@zeroflag zeroflag added the bug label Oct 8, 2018
@zeroflag
Copy link
Owner

zeroflag commented Oct 8, 2018

@fortizpenaloza, good catch. I'll fix this in TeaPlaceholder>>matches:rest:placeholders: so there is no need to put custom logic into the type constraint class.

@zeroflag
Copy link
Owner

zeroflag commented Oct 8, 2018

Name: Teapot-Core-AttilaMagyar.88
Author: AttilaMagyar
Time: 8 October 2018, 2:40:04.571123 pm
UUID: 5cc34aa8-1834-0d00-93a5-4b020d58bc98
Ancestors: Teapot-Core-TorstenBergmann.87

fix for issue: #3
Name: Teapot-Tests-AttilaMagyar.59
Author: AttilaMagyar
Time: 8 October 2018, 2:40:51.739428 pm
UUID: 70821aab-1834-0d00-93a6-70930d58bc98
Ancestors: Teapot-Tests-AttilaMagyar.58

fix for issue: #3 (tests)

You can try it out by loading the latest version.

Gofer it
    smalltalkhubUser: 'zeroflag' project: 'Teapot';
    configuration;
    loadDevelopment.

@zeroflag zeroflag closed this as completed Oct 8, 2018
@fortizpenaloza
Copy link
Collaborator Author

Thanks!

@zeroflag
Copy link
Owner

zeroflag commented Oct 9, 2018 via email

@gcotelli
Copy link
Contributor

Any idea when this will land a release?

Have you consider migrating the sources to this repository? With https://github.com/peteruhnak/git-migration it's possible to preserve the history. I think it's easier to collaborate here that using SmalltalkHub and you can use the TravisCI integration support for automated testing. In case you're interested and need help with the migration just let me know.

@zeroflag
Copy link
Owner

@gcotelli I want to fix #4 before the release. And yes, eventually the project source code will be migrated to github.

fortizpenaloza referenced this issue in fortizpenaloza/Teapot Nov 23, 2018
fortizpenaloza referenced this issue in fortizpenaloza/Teapot Nov 23, 2018
zeroflag pushed a commit that referenced this issue Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants