Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
7b982574
Commit
7b982574
authored
Dec 09, 2018
by
Semyon Pupkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix ConstantName rubocop offense
parent
fa3528ee
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
11 deletions
+5
-11
.rubocop_todo.yml
.rubocop_todo.yml
+0
-6
lib/gitlab/import_sources.rb
lib/gitlab/import_sources.rb
+2
-2
lib/gitlab/ssh_public_key.rb
lib/gitlab/ssh_public_key.rb
+3
-3
No files found.
.rubocop_todo.yml
View file @
7b982574
...
@@ -107,12 +107,6 @@ Lint/UriEscapeUnescape:
...
@@ -107,12 +107,6 @@ Lint/UriEscapeUnescape:
Metrics/LineLength
:
Metrics/LineLength
:
Max
:
1310
Max
:
1310
# Offense count: 2
Naming/ConstantName
:
Exclude
:
-
'
lib/gitlab/import_sources.rb'
-
'
lib/gitlab/ssh_public_key.rb'
# Offense count: 11
# Offense count: 11
# Configuration parameters: EnforcedStyle.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: lowercase, uppercase
# SupportedStyles: lowercase, uppercase
...
...
lib/gitlab/import_sources.rb
View file @
7b982574
...
@@ -10,7 +10,7 @@ module Gitlab
...
@@ -10,7 +10,7 @@ module Gitlab
ImportSource
=
Struct
.
new
(
:name
,
:title
,
:importer
)
ImportSource
=
Struct
.
new
(
:name
,
:title
,
:importer
)
# We exclude `bare_repository` here as it has no import class associated
# We exclude `bare_repository` here as it has no import class associated
I
mportTable
=
[
I
MPORT_TABLE
=
[
ImportSource
.
new
(
'github'
,
'GitHub'
,
Gitlab
::
GithubImport
::
ParallelImporter
),
ImportSource
.
new
(
'github'
,
'GitHub'
,
Gitlab
::
GithubImport
::
ParallelImporter
),
ImportSource
.
new
(
'bitbucket'
,
'Bitbucket Cloud'
,
Gitlab
::
BitbucketImport
::
Importer
),
ImportSource
.
new
(
'bitbucket'
,
'Bitbucket Cloud'
,
Gitlab
::
BitbucketImport
::
Importer
),
ImportSource
.
new
(
'bitbucket_server'
,
'Bitbucket Server'
,
Gitlab
::
BitbucketServerImport
::
Importer
),
ImportSource
.
new
(
'bitbucket_server'
,
'Bitbucket Server'
,
Gitlab
::
BitbucketServerImport
::
Importer
),
...
@@ -45,7 +45,7 @@ module Gitlab
...
@@ -45,7 +45,7 @@ module Gitlab
end
end
def
import_table
def
import_table
I
mportTable
I
MPORT_TABLE
end
end
end
end
end
end
...
...
lib/gitlab/ssh_public_key.rb
View file @
7b982574
...
@@ -4,7 +4,7 @@ module Gitlab
...
@@ -4,7 +4,7 @@ module Gitlab
class
SSHPublicKey
class
SSHPublicKey
Technology
=
Struct
.
new
(
:name
,
:key_class
,
:supported_sizes
)
Technology
=
Struct
.
new
(
:name
,
:key_class
,
:supported_sizes
)
T
echnologies
=
[
T
ECHNOLOGIES
=
[
Technology
.
new
(
:rsa
,
OpenSSL
::
PKey
::
RSA
,
[
1024
,
2048
,
3072
,
4096
]),
Technology
.
new
(
:rsa
,
OpenSSL
::
PKey
::
RSA
,
[
1024
,
2048
,
3072
,
4096
]),
Technology
.
new
(
:dsa
,
OpenSSL
::
PKey
::
DSA
,
[
1024
,
2048
,
3072
]),
Technology
.
new
(
:dsa
,
OpenSSL
::
PKey
::
DSA
,
[
1024
,
2048
,
3072
]),
Technology
.
new
(
:ecdsa
,
OpenSSL
::
PKey
::
EC
,
[
256
,
384
,
521
]),
Technology
.
new
(
:ecdsa
,
OpenSSL
::
PKey
::
EC
,
[
256
,
384
,
521
]),
...
@@ -12,11 +12,11 @@ module Gitlab
...
@@ -12,11 +12,11 @@ module Gitlab
].
freeze
].
freeze
def
self
.
technology
(
name
)
def
self
.
technology
(
name
)
T
echnologies
.
find
{
|
tech
|
tech
.
name
.
to_s
==
name
.
to_s
}
T
ECHNOLOGIES
.
find
{
|
tech
|
tech
.
name
.
to_s
==
name
.
to_s
}
end
end
def
self
.
technology_for_key
(
key
)
def
self
.
technology_for_key
(
key
)
T
echnologies
.
find
{
|
tech
|
key
.
is_a?
(
tech
.
key_class
)
}
T
ECHNOLOGIES
.
find
{
|
tech
|
key
.
is_a?
(
tech
.
key_class
)
}
end
end
def
self
.
supported_sizes
(
name
)
def
self
.
supported_sizes
(
name
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment