rubocop-nueca 2.0.0 → 2.0.1
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 +4 -4
- data/config/default.yml +0 -3
- data/lib/rubocop/cop/deprecated/auto_time_definition.rb +1 -1
- data/lib/rubocop/cop/deprecated/browser_driver.rb +1 -1
- data/lib/rubocop/cop/deprecated/mongoid_needs.rb +1 -1
- data/lib/rubocop/cop/rails/model_association_consistent_spacing.rb +1 -1
- data/lib/rubocop/cop/rails/model_association_grouping.rb +2 -2
- data/lib/rubocop/cop/shared/collection_context.rb +1 -1
- data/lib/rubocop/nueca/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8f3aec7be2554e9ad94e87b3e5258c31f0ade6ec14f4536b95000bed23c5741
|
4
|
+
data.tar.gz: 34a4f7f434ffa20e2550d9993154b2a07be32d5cad2648b72c1429d10ca90c94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29b570015f070e3eed9c1b18d3ea70fee7e341fac6872717c7914daa8895313694cb4a5c1cef8b982bdee1f75467994412b42a2f38727eb06a8534f6fc6f19b4
|
7
|
+
data.tar.gz: 6083470135a843e79501307da511747a2cafb67a0e9d31af28647cd389967aa010c5b0e761e593d20864031bf1252353437db8e341f9f2eda68e090a7b40de66
|
data/config/default.yml
CHANGED
@@ -29,7 +29,7 @@ module RuboCop
|
|
29
29
|
|
30
30
|
def on_send(node)
|
31
31
|
buffer = node.source_range.source_buffer
|
32
|
-
return
|
32
|
+
return unless buffer.name.include?('_spec.rb')
|
33
33
|
return unless require_mongoid_helper(node)
|
34
34
|
|
35
35
|
root_node = processed_source.ast
|
@@ -67,7 +67,7 @@ module RuboCop
|
|
67
67
|
def check_same_type_grouping(same_type_associations, all_associations)
|
68
68
|
groups = find_contiguous_groups(same_type_associations, all_associations)
|
69
69
|
|
70
|
-
return
|
70
|
+
return unless groups.length > 1
|
71
71
|
|
72
72
|
groups[1..].each do |group|
|
73
73
|
add_offense(group.first, message: MSG)
|
@@ -99,7 +99,7 @@ module RuboCop
|
|
99
99
|
end
|
100
100
|
|
101
101
|
def finalize_group(groups, current_group)
|
102
|
-
return
|
102
|
+
return unless current_group.any?
|
103
103
|
|
104
104
|
groups << current_group.dup
|
105
105
|
current_group.clear
|
@@ -44,7 +44,7 @@ module RuboCop
|
|
44
44
|
send_node = node.send_node
|
45
45
|
return unless send_node.send_type? && route_method?(send_node)
|
46
46
|
|
47
|
-
add_route_block_if_valid(node)
|
47
|
+
add_route_block_if_valid(node) unless [:member, :collection].include?(send_node.method_name)
|
48
48
|
process_nested_context(node)
|
49
49
|
end
|
50
50
|
|