Sha256: caf1498f391c88f0e42b1a1944e3387666e3ae4a57f1fd2abf97f44bea8a715f

Contents?: true

Size: 774 Bytes

Versions: 8

Compression:

Stored size: 774 Bytes

Contents

# frozen_string_literal: true

module Command
  class Config < Base
    NAME = "config"
    OPTIONS = [
      app_option
    ].freeze
    DESCRIPTION = "Displays current configs (global and app-specific)"
    LONG_DESCRIPTION = <<~HEREDOC
      - Displays current configs (global and app-specific)
    HEREDOC
    EXAMPLES = <<~HEREDOC
      ```sh
      # Shows the global config.
      cpl config

      # Shows both global and app-specific configs.
      cpl config -a $APP_NAME
      ```
    HEREDOC

    def call
      puts "-- Options"
      puts config.options.to_hash.to_yaml[4..]
      puts

      puts "-- Current config (app: #{config.app})"
      puts config.app ? config.current.to_yaml[4..] : "Please specify app to get app config"
      puts
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
cpl-0.4.1 lib/command/config.rb
cpl-0.4.0 lib/command/config.rb
cpl-0.3.3 lib/command/config.rb
cpl-0.3.2 lib/command/config.rb
cpl-0.3.1 lib/command/config.rb
cpl-0.3.0 lib/command/config.rb
cpl-0.2.0 lib/command/config.rb
cpl-0.1.0 lib/command/config.rb