Sha256: 5d9a565b8770290b15894213b4950ad651c0c6f833ff9b742b964257e77e1a2e

Contents?: true

Size: 933 Bytes

Versions: 58

Compression:

Stored size: 933 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/console/docopt_runner'
require 'eac_ruby_utils/require_sub'
require 'eac_launcher/git/base'
::EacRubyUtils.require_sub(__FILE__)

module Avm
  module Tools
    class Runner < ::EacRubyUtils::Console::DocoptRunner
      class Git < ::EacRubyUtils::Console::DocoptRunner
        DOC = <<~DOCOPT
          Git utilities for AVM.

          Usage:
            __PROGRAM__ [options] __SUBCOMMANDS__
            __PROGRAM__ -h | --help

          Options:
            -h --help             Show this screen.
            -C <path>             Path to Git repository.
        DOCOPT

        def repository_path
          repository_path? ? options.fetch('-C') : '.'
        end

        def repository_path?
          options.fetch('-C').present?
        end

        def git
          @git ||= ::EacLauncher::Git::Base.by_root(repository_path)
        end
      end
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
avm-tools-0.86.0 lib/avm/tools/runner/git.rb
avm-tools-0.85.1 lib/avm/tools/runner/git.rb
avm-tools-0.85.0 lib/avm/tools/runner/git.rb
avm-tools-0.84.0 lib/avm/tools/runner/git.rb
avm-tools-0.83.0 lib/avm/tools/runner/git.rb
avm-tools-0.82.1 lib/avm/tools/runner/git.rb
avm-tools-0.82.0 lib/avm/tools/runner/git.rb
avm-tools-0.81.0 lib/avm/tools/runner/git.rb
avm-tools-0.80.0 lib/avm/tools/runner/git.rb
avm-tools-0.79.0 lib/avm/tools/runner/git.rb
avm-tools-0.78.0 lib/avm/tools/runner/git.rb
avm-tools-0.77.0 lib/avm/tools/runner/git.rb
avm-tools-0.76.1 lib/avm/tools/runner/git.rb
avm-tools-0.76.0 lib/avm/tools/runner/git.rb
avm-tools-0.75.1 lib/avm/tools/runner/git.rb
avm-tools-0.75.0 lib/avm/tools/runner/git.rb
avm-tools-0.74.1 lib/avm/tools/runner/git.rb
avm-tools-0.74.0 lib/avm/tools/runner/git.rb
avm-tools-0.73.0 lib/avm/tools/runner/git.rb
avm-tools-0.72.0 lib/avm/tools/runner/git.rb