diff options
-rw-r--r-- | .rubocop_todo.yml | 6 | ||||
-rw-r--r-- | lib/gitlab/import_sources.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/ssh_public_key.rb | 6 |
3 files changed, 5 insertions, 11 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 571df7534cb..3ab76965287 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -107,12 +107,6 @@ Lint/UriEscapeUnescape: Metrics/LineLength: Max: 1310 -# Offense count: 2 -Naming/ConstantName: - Exclude: - - 'lib/gitlab/import_sources.rb' - - 'lib/gitlab/ssh_public_key.rb' - # Offense count: 11 # Configuration parameters: EnforcedStyle. # SupportedStyles: lowercase, uppercase diff --git a/lib/gitlab/import_sources.rb b/lib/gitlab/import_sources.rb index f46bb837cf7..67952ca0f2d 100644 --- a/lib/gitlab/import_sources.rb +++ b/lib/gitlab/import_sources.rb @@ -10,7 +10,7 @@ module Gitlab ImportSource = Struct.new(:name, :title, :importer) # We exclude `bare_repository` here as it has no import class associated - ImportTable = [ + IMPORT_TABLE = [ ImportSource.new('github', 'GitHub', Gitlab::GithubImport::ParallelImporter), ImportSource.new('bitbucket', 'Bitbucket Cloud', Gitlab::BitbucketImport::Importer), ImportSource.new('bitbucket_server', 'Bitbucket Server', Gitlab::BitbucketServerImport::Importer), @@ -45,7 +45,7 @@ module Gitlab end def import_table - ImportTable + IMPORT_TABLE end end end diff --git a/lib/gitlab/ssh_public_key.rb b/lib/gitlab/ssh_public_key.rb index 47571239b5c..6df54852d02 100644 --- a/lib/gitlab/ssh_public_key.rb +++ b/lib/gitlab/ssh_public_key.rb @@ -4,7 +4,7 @@ module Gitlab class SSHPublicKey Technology = Struct.new(:name, :key_class, :supported_sizes) - Technologies = [ + TECHNOLOGIES = [ Technology.new(:rsa, OpenSSL::PKey::RSA, [1024, 2048, 3072, 4096]), Technology.new(:dsa, OpenSSL::PKey::DSA, [1024, 2048, 3072]), Technology.new(:ecdsa, OpenSSL::PKey::EC, [256, 384, 521]), @@ -12,11 +12,11 @@ module Gitlab ].freeze def self.technology(name) - Technologies.find { |tech| tech.name.to_s == name.to_s } + TECHNOLOGIES.find { |tech| tech.name.to_s == name.to_s } end def self.technology_for_key(key) - Technologies.find { |tech| key.is_a?(tech.key_class) } + TECHNOLOGIES.find { |tech| key.is_a?(tech.key_class) } end def self.supported_sizes(name) |