Sha256: c82da3f13b899f8e2b87da8e2e8eb8262b302a1beca8d79331a7f625d517c83c

Contents?: true

Size: 1.04 KB

Versions: 1

Compression:

Stored size: 1.04 KB

Contents

#!/usr/bin/env ruby
#
#  Created on 2008-5-11.
#  Copyright (c) 2008. All rights reserved.

begin
  require 'rubygems'
rescue LoadError
  # no rubygems to load, so we fail silently
end

require 'optparse'
require 'ftools'

# NOTE: the option -p/--path= is given as an example, and should probably be replaced in your application.

OPTIONS = {
  :path     => '~'
}
MANDATORY_OPTIONS = %w(  )

parser = OptionParser.new do |opts|
  opts.banner = <<BANNER
This application is wonderful because...

Usage: #{File.basename($0)} [options]

Options are:
BANNER
  opts.separator ""
  opts.on("-p", "--path=PATH", String,
          "The root path for selecting files",
          "Default: ~") { |OPTIONS[:path]| }
  opts.on("-h", "--help",
          "Show this help message.") { puts opts; exit }
  opts.parse!(ARGV)

  if MANDATORY_OPTIONS && MANDATORY_OPTIONS.find { |option| OPTIONS[option.to_sym].nil? }
    puts opts; exit
  end
end

path = OPTIONS[:path]

File.delete(File.expand_path(path) + "/.autotest")
puts "\nYou no longer receive notifications of your tests.\n"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
carlosbrando-autotest-notification-0.0.7 bin/an-uninstall