Sha256: 74be517b5ff3aa78b576f9aa971871981a6a2b6867598f84a973761f0d1e0ca2

Contents?: true

Size: 731 Bytes

Versions: 5

Compression:

Stored size: 731 Bytes

Contents

require 'thor'
require 'bundler'
require 'geordi/interaction'
require 'geordi/util'

module Geordi
  class CLI < Thor

    if Geordi::Util.ruby_version <= Gem::Version.new('2.0.0')
      warn "Deprecation warning: Ruby 1.8.7 and 1.9.3 support will be dropped in Geordi 3.x."
    end

    include Geordi::Interaction

    def self.exit_on_failure?
      true
    end

    # load all tasks defined in lib/geordi/commands
    Dir[File.expand_path '../commands/*.rb', __FILE__].each do |file|
      class_eval File.read(file), file
    end

    private

    # fix weird implementation of #invoke
    def invoke_cmd(name, *args)
      options = args.last.is_a?(Hash) ? args.pop : {}
      invoke(name, args, options)
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
geordi-2.12.3 lib/geordi/cli.rb
geordi-2.12.2 lib/geordi/cli.rb
geordi-2.12.1 lib/geordi/cli.rb
geordi-2.12.0 lib/geordi/cli.rb
geordi-2.11.0 lib/geordi/cli.rb