Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2018-03-01 20:10:39 +0300
committerSean McGivern <sean@mcgivern.me.uk>2018-03-01 20:10:39 +0300
commit52e133d17627396f29c1875b972534eaba4a837e (patch)
tree36b0c306afe21a270ce0f0fe9b396607778bc271 /app
parentb19a14473099073dff3e770c00f73ddab4a0a414 (diff)
parent34fbade4ae67b56061da89fc881781352880b4ed (diff)
Merge branch 'zj-licensee-key' into 'master'
Client implementation for Licensee#key See merge request gitlab-org/gitlab-ce!17449
Diffstat (limited to 'app')
-rw-r--r--app/models/repository.rb10
1 files changed, 1 insertions, 9 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index 7888c1019e6..242d9d5f125 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -590,15 +590,7 @@ class Repository
def license_key
return unless exists?
- # The licensee gem creates a Rugged object from the path:
- # https://github.com/benbalter/licensee/blob/v8.7.0/lib/licensee/projects/git_project.rb
- begin
- Licensee.license(path).try(:key)
- # Normally we would rescue Rugged::Error, but that is banned by lint-rugged
- # and we need to migrate this endpoint to Gitaly:
- # https://gitlab.com/gitlab-org/gitaly/issues/1026
- rescue
- end
+ raw_repository.license_short_name
end
cache_method :license_key