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 type to options object #7

Merged
merged 5 commits into from
Dec 5, 2013
Merged

Added type to options object #7

merged 5 commits into from
Dec 5, 2013

Conversation

lanoid
Copy link
Contributor

@lanoid lanoid commented Dec 3, 2013

The option object now supports a type key/value, the application will throw an error when an unsupported type is requested.

See qrencode -help for supported types.

The option object now supports a type key/value, the application will throw an error when an unsupported type is requested.

See qrencode -help for supported types.
@@ -1,7 +1,7 @@
{
"name": "qr",
"description": "A small library to generate QR codes with libqrencode.",
"version": "0.2.0",
"version": "0.2.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

it's best practice to not change this in pull requests, and let the maintainer update this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cool, I'll revert that change

As per https://github.com/freewil suggestion if no type option is passed the -t flag and parameter will not be passed to qrencode process
@lanoid
Copy link
Contributor Author

lanoid commented Dec 5, 2013

@freewil thanks for reviewing my changes so quickly!

Corrected broken toString() method.


// Remove type if the option has not been passed
if(self.types.indexOf(cmd_options.type) === -1){
Copy link
Contributor

Choose a reason for hiding this comment

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

should probably make this cmd_options.type.toUpperCase() so the user can pass in 'svg', etc.

Tests for changes to the default object, tests that a toUpperCase string exists in the allowed types.
bcelenza added a commit that referenced this pull request Dec 5, 2013
Added type to options object
@bcelenza bcelenza merged commit c79e7b2 into heavyco:master Dec 5, 2013
@bcelenza
Copy link
Contributor

bcelenza commented Dec 5, 2013

Thanks guys -- republished as v2.1.

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.

3 participants