Sha256: 63ee60884ebdf3f9d4d1f0a3c22ca1270d50b6e583d6fad3c4e54e4da69698bf

Contents?: true

Size: 1.42 KB

Versions: 3

Compression:

Stored size: 1.42 KB

Contents

# frozen_string_literal: true

require 'thor'
require_relative '../configurable'
require_relative '../exitable'
require_relative 'delete'
require_relative 'init'
require_relative '../task_defaultable'

module Branch
  module Name
    module Subcommands
      class Config < ::Thor
        include Configurable
        include Exitable
        include TaskDefaultable

        desc 'info', 'Displays information about this gem configuration'
        long_desc <<-LONG_DESC
          NAME
          \x5
          `branch-name config info` -- Displays information about this gem configuration.

          SYNOPSIS
          \x5
          branch-name config info
        LONG_DESC
        def info
          if global_config_file?
            say "Global config file exists: \"#{global_config_file}\"", :green
          else
            say "Global config file does not exist at: \"#{global_folder}\"", :yellow
          end

          if local_config_file?
            say "Local config file exists: \"#{local_config_file}\"", :green
          else
            say "Local config file does not exist at: \"#{local_folder}\"", :yellow
          end
        end

        desc 'init SUBCOMMAND', 'Sets up config files for this gem'
        subcommand :init, Branch::Name::Subcommands::Init

        desc 'delete SUBCOMMAND', 'Deletes one of all config files for this gem'
        subcommand :delete, Branch::Name::Subcommands::Delete
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
branch-name-3.2.2 lib/branch/name/subcommands/config.rb
branch-name-3.2.1 lib/branch/name/subcommands/config.rb
branch-name-3.0.0 lib/branch/name/subcommands/config.rb