Sha256: 1469e3f9817c0f6f3c27dac35f7fb1fcef769e29bac41b852b063b4764cadd72

Contents?: true

Size: 1.02 KB

Versions: 2

Compression:

Stored size: 1.02 KB

Contents

# frozen_string_literal: true

require 'thor'
require_relative '../support/configuration'

module Dsu
  module Subcommands
    class Config < ::Thor
      include Dsu::Support::Configuration

      default_command :help

      class << self
        def exit_on_failure?
          false
        end
      end

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

        SYNOPSIS
        \x5
        dsu config info
      LONG_DESC
      def info
        print_config_file
      end

      desc 'init', 'Creates and initializes a .dsu file in your home folder'
      long_desc <<-LONG_DESC
        NAME
        \x5
        `dsu config init` -- will create and initialize a .dsu file
        in the "#{Dsu::Support::FolderLocations.root_folder}" folder.

        SYNOPSIS
        \x5
        dsu config init
      LONG_DESC
      def init
        create_config_file!
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dsu-0.1.0.alpha.2 lib/dsu/subcommands/config.rb
dsu-0.1.0.alpha.1 lib/dsu/subcommands/config.rb