-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Dependency cleanup #63
Conversation
…eanup # Conflicts: # Package.swift # Vapor.xcodeproj/project.pbxproj
…ependency-cleanup
# Conflicts: # Sources/Branch.swift # Sources/BranchRouter.swift # Tests/RouteTests.swift
|
||
var paths: [String] = [] | ||
|
||
for (index, component) in path.componentsSeparatedByString(".").enumerate() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be components
. Any reason for swapping the original logic in this section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I was trying to get the RouteTests.swift
to work, there was an error I was trying to debug. It involved changing this.
I'm going to put it back to the original.
.joinWithSeparator("") | ||
|
||
let fullPath = shortPath + last | ||
print(fullPath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this print
is meant to be there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct
|
||
let shortPath = path.componentsSeparatedByString(".") | ||
.flatMap { component in | ||
return ["\(component)s", "/:\(component)_id/"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pluralisation will be right some of the time but will be incorrect a lot as so many nouns in English are irregular, e.g. leaf -> leaves, child -> children, appendix -> appendices etc
This adds the JSON serializer and SHA256 Cryptography into Vapor without dependencies.
It also cleans up some
Route
logic.