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

Option grep #14

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Option grep #14

wants to merge 3 commits into from

Conversation

altherlex
Copy link

Options to grep files to upload

s3uploader -d home/grade -t 4 -g *.js /home/grade espn-api-importer

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 98.864% when pulling 2c21362 on altherlex:option_filter into a960a2d on chrishein:master.

@chrishein
Copy link
Owner

Hey @altherlex ! Thanks for your contribution.

I think it could be better to fix the :regexp option already present to work for filtering full paths, although it would break backwards compatibility. Perhaps the new option could be a flag to intruct filtering to work on full paths, keeping the default as it is, filtering only on file's basename.

Note that the :regexp option is only available as an instance configuration options, not as a command line option for the executable.

@@ -36,6 +36,10 @@ opt_parser = OptionParser.new do |opt|
options[:s3_secret] = s3_secret
end

opt.on("-g s","--grep *xml","set specific file or specific type files. Default: **/* recursive mode") do |filter|
Copy link
Owner

Choose a reason for hiding this comment

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

The short and long option must be defined as "-g PATTERN" and "--grep PATTERN", and then use PATTERN in the description. Eg.: "Filter full file paths using PATTERN as the regular expression"

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

3 participants