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

Allow giving param names to globs thus allowing multiple #437

Merged
merged 1 commit into from
Jun 4, 2020
Merged

Allow giving param names to globs thus allowing multiple #437

merged 1 commit into from
Jun 4, 2020

Conversation

pksunkara
Copy link
Contributor

@pksunkara pksunkara commented May 23, 2020

@colinbankier @nyarly As you guys know, I had recently published this blog post comparing routing capabilities.

This was the only deficiency in gotham when compared to Rails router. So, I fixed it.

@@ -25,7 +25,7 @@ hyper = "0.13.1"
serde = "1.0"
serde_derive = "1.0"
bincode = "1.0"
mime = "0.3"
mime = "0.3.15"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did this because we are using Mime::essence_str() which is not available in <3.15

@codecov
Copy link

codecov bot commented May 23, 2020

Codecov Report

Merging #437 into master will increase coverage by 0.00%.
The diff coverage is 96.61%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #437   +/-   ##
=======================================
  Coverage   84.20%   84.20%           
=======================================
  Files         106      106           
  Lines        5224     5281   +57     
=======================================
+ Hits         4399     4447   +48     
- Misses        825      834    +9     
Impacted Files Coverage Δ
examples/path/globs/src/main.rs 92.03% <96.55%> (+4.76%) ⬆️
gotham/src/router/builder/draw.rs 86.36% <100.00%> (+0.10%) ⬆️
misc/borrow_bag/src/lib.rs 0.00% <0.00%> (-85.72%) ⬇️
misc/borrow_bag/src/lookup.rs 0.00% <0.00%> (-75.00%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d387381...b436f2d. Read the comment docs.

Copy link
Contributor

@nyarly nyarly left a comment

Choose a reason for hiding this comment

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

I'm for this change, and appreciate the contribution.

The only issue I've got is with removing the top level patch for development purposes.

[patch.crates-io]
gotham = { path = "gotham" }
gotham_derive = { path = "gotham_derive" }
borrow-bag = { path = "misc/borrow_bag" }
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you restore this, please? For development, it's certainly easier to use these together, rather than publishing individually.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not needed anymore because Cargo supports both path and version in dependencies which I added in a previous PR. I missed one spot and I fixed it in this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And since cargo doesn't support publishing all packages at once, you can use https://crates.io/crates/cargo-workspaces to do it which works with path and version in dependencies without this being needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nyarly Can you please reply to this comment? I want to get this PR resolved.

@nyarly
Copy link
Contributor

nyarly commented May 28, 2020

Also, I'd quibble that the one feature eveyone overlooks in Rails is bi-directional routing. Although it's interface is overbroad, being able to use the path_to view helper et al is extremely handy.

@pksunkara
Copy link
Contributor Author

Also, I'd quibble that the one feature eveyone overlooks in Rails is bi-directional routing. Although it's interface is overbroad, being able to use the path_to view helper et al is extremely handy.

I agree but I don't understand why we are talking about this. Was there something related in this PR?

@nyarly
Copy link
Contributor

nyarly commented Jun 4, 2020

I agree but I don't understand why we are talking about this. Was there something related in this PR?

It's in reply to "This was the only deficiency in gotham when compared to Rails router." Not an issue with the change.

@nyarly nyarly merged commit 1c4a8c8 into gotham-rs:master Jun 4, 2020
@msrd0 msrd0 added this to the 0.5 milestone Aug 26, 2020
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.

3 participants