Sha256: acf6a4841d17a0936b280603556952b4e9a07e4808c5452ae00f88f78f971d45

Contents?: true

Size: 712 Bytes

Versions: 27

Compression:

Stored size: 712 Bytes

Contents

# frozen_string_literal: true

module Karafka
  # Karafka framework Cli
  class Cli < Thor
    # Console Karafka Cli action
    class Console < Base
      desc 'Start the Karafka console (short-cut alias: "c")'
      option aliases: 'c'

      # @return [String] Console executing command
      # @example
      #   Karafka::Cli::Console.command #=> 'KARAFKA_CONSOLE=true bundle exec irb...'
      def self.command
        envs = [
          "IRBRC='#{Karafka.gem_root}/.console_irbrc'",
          'KARAFKA_CONSOLE=true'
        ]
        "#{envs.join(' ')} bundle exec irb"
      end

      # Start the Karafka console
      def call
        cli.info
        exec self.class.command
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
karafka-1.2.13 lib/karafka/cli/console.rb
karafka-1.2.12 lib/karafka/cli/console.rb
karafka-1.2.11 lib/karafka/cli/console.rb
karafka-1.2.10 lib/karafka/cli/console.rb
karafka-1.2.9 lib/karafka/cli/console.rb
karafka-1.2.8 lib/karafka/cli/console.rb
karafka-1.2.7 lib/karafka/cli/console.rb
karafka-1.2.6 lib/karafka/cli/console.rb
karafka-1.2.5 lib/karafka/cli/console.rb
karafka-1.2.4 lib/karafka/cli/console.rb
karafka-1.2.3 lib/karafka/cli/console.rb
karafka-1.2.2 lib/karafka/cli/console.rb
karafka-1.2.1 lib/karafka/cli/console.rb
karafka-1.2.0 lib/karafka/cli/console.rb
karafka-1.2.0.beta4 lib/karafka/cli/console.rb
karafka-1.2.0.beta3 lib/karafka/cli/console.rb
karafka-1.2.0.beta2 lib/karafka/cli/console.rb
karafka-1.2.0.beta1 lib/karafka/cli/console.rb
karafka-1.1.2 lib/karafka/cli/console.rb
karafka-1.1.1 lib/karafka/cli/console.rb