dark_finger 0.1.3 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c04e8ab4c8e6ae562966f4a5609d9d3df06b486fbf52ec977be9f54635577b4c
4
- data.tar.gz: 5d54afcdb9d594e2574302612a433b278673acae3692911807f22c6d80a12675
3
+ metadata.gz: 6bb9269e95c12d2740048af448da0bbed46a5b47e04d52e79313d44fa879c77c
4
+ data.tar.gz: 159d1077fc091c84baa9d70cf23e06c7a91b18f21ed5b5b84b8157972301cb5a
5
5
  SHA512:
6
- metadata.gz: 3c944d2bd65bdd049730b86c44a16f551e3c5de9d79d71f442b92459007a8b3ec3bd2c3220436dba9f065e607041bb3ea9435f010c2ca0e0295aa695b5e25e6f
7
- data.tar.gz: 7fec157a7910e6a18dc9f12495ff38faec581a190097e3e4300fab723c58acd4ad81201985e0f4f19eac422b8749773b546768b1bcd0df888cdfb57fd01453f0
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: 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
 
@@ -1,3 +1,3 @@
1
1
  module DarkFinger
2
- VERSION = "0.1.3"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -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 =~ Regexp.new(%Q(^\s*##\s*#{required_comments[class_element]} ##$))
122
- add_offense(node, message: "Expected preceeding comment: \"## #{required_comments[class_element]} ##\"")
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.1.3
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-01 00:00:00.000000000 Z
12
+ date: 2018-10-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler