gitlab-styles 2.4.0 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aeca885328893c47690fb115fdc821e2255fb7e21142a6edbf2611903aa02a2a
|
4
|
+
data.tar.gz: 225b86b35e811c7757619520e93b63caf65c62039d26938d07a8b8803c7f141c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed7b77a8f0f191d2db69628e3d38c574b53b667da357cb5776c1d0fda05e28ce8e5b66c1275f202bd6d9e721a2e1c28aa00cb17548dddf09e4064a9109c43c4c
|
7
|
+
data.tar.gz: 682b6007b316b01c6b3f13d8b3c2b0cdf7d3f00adbe8901d71ebfd1f8dee622c0afadc0748d31e61b407c517399416c22bbb24cb958be798aacc960b2f042050
|
@@ -7,7 +7,11 @@ module Gitlab
|
|
7
7
|
def in_migration?(node)
|
8
8
|
dirname = File.dirname(node.location.expression.source_buffer.name)
|
9
9
|
|
10
|
-
dirname.end_with?(
|
10
|
+
dirname.end_with?(
|
11
|
+
'db/migrate',
|
12
|
+
'db/post_migrate',
|
13
|
+
'ee/db/migrate',
|
14
|
+
'ee/db/post_migrate')
|
11
15
|
end
|
12
16
|
end
|
13
17
|
end
|
@@ -5,9 +5,11 @@ module Gitlab
|
|
5
5
|
# Returns true if the given node originated from the models directory.
|
6
6
|
def in_model?(node)
|
7
7
|
path = node.location.expression.source_buffer.name
|
8
|
-
|
8
|
+
pwd = Dir.pwd
|
9
|
+
models_path = File.join(pwd, 'app', 'models')
|
10
|
+
ee_models_path = File.join(pwd, 'ee', 'app', 'models')
|
9
11
|
|
10
|
-
path.start_with?(models_path)
|
12
|
+
path.start_with?(models_path, ee_models_path)
|
11
13
|
end
|
12
14
|
end
|
13
15
|
end
|
data/rubocop-naming.yml
CHANGED
@@ -22,6 +22,10 @@ Naming/ConstantName:
|
|
22
22
|
Naming/FileName:
|
23
23
|
Enabled: true
|
24
24
|
|
25
|
+
# Memoized methods whose instance variable name does not match the method name.
|
26
|
+
Naming/MemoizedInstanceVariableName:
|
27
|
+
Enabled: false
|
28
|
+
|
25
29
|
# Use the configured style when naming methods.
|
26
30
|
Naming/MethodName:
|
27
31
|
Enabled: true
|
@@ -38,6 +42,13 @@ Naming/PredicateName:
|
|
38
42
|
- 'spec/**/*'
|
39
43
|
- 'features/**/*'
|
40
44
|
|
45
|
+
# Method parameter names for how descriptive they are.
|
46
|
+
Naming/UncommunicativeMethodParamName:
|
47
|
+
Enabled: true
|
48
|
+
MinNameLength: 2
|
49
|
+
AllowedNames:
|
50
|
+
- _
|
51
|
+
|
41
52
|
# Use the configured style when naming variables.
|
42
53
|
Naming/VariableName:
|
43
54
|
EnforcedStyle: snake_case
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-styles
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitLab
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|