Sha256: 5958a36f6ffa1ea34c7958f097353abee324fe39185396ec80923aad0147fb40

Contents?: true

Size: 619 Bytes

Versions: 1

Compression:

Stored size: 619 Bytes

Contents

module PgSlice
  class CLI < Thor
    class << self
      attr_accessor :instance
    end

    include Helpers

    check_unknown_options!

    class_option :url, desc: "Database URL"
    class_option :dry_run, type: :boolean, default: false, desc: "Print statements without executing"

    map %w[--version -v] => :version

    def self.exit_on_failure?
      true
    end

    def initialize(*args)
      PgSlice::CLI.instance = self
      $stdout.sync = true
      $stderr.sync = true
      super
    end

    desc "version", "Show version"
    def version
      log("pgslice #{PgSlice::VERSION}")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pgslice-0.4.5 lib/pgslice/cli.rb