Module: Fjords::Cli::Usage
- Included in:
- Core
- Defined in:
- lib/fjords/cli/usage.rb
Instance Method Summary collapse
- #basic_usage ⇒ Object
- #command_usage ⇒ Object
- #display_usage ⇒ Object
- #usage(msg = nil) ⇒ Object
- #usage_error(msg = nil) ⇒ Object
Instance Method Details
#basic_usage ⇒ Object
24 25 26 27 |
# File 'lib/fjords/cli/usage.rb', line 24 def basic_usage "Usage: fjords [options] command [<args>] [command_options]\n" + "Try 'fjords help [command]' or 'fjords help options' for more information." end |
#command_usage ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/fjords/cli/usage.rb', line 29 def command_usage # nameservers List the nameservers for using a root domain <<-USAGE #{basic_usage} Currently available af commands are: Getting Started login Login to Fjords logout Logout of Fjords signup Create an account info Get your account information, including costs Sites sites List deployed sites site:details DOMAIN Information about a specific domain remove DOMAIN Remove a deployed site Site Features cdn:enable DOMAIN Enable the Content Delivery Network cdn:disable DOMAIN Disable the Content Delivery Network gzip:enable DOMAIN Enable Gzipping of assets (HTML, CSS, JS) gzip:disable DOMAIN Disable Gzipping of assets (HTML, CSS, JS) Site Creation push Push a new site Help help [command] Get general help or help on a specific command help options Get help on available options bugreport Send a bug-report USAGE end |
#display_usage ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/fjords/cli/usage.rb', line 12 def display_usage if @usage puts @usage_error if @usage_error puts "Usage: #{@usage}" return elsif @verb_usage puts @verb_usage return end puts command_usage end |
#usage(msg = nil) ⇒ Object
2 3 4 5 |
# File 'lib/fjords/cli/usage.rb', line 2 def usage(msg = nil) @usage = msg if msg @usage end |
#usage_error(msg = nil) ⇒ Object
7 8 9 10 |
# File 'lib/fjords/cli/usage.rb', line 7 def usage_error(msg = nil) @usage_error = msg if msg @usage_error end |