Microchip08 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/154346

Change subject: add synopses for MediaWiki-Vagrant commands
......................................................................

add synopses for MediaWiki-Vagrant commands

This commit adds synopses for MediaWiki-Vagrant's custom commands, so that they
have meaningful help messages when somebody runs `vagrant -h`, hopefully making
it clearer as to what each command does at a glance.

Before this commit, most non-vanilla Vagrant commands had a blank space where
their synopsis would be. `vagrant vbguest` is now the only command missing a
synopsis.

Change-Id: I7173a27cf2f70f44d3387eb1a004874e6b569fa3
---
M lib/mediawiki-vagrant/git-update.rb
M lib/mediawiki-vagrant/import-dump.rb
M lib/mediawiki-vagrant/paste-puppet.rb
M lib/mediawiki-vagrant/roles.rb
M lib/mediawiki-vagrant/run-tests.rb
5 files changed, 32 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/46/154346/1

diff --git a/lib/mediawiki-vagrant/git-update.rb 
b/lib/mediawiki-vagrant/git-update.rb
index 78443ca..5f892c4 100644
--- a/lib/mediawiki-vagrant/git-update.rb
+++ b/lib/mediawiki-vagrant/git-update.rb
@@ -1,4 +1,8 @@
 class GitUpdates < Vagrant.plugin(2, :command)
+    def self.synopsis
+        "fetches new code from Gerrit"
+    end
+
     def execute
         if %w(-h --help).include? @argv.first
             @env.ui.info 'Usage: vagrant git-update [-h]'
diff --git a/lib/mediawiki-vagrant/import-dump.rb 
b/lib/mediawiki-vagrant/import-dump.rb
index 8718c9e..9e1388b 100644
--- a/lib/mediawiki-vagrant/import-dump.rb
+++ b/lib/mediawiki-vagrant/import-dump.rb
@@ -1,4 +1,8 @@
 class ImportDump < Vagrant.plugin(2, :command)
+    def self.synopsis
+        "imports an XML file into MediaWiki"
+    end
+
     def execute
         if ['-h', '--help'].include? @argv.first
             @env.ui.info "Usage: vagrant import-dump dumpfile.xml [-h]"
diff --git a/lib/mediawiki-vagrant/paste-puppet.rb 
b/lib/mediawiki-vagrant/paste-puppet.rb
index 1ddaa78..9db7283 100644
--- a/lib/mediawiki-vagrant/paste-puppet.rb
+++ b/lib/mediawiki-vagrant/paste-puppet.rb
@@ -4,6 +4,10 @@
 
     URL = URI('http://dpaste.de/api/')
 
+    def self.synopsis
+        "uploads your puppet logs to dpaste.de pastebin"
+    end
+
     def latest_logfile
         Dir[File.join $DIR, '/logs/puppet/*.log'].max_by { |f| File.mtime f }
     end
diff --git a/lib/mediawiki-vagrant/roles.rb b/lib/mediawiki-vagrant/roles.rb
index 906a0e3..032997f 100644
--- a/lib/mediawiki-vagrant/roles.rb
+++ b/lib/mediawiki-vagrant/roles.rb
@@ -6,6 +6,10 @@
     class ListRoles < Vagrant.plugin(2, :command)
         include PluginEnvironment
 
+        def self.synopsis
+            "lists available mediawiki-vagrant roles"
+        end
+
         def execute
             @env.ui.info "Available roles:\n"
             enabled = @mwv.roles_enabled
@@ -28,6 +32,10 @@
 
     class EnableRole < Vagrant.plugin(2, :command)
         include PluginEnvironment
+
+        def self.synopsis
+            "enables a mediawiki-vagrant role"
+        end
 
         def execute
             if @argv.empty? or ['-h', '--help'].include? @argv.first
@@ -52,6 +60,10 @@
     class DisableRole < Vagrant.plugin(2, :command)
         include PluginEnvironment
 
+        def self.synopsis
+            "disables a mediawiki-vagrant role"
+        end
+
         def execute
             if @argv.empty? or ['-h', '--help'].include? @argv.first
                 @env.ui.info 'Disable one or more optional roles.'
@@ -75,6 +87,10 @@
     class ResetRoles < Vagrant.plugin(2, :command)
         include PluginEnvironment
 
+        def self.synopsis
+            "disables all optional mediawiki-vagrant roles"
+        end
+
         def execute
             if ['-h', '--help'].include? @argv.first
                 @env.ui.info 'Disable all optional roles.'
diff --git a/lib/mediawiki-vagrant/run-tests.rb 
b/lib/mediawiki-vagrant/run-tests.rb
index 79dc78f..4e50245 100644
--- a/lib/mediawiki-vagrant/run-tests.rb
+++ b/lib/mediawiki-vagrant/run-tests.rb
@@ -1,4 +1,8 @@
 class RunTests < Vagrant.plugin(2, :command)
+    def self.synopsis
+        "runs MediaWiki's test suite"
+    end
+
     def execute
         if ['-h', '--help'].include? @argv.first
             @env.ui.info "Usage: vagrant run-tests [tests] [-h]"

-- 
To view, visit https://gerrit.wikimedia.org/r/154346
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7173a27cf2f70f44d3387eb1a004874e6b569fa3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Microchip08 <doug...@chippy.ch>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to