Sha256: 73166639f3da1951381b3398e7f416b4ac61d31bec6339ef159a37b41373259c

Contents?: true

Size: 1.39 KB

Versions: 6

Compression:

Stored size: 1.39 KB

Contents

# frozen_string_literal: true

require 'thor'
require 'thor_nested_subcommand'
require_relative '../configurable'
require_relative '../exitable'
require_relative '../task_defaultable'

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

        class << self
          def base_usage
            'config init'
          end
        end

        desc 'global', 'Creates and initializes a .branch-name file in the global folder'
        long_desc <<-LONG_DESC
          NAME
          \x5
          `branch-name config init global` -- will create and initialize a .branch-name file
          in the "#{Locatable.global_folder}" folder.

          SYNOPSIS
          \x5
          branch-name config init global
        LONG_DESC
        def global
          create_global_config_file!
        end

        desc 'local', 'Creates and initializes a .branch-name file in the local folder'
        long_desc <<-LONG_DESC
          NAME
          \x5
          `branch-name config init local` -- will create and initialize a .branch-name file
          in the "#{Locatable.local_folder}" folder.

          SYNOPSIS
          \x5
          branch-name config init local
        LONG_DESC
        def local
          create_local_config_file!
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
branch-name-3.10.2 lib/branch/name/subcommands/init.rb
branch-name-3.10.1 lib/branch/name/subcommands/init.rb
branch-name-3.10.0 lib/branch/name/subcommands/init.rb
branch-name-3.9.0 lib/branch/name/subcommands/init.rb
branch-name-3.8.0 lib/branch/name/subcommands/init.rb
branch-name-3.7.0 lib/branch/name/subcommands/init.rb