Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

Make wildcards work as path variables #64

Merged
merged 12 commits into from
Sep 11, 2015
Merged

Make wildcards work as path variables #64

merged 12 commits into from
Sep 11, 2015

Conversation

Ogeon
Copy link
Owner

@Ogeon Ogeon commented Aug 31, 2015

This allows wildcards in TreeRouter to be named (e.x. head/*tail) and sent to the handler as variables. The purpose of this is to allow entire sections of the requested path to be captured as easy as individual segments currently is. This is very useful for requesting static files (see the updated handler_storage example).

Wildcards are also renamed to "variable sequences" and standard variables are now called "variable segments". Some occurrences of the old terminology will, however, still be used in internal parts for a while longer.

These changes are breaking if a project uses the LinkSegment type, or if it relies on nameless variables being available to the handler.

@Ogeon
Copy link
Owner Author

Ogeon commented Sep 5, 2015

The terminology surrounding this has started to feel a bit odd, now when wildcards have become variables as well. It may be time to consider using better names for these things.

@Ogeon
Copy link
Owner Author

Ogeon commented Sep 9, 2015

The new names are "variable segment" and "variable sequence". This may still change if better names appear before this is merged.

@Ogeon
Copy link
Owner Author

Ogeon commented Sep 11, 2015

@homu r+

@homu
Copy link
Collaborator

homu commented Sep 11, 2015

📌 Commit b387c57 has been approved by Ogeon

@homu
Copy link
Collaborator

homu commented Sep 11, 2015

⌛ Testing commit b387c57 with merge fbcb25d...

homu added a commit that referenced this pull request Sep 11, 2015
Make wildcards work as path variables

This allows wildcards in `TreeRouter` to be named (e.x. `head/*tail`) and sent to the handler as variables. The purpose of this is to allow entire sections of the requested path to be captured as easy as individual segments currently is. This is very useful for requesting static files (see the updated `handler_storage` example).

Wildcards are also renamed to "variable sequences" and standard variables are now called "variable segments". Some occurrences of the old terminology will, however, still be used in internal parts for a while longer.

These changes are breaking if a project uses the LinkSegment type, or if it relies on nameless variables being available to the handler.
@homu
Copy link
Collaborator

homu commented Sep 11, 2015

☀️ Test successful - status

@homu homu merged commit b387c57 into master Sep 11, 2015
@Ogeon Ogeon deleted the named_wildcards branch October 18, 2015 12:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants