Sha256: 470b4d4758d5ff0d86cb104cf3a8b35254bb5144d85f25bc37755eb350e86a84

Contents?: true

Size: 529 Bytes

Versions: 8

Compression:

Stored size: 529 Bytes

Contents

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

module Geordi
  class CLI < Thor

    def self.exit_on_failure?
      true
    end

    # load all tasks defined in lib/geordi/commands
    Dir[File.expand_path 'commands/*.rb', __dir__].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

8 entries across 8 versions & 1 rubygems

Version Path
geordi-4.1.0 lib/geordi/cli.rb
geordi-4.0.1 lib/geordi/cli.rb
geordi-4.0.0 lib/geordi/cli.rb
geordi-3.2.0 lib/geordi/cli.rb
geordi-3.1.0 lib/geordi/cli.rb
geordi-3.0.3 lib/geordi/cli.rb
geordi-3.0.2 lib/geordi/cli.rb
geordi-3.0.1 lib/geordi/cli.rb