Sha256: 3b0bdf70f7bf3e185669fbdbf74001fafb22e2cee06ec3c05261b9547cd6c6cf

Contents?: true

Size: 1.37 KB

Versions: 6

Compression:

Stored size: 1.37 KB

Contents

# frozen_string_literal: true

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

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

        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.6.0 lib/branch/name/subcommands/init.rb
branch-name-3.5.1 lib/branch/name/subcommands/init.rb
branch-name-3.5.0 lib/branch/name/subcommands/init.rb
branch-name-3.4.0 lib/branch/name/subcommands/init.rb
branch-name-3.3.0 lib/branch/name/subcommands/init.rb
branch-name-3.2.2 lib/branch/name/subcommands/init.rb