Sha256: bf150f78a3532155298ab29ad111d6ce440000412bab72eaf45c6137de0b80ad

Contents?: true

Size: 737 Bytes

Versions: 15

Compression:

Stored size: 737 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
      class Git
        require_sub __FILE__
        runner_with :help, :subcommands do
          desc 'Git utilities for AVM.'
          arg_opt '-C', '--path', 'Path to Git repository.'
          subcommands
        end

        def repository_path
          repository_path? ? parsed.path : '.'
        end

        def repository_path?
          parsed.path.present?
        end

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

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
avm-tools-0.97.0 lib/avm/tools/runner/git.rb
avm-tools-0.96.0 lib/avm/tools/runner/git.rb
avm-tools-0.95.0 lib/avm/tools/runner/git.rb
avm-tools-0.94.3 lib/avm/tools/runner/git.rb
avm-tools-0.94.2 lib/avm/tools/runner/git.rb
avm-tools-0.94.1 lib/avm/tools/runner/git.rb
avm-tools-0.94.0 lib/avm/tools/runner/git.rb
avm-tools-0.93.0 lib/avm/tools/runner/git.rb
avm-tools-0.92.0 lib/avm/tools/runner/git.rb
avm-tools-0.91.0 lib/avm/tools/runner/git.rb
avm-tools-0.90.0 lib/avm/tools/runner/git.rb
avm-tools-0.89.0 lib/avm/tools/runner/git.rb
avm-tools-0.88.0 lib/avm/tools/runner/git.rb
avm-tools-0.87.1 lib/avm/tools/runner/git.rb
avm-tools-0.87.0 lib/avm/tools/runner/git.rb