Merge branch 'enable-frozen-string-lib-gitlab' into 'master'
Enable some frozen string in lib/gitlab See merge request gitlab-org/gitlab-ce!22304
This commit is contained in:
commit
edb46ca644
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Enable some frozen string in lib/gitlab
|
||||
merge_request:
|
||||
author: gfyoung
|
||||
type: performance
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Auth
|
||||
##
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# These calls help to authenticate to OAuth provider by providing username and password
|
||||
#
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Auth
|
||||
class IpRateLimiter
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# LDAP authorization model
|
||||
#
|
||||
# * Check if we are allowed access (not blocked)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Auth
|
||||
module LDAP
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Class to parse and transform the info provided by omniauth
|
||||
#
|
||||
module Gitlab
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# These calls help to authenticate to LDAP by providing username and password
|
||||
#
|
||||
# Since multiple LDAP servers are supported, it will loop through all of them
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Load a specific server configuration
|
||||
module Gitlab
|
||||
module Auth
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
# -*- ruby encoding: utf-8 -*-
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Based on the `ruby-net-ldap` gem's `Net::LDAP::DN`
|
||||
#
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Auth
|
||||
module LDAP
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Auth
|
||||
module LDAP
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# LDAP extension for User model
|
||||
#
|
||||
# * Find or create user from omniauth.auth data
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Class to parse and transform the info provided by omniauth
|
||||
#
|
||||
module Gitlab
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# These calls help to authenticate to OAuth provider by providing username and password
|
||||
#
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Auth
|
||||
module OAuth
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Auth
|
||||
module OAuth
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# :nocov:
|
||||
module Gitlab
|
||||
module Auth
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# OAuth extension for User model
|
||||
#
|
||||
# * Find GitLab user based on omniauth uid and provider
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Auth
|
||||
class OmniauthIdentityLinkerBase
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Use for authentication only, in particular for Rack::Attack.
|
||||
# Does not perform authorization of scopes, etc.
|
||||
module Gitlab
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
module Gitlab # rubocop:disable Naming/FileName
|
||||
# rubocop:disable Naming/FileName
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Auth
|
||||
Result = Struct.new(:actor, :project, :type, :authentication_abilities) do
|
||||
def ci?(for_project)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Auth
|
||||
module Saml
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Auth
|
||||
module Saml
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Auth
|
||||
module Saml
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# SAML extension for User model
|
||||
#
|
||||
# * Find GitLab user based on SAML uid and provider
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Auth
|
||||
class TooManyIps < StandardError
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Auth
|
||||
class UniqueIpsLimiter
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Auth
|
||||
class UserAccessDeniedReason
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Auth
|
||||
AuthenticationError = Class.new(StandardError)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Badge
|
||||
class Base
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Badge
|
||||
module Coverage
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Badge
|
||||
module Coverage
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Badge
|
||||
module Coverage
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Badge
|
||||
##
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Badge
|
||||
module Pipeline
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Badge
|
||||
module Pipeline
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Badge
|
||||
module Pipeline
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Badge
|
||||
##
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module BareRepositoryImport
|
||||
class Importer
|
||||
NoAdminError = Class.new(StandardError)
|
||||
|
||||
def self.execute(import_path)
|
||||
import_path << '/' unless import_path.ends_with?('/')
|
||||
unless import_path.ends_with?('/')
|
||||
import_path = "#{import_path}/"
|
||||
end
|
||||
|
||||
repos_to_import = Dir.glob(import_path + '**/*.git')
|
||||
|
||||
unless user = User.admins.order_id_asc.first
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module BareRepositoryImport
|
||||
class Repository
|
||||
|
@ -6,9 +8,12 @@ module Gitlab
|
|||
attr_reader :group_path, :project_name, :repo_path
|
||||
|
||||
def initialize(root_path, repo_path)
|
||||
unless root_path.ends_with?('/')
|
||||
root_path = "#{root_path}/"
|
||||
end
|
||||
|
||||
@root_path = root_path
|
||||
@repo_path = repo_path
|
||||
@root_path << '/' unless root_path.ends_with?('/')
|
||||
|
||||
full_path =
|
||||
if hashed? && !wiki?
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module BitbucketImport
|
||||
class Importer
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module BitbucketImport
|
||||
class ProjectCreator
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module BitbucketServerImport
|
||||
class ProjectCreator
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# This class is not backed by a table in the main database.
|
||||
# It loads the latest Pipeline for the HEAD of a repository, and caches that
|
||||
# in Redis.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Cache
|
||||
# See https://docs.gitlab.com/ee/development/utilities.html#requestcache
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Checks
|
||||
class ChangeAccess
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Checks
|
||||
class CommitCheck
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Checks
|
||||
class ForcePush
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Checks
|
||||
class LfsIntegrity
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Checks
|
||||
class MatchingMergeRequest
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Checks
|
||||
class PostPushMessage
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Checks
|
||||
class ProjectCreated < PostPushMessage
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Checks
|
||||
class ProjectMoved < PostPushMessage
|
||||
|
|
Loading…
Reference in New Issue