dark_finger 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -9
- data/lib/dark_finger/version.rb +1 -1
- data/lib/rubocop/cop/dark_finger/model_structure.rb +11 -11
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bb9269e95c12d2740048af448da0bbed46a5b47e04d52e79313d44fa879c77c
|
4
|
+
data.tar.gz: 159d1077fc091c84baa9d70cf23e06c7a91b18f21ed5b5b84b8157972301cb5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c739c91ec849c1bbb6a3b2beb81bd6c8f97034492104cc1584cbfcb71820e9841ff7612d888eedf7fec7affc0817bdf7cb56d6dd9f6c70816d275867b0ee69c7
|
7
|
+
data.tar.gz: 606f2555d0ddc596cc337789e5b36bea9b75b931057b531f14af1b64f6921c7d4ee275c99c3f2a395fe699e7f5f4ee9b5df6367c3a8909bfb950eda1234df5e7
|
data/README.md
CHANGED
@@ -64,15 +64,15 @@ DarkFinger/ModelStructure:
|
|
64
64
|
- class_method
|
65
65
|
- instance_method
|
66
66
|
required_comments:
|
67
|
-
association: Relationships
|
68
|
-
attribute: Attributes
|
69
|
-
callback: Callbacks
|
70
|
-
constant: Constants
|
71
|
-
enum: Enums
|
72
|
-
include: Includes
|
73
|
-
module: Modules
|
74
|
-
scope: Scopes
|
75
|
-
validation:
|
67
|
+
association: '# Relationships'
|
68
|
+
attribute: '# Attributes'
|
69
|
+
callback: '# Callbacks'
|
70
|
+
constant: '# Constants'
|
71
|
+
enum: '# Enums'
|
72
|
+
include: '# Includes'
|
73
|
+
module: '# Modules'
|
74
|
+
scope: '# Scopes'
|
75
|
+
validation: '# Validations'
|
76
76
|
|
77
77
|
```
|
78
78
|
|
data/lib/dark_finger/version.rb
CHANGED
@@ -38,15 +38,15 @@ module RuboCop
|
|
38
38
|
]
|
39
39
|
|
40
40
|
DEFAULT_REQUIRED_COMMENTS = {
|
41
|
-
ASSOCIATION => 'Relationships',
|
42
|
-
ATTRIBUTES => 'Attributes',
|
43
|
-
CALLBACK => 'Callbacks',
|
44
|
-
CONSTANT => 'Constants',
|
45
|
-
ENUM => 'Enums',
|
46
|
-
INCLUDE => 'Includes',
|
47
|
-
MODULE => 'Modules',
|
48
|
-
SCOPE => 'Scopes',
|
49
|
-
VALIDATION => 'Validations'
|
41
|
+
ASSOCIATION => '# Relationships',
|
42
|
+
ATTRIBUTES => '# Attributes',
|
43
|
+
CALLBACK => '# Callbacks',
|
44
|
+
CONSTANT => '# Constants',
|
45
|
+
ENUM => '# Enums',
|
46
|
+
INCLUDE => '# Includes',
|
47
|
+
MODULE => '# Modules',
|
48
|
+
SCOPE => '# Scopes',
|
49
|
+
VALIDATION => '# Validations'
|
50
50
|
}
|
51
51
|
|
52
52
|
attr_reader :required_order, :required_comments
|
@@ -118,8 +118,8 @@ module RuboCop
|
|
118
118
|
return false unless required_comments[class_element]
|
119
119
|
|
120
120
|
comment = node.preceeding_comment(processed_source)
|
121
|
-
unless comment && comment
|
122
|
-
add_offense(node, message: "Expected preceeding comment: \"
|
121
|
+
unless comment && comment.strip == required_comments[class_element]
|
122
|
+
add_offense(node, message: "Expected preceeding comment: \"#{required_comments[class_element]}\"")
|
123
123
|
end
|
124
124
|
end
|
125
125
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dark_finger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Professor Wang Matrix PhD
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-10-
|
12
|
+
date: 2018-10-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|