diff options
| author | Steve Kemp <steve@steve.org.uk> | 2015-03-09 12:36:53 +0000 | 
|---|---|---|
| committer | Steve Kemp <steve@steve.org.uk> | 2015-03-09 12:36:53 +0000 | 
| commit | 0e158a3b400c324e35e0617d04508f375a86c633 (patch) | |
| tree | 863748360ca739d476956eaded84f3bd134dbe7e /bin | |
| parent | a763bc51e8cee9a1ab972e39616275f527192454 (diff) | |
Use long-names
Instead of "$0" use $PROGRAM_NAME, instead of $! use "$LOAD_PATH".  This
is more explicit and less-magic.
Flagged by rubocop
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/custodian-dequeue | 2 | ||||
| -rwxr-xr-x | bin/custodian-enqueue | 2 | ||||
| -rwxr-xr-x | bin/custodian-queue | 2 | ||||
| -rwxr-xr-x | bin/multi-ping | 2 | 
4 files changed, 4 insertions, 4 deletions
diff --git a/bin/custodian-dequeue b/bin/custodian-dequeue index 46a62da..349ff31 100755 --- a/bin/custodian-dequeue +++ b/bin/custodian-dequeue @@ -57,7 +57,7 @@ require 'custodian/worker'  #  #  Entry-point to our code.  # -if __FILE__ == $0 then +if __FILE__ == $PROGRAM_NAME then    $help    = false    $manual  = false diff --git a/bin/custodian-enqueue b/bin/custodian-enqueue index 86c253f..75d38ac 100755 --- a/bin/custodian-enqueue +++ b/bin/custodian-enqueue @@ -63,7 +63,7 @@ require 'custodian/settings'  #  #  Entry-point to our code.  # -if __FILE__ == $0 then +if __FILE__ == $PROGRAM_NAME then    $help   = false    $manual = false diff --git a/bin/custodian-queue b/bin/custodian-queue index 978cbda..ed2c3be 100755 --- a/bin/custodian-queue +++ b/bin/custodian-queue @@ -52,7 +52,7 @@ require 'custodian/queue'  #  #  Entry-point to our code.  # -if __FILE__ == $0 then +if __FILE__ == $PROGRAM_NAME then    $FLUSH   = false    $STATS   = false diff --git a/bin/multi-ping b/bin/multi-ping index ef14c4c..00ae466 100755 --- a/bin/multi-ping +++ b/bin/multi-ping @@ -106,7 +106,7 @@ hostname = ARGV.shift  #  Abort if we don't have a hostname  #  if ( hostname.nil? ) -  puts "Usage: #{$0} hostname" +  puts "Usage: #{$PROGRAM_NAME} hostname"    exit 1  end  | 
