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: 57a1acb3ef70890ea8910224f5060a90089a66d9081d71d11967994ef85bb84c
4
- data.tar.gz: 23f566be54f55ce37116a9697c31b1cfff7070fad2778134ba4f0aa99ed8772e
3
+ metadata.gz: aeca885328893c47690fb115fdc821e2255fb7e21142a6edbf2611903aa02a2a
4
+ data.tar.gz: 225b86b35e811c7757619520e93b63caf65c62039d26938d07a8b8803c7f141c
5
5
  SHA512:
6
- metadata.gz: 10885dd2546e0d265046bd11d9cbde03f333dddbc2ae2e2ae7de1e76822186387f086658e9753a046b9875b1d0aebdcf56bacf366eef590c2986d83c04f45984
7
- data.tar.gz: 86d7e449a1ca5789f64e13d898cbcf8460eff0547866b21ca2bc9533ec39873c17bf8ee41669dcfbf197d6162c43b53186aa948b7181aa2ec9b38d21cd8681ed
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?('db/migrate', 'db/post_migrate')
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
- models_path = File.join(Dir.pwd, 'app', 'models')
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
@@ -1,5 +1,5 @@
1
1
  module Gitlab
2
2
  module Styles
3
- VERSION = '2.4.0'.freeze
3
+ VERSION = '2.4.1'.freeze
4
4
  end
5
5
  end
@@ -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.0
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-01 00:00:00.000000000 Z
11
+ date: 2018-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop