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

Added additional arguments to script #7

Merged
merged 7 commits into from
Jul 3, 2012

Conversation

IQAndreas
Copy link
Contributor

These changes use the native OptionParser class to add additional arguments to the script which can be viewed with github-upload.rb --help.

Usage: github-upload.rb <file-name> [<repository>] [options]
    -d, --description [DESCRIPTION]  Add a description to the uploaded file.
    -n, --name [NAME]                New name of the uploaded file.
    -f, --force                      If a file with that name already exists on the server, replace it with this one.

It's not much now, but adding OptionParser allows us to extend the code and add additional options later on. (which is the plan)
This allows you to set the GitHub description. (duh)

Fixes issue wereHamster#4
wereHamster#4
Allows the user to change the name of the file (on the server, not locally) from the default value to something else.
This allows you to replace the file on the server if it already exists.
@IQAndreas
Copy link
Contributor Author

This commit also fixes Issue #4
#4

@wereHamster
Copy link
Owner

Thanks. The changes look good. But please keep the style consistent (2 space indentation etc.).

@IQAndreas
Copy link
Contributor Author

Does that look good? (I was tempted to change all 2 space indentations to tabs, but I went by your preferences instead ;)

It was already there, but I made it explicit in OptionParser to make it look nice when you run the help command.
@rvgate
Copy link

rvgate commented Jul 3, 2012

👍 Thank you IQAndreas, I'm liking this addition... Enables many more possibilities.

wereHamster added a commit that referenced this pull request Jul 3, 2012
@wereHamster wereHamster merged commit 2c05ae5 into wereHamster:master Jul 3, 2012
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