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

Adding path validation #391

Merged
merged 3 commits into from
Mar 6, 2013
Merged

Conversation

electrical
Copy link
Contributor

Doing 2 checks:

  • Check if we have an absolute path
  • Check if the file exists

Requires 'pathname' gem

Doing 2 checks:
- Check if we have an absolute path
- Check if the file exists

Requires 'pathname' gem
@electrical
Copy link
Contributor Author

@jordansissel please double/triple check this ;-)

return false, "Expected path (one value), got #{value.size} values?"
end

unless (Pathname.new value.first).absolute? # We want an absolute path
Copy link
Contributor

Choose a reason for hiding this comment

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

Any strong reason to require an absolute path?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Figured to keep everything the same ( file input requires a full path )

jordansissel added a commit that referenced this pull request Mar 6, 2013
@jordansissel jordansissel merged commit e5e2f8a into elastic:master Mar 6, 2013
@jordansissel
Copy link
Contributor

woo!

Next steps:

  • Update plugins to :validate => :path where necessary
  • Update doc generator to describe what "path" means for each plugin.

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.

2 participants