Sha256: cf9c0515efd8816160f5bbf7b94c87240444de44948e8a84c3060c8bb1b91dbd

Contents?: true

Size: 625 Bytes

Versions: 10

Compression:

Stored size: 625 Bytes

Contents

# frozen_string_literal: true

# takelage git check bit
module GitCheckBit
  # Backend method for git check bit.
  # @return [Boolean] are we on the git bit branch?
  def git_check_bit
    log.debug 'Check if we are on the git bit branch'

    return false unless git_check_workspace

    branch = _git_check_bit_get_branch
    log.debug "We are on git branch \"#{branch}\""

    branch == config.active['git_bit_branch']
  end

  private

  # Get git branch.
  def _git_check_bit_get_branch
    cmd_get_branch =
      config.active['cmd_git_check_bit_get_git_branch']
    (run cmd_get_branch).chomp.split('/')[-1]
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
takelage-0.33.1 lib/takelage/git/check/bit.rb
takelage-0.32.4 lib/takelage/git/check/bit.rb
takelage-0.32.3 lib/takelage/git/check/bit.rb
takelage-0.32.1 lib/takelage/git/check/bit.rb
takelage-0.32.0 lib/takelage/git/check/bit.rb
takelage-0.31.0 lib/takelage/git/check/bit.rb
takelage-0.30.6 lib/takelage/git/check/bit.rb
takelage-0.30.5 lib/takelage/git/check/bit.rb
takelage-0.30.1 lib/takelage/git/check/bit.rb
takelage-0.30.0 lib/takelage/git/check/bit.rb