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

global: add a -q/--quiet flag #87

Merged
merged 2 commits into from
Jan 25, 2014
Merged

global: add a -q/--quiet flag #87

merged 2 commits into from
Jan 25, 2014

Conversation

pearkes
Copy link
Collaborator

@pearkes pearkes commented Jan 21, 2014

This fixes #86

@petems
Copy link
Owner

petems commented Jan 21, 2014

Cool 👍

I was gonna say, I think there's a thor option for mute?, but occams razor wins IMO 😄

@@ -10,6 +10,12 @@ def call(env)
exit 1
end

# If the user passes the global `-q/--quiet` flag, redirect
# stdout
if env["user_quiet"] == true
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nitpicking but I think we can remove == true here as it will be nil when not passed, and it is more idiomatic.

@blom
Copy link
Collaborator

blom commented Jan 22, 2014

LGTM. 👍

@@ -9,6 +9,8 @@ class CLI < Thor

!check_unknown_options

class_option :quiet, type: :boolean, aliases: "-q"
Copy link
Collaborator

Choose a reason for hiding this comment

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

More of a general question since Ruby 1.9 syntax is being used here: Should we move away from supporting 1.8.7? I believe the latest release of Tugboat still works with 1.8.7.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@blom Yea, we probably should, right? What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@pearkes Yeah, hopefully most users have moved to 1.9 or higher by now.

Choose a reason for hiding this comment

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

this wasn't clear from the readme, please have a note there, it's confusing that you cannot get it to work out of the box in ubuntu 12.04

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@bubenkoff Gotcha, to confirm you mean that we should make a note that you must be using > Ruby 1.9?

Choose a reason for hiding this comment

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

yes, sorry if it wasn't clear

On 17 February 2014 17:48, Jack Pearkes [email protected] wrote:

In lib/tugboat/cli.rb:

@@ -9,6 +9,8 @@ class CLI < Thor

 !check_unknown_options
  • class_option :quiet, type: :boolean, aliases: "-q"

@bubenkoff https://github.com/bubenkoff Gotcha, to confirm you mean
that we should make a note that you must be using > Ruby 1.9?

Reply to this email directly or view it on GitHubhttps://github.com//pull/87/files#r9797545
.

Anatoly Bubenkov

@pearkes
Copy link
Collaborator Author

pearkes commented Jan 25, 2014

Cool, thanks, merging this sucker.

pearkes added a commit that referenced this pull request Jan 25, 2014
global: add a -q/--quiet flag
@pearkes pearkes merged commit cf4eb60 into master Jan 25, 2014
@pearkes pearkes deleted the quiet branch January 25, 2014 17:59
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.

Add a --quiet option
4 participants