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

Fix duration check #54

Merged
merged 2 commits into from
Jan 12, 2015
Merged

Fix duration check #54

merged 2 commits into from
Jan 12, 2015

Conversation

madarche
Copy link
Collaborator

This PR fixes #53.

@madarche
Copy link
Collaborator Author

@zaach could you review this PR please? Thank you.

@@ -115,7 +115,7 @@ convict provides serveral predefined formats for validation that you can use ([u
* `url`
* `email`
* `ipaddress` - IPv4 and IPv6 addresses
* `duration` - miliseconds or a human readable string (e.g. "5 days")
* `duration` - miliseconds or a human readable string (e.g. "3000", "5 days")
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: "milliseconds"

@madarche
Copy link
Collaborator Author

@pdehaan: done. Thanks.

@madarche
Copy link
Collaborator Author

madarche commented Jan 7, 2015

For the record, the duration check in human readable string was (unintentionally I believe) removed with commit b7ace05#diff-7763d1369911b91b757ba7ff51d734a2L37. I say unintentionally because the coerce function has been supporting the duration in human readable string until now.

@zaach could you review this PR please? Thank you.

@zaach
Copy link
Contributor

zaach commented Jan 12, 2015

Ah, good catch. 👍

zaach added a commit that referenced this pull request Jan 12, 2015
@zaach zaach merged commit de6c925 into mozilla:master Jan 12, 2015
@@ -115,7 +115,7 @@ convict provides serveral predefined formats for validation that you can use ([u
* `url`
* `email`
* `ipaddress` - IPv4 and IPv6 addresses
* `duration` - miliseconds or a human readable string (e.g. "5 days")
* `duration` - milliseconds or a human readable string (e.g. "3000", "5 days")
Copy link
Member

Choose a reason for hiding this comment

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

@zaach @madarche should this actually say (e.g. 3000, "5 days")? This example gives milliseconds as a string :-\

Copy link
Contributor

Choose a reason for hiding this comment

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

Hrm, that should not be a string.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@6a68 @zaach I'm writing a fix.

@jaredhirsch
Copy link
Member

Thanks for taking care of this, @madarche and @zaach! I'm excited to replace 604800000 with "1 week" in my configs ^_^

@madarche madarche deleted the fix-duration-check branch January 15, 2015 09:49
zaach added a commit that referenced this pull request Jan 15, 2015
Fix integers enclosed in quotes for #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.

Confusing behavior around duration config loaded from external file
4 participants