jbox-web/redmine_git_hosting

View on GitHub
lib/redmine_git_hosting/patches/repository_patch.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

require_dependency 'repository'

module RedmineGitHosting
  module Patches
    module RepositoryPatch
      # This is the (possibly non-unique) basename for the Gitolite repository
      def redmine_name
        identifier.presence || project.identifier
      end
    end
  end
end

unless Repository.included_modules.include? RedmineGitHosting::Patches::RepositoryPatch
  Repository.prepend RedmineGitHosting::Patches::RepositoryPatch
end