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

Dependency cleanup #63

Merged
merged 26 commits into from
Feb 24, 2016
Merged

Dependency cleanup #63

merged 26 commits into from
Feb 24, 2016

Conversation

tanner0101
Copy link
Member

This adds the JSON serializer and SHA256 Cryptography into Vapor without dependencies.

It also cleans up some Route logic.


var paths: [String] = []

for (index, component) in path.componentsSeparatedByString(".").enumerate() {
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch.

Copy link
Member Author

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)
Copy link
Contributor

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.

Copy link
Member Author

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/"]
Copy link
Contributor

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

tanner0101 added a commit that referenced this pull request Feb 24, 2016
@tanner0101 tanner0101 merged commit 38186a2 into master Feb 24, 2016
@tanner0101 tanner0101 deleted the dependency-cleanup branch February 24, 2016 02:54
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.

None yet

4 participants