Sha256: f62495fa8fcb3e9266f3a2e3fb324e05461960903f0a949462056e816cfdd56e

Contents?: true

Size: 532 Bytes

Versions: 12

Compression:

Stored size: 532 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_geordi(name, *args)
      options = args.last.is_a?(Hash) ? args.pop : {}
      invoke(name, args, options)
    end

  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
geordi-5.4.0 lib/geordi/cli.rb
geordi-5.3.0 lib/geordi/cli.rb
geordi-5.2.4 lib/geordi/cli.rb
geordi-5.2.3 lib/geordi/cli.rb
geordi-5.2.2 lib/geordi/cli.rb
geordi-5.2.1 lib/geordi/cli.rb
geordi-5.2.0 lib/geordi/cli.rb
geordi-5.1.0 lib/geordi/cli.rb
geordi-5.0.0 lib/geordi/cli.rb
geordi-4.2.1 lib/geordi/cli.rb
geordi-4.2.0 lib/geordi/cli.rb
geordi-4.1.1 lib/geordi/cli.rb