Sha256: 15b66fd1a08db5cf5be1c581b33d4989fab5a45a1ef969a2c1395b104b1a0f4e

Contents?: true

Size: 660 Bytes

Versions: 2

Compression:

Stored size: 660 Bytes

Contents

require 'mixlib/cli'

module Mysql2xxxx
  class Cli
    include ::Mixlib::CLI
    %w{ user password host Port database charset encoding }.each do |o|
      option o.downcase.to_sym,
        :short => "-#{o[0,1]} #{o.upcase}",
        :long  => "--#{o.downcase}=#{o.upcase}",
        :description => "Set MySQL #{o.downcase}"
    end
    option :execute,
      :short => '-e EXECUTE',
      :long  => '--execute=EXECUTE',
      :description => 'The SQL statement to execute'
    option :help,
      :long => "--help",
      :description => "Show this message",
      :on => :tail,
      :boolean => true,
      :show_options => true,
      :exit => 0
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mysql2xxxx-0.1.1 lib/mysql2xxxx/cli.rb
mysql2xxxx-0.1.0 lib/mysql2xxxx/cli.rb