gl_rubocop 0.2.15 → 0.2.16
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/lib/gl_rubocop/gl_cops/limit_flash_options.rb +4 -5
- data/lib/gl_rubocop/version.rb +1 -1
- 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: 506bb7fe1d711020cc9b6875c92fa3171f8efb90e035eb5955039eb51d7a0937
|
4
|
+
data.tar.gz: 7a88ba78b296bca4bd143f18c91bc6ba73c34f5a9a32f8b16c92067db5716d71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 335abd0579fdf6a7db7f34e3c26c8ec550b86d18cf6dfc9a417fa5cfb7072f6bf10eacc941f406225eaa34cdd2a4685e2a6defe24abb3b8cbc85aa30a3504028
|
7
|
+
data.tar.gz: 7f8ea4867d5e773eb4c38517a21379e63862fc2e394791f1a2c9c083fac77a678e56416d302aae20dc2ce3087592f2658e1d22fec0fbc748876ffc6f09905953
|
@@ -16,10 +16,6 @@ module GLRubocop
|
|
16
16
|
# flash.now[:anything_else] = "Not allowed"
|
17
17
|
# Alert::Component.new(type: :notice, message: "Error")
|
18
18
|
# Notifications::Dismissible::Component.new(variant: :blue_box, message: "Error")
|
19
|
-
|
20
|
-
MSG = 'This cop checks for the use of flash options not in the allowlist. ' \
|
21
|
-
'Please limit flash options to those defined in the application configuration.'
|
22
|
-
|
23
19
|
ALLOWED_FLASH_KEYS = %i[success info warning danger].freeze
|
24
20
|
|
25
21
|
# Matches the Rails flash hash assignment
|
@@ -74,7 +70,10 @@ module GLRubocop
|
|
74
70
|
return false unless key
|
75
71
|
return false if ALLOWED_FLASH_KEYS.include?(key)
|
76
72
|
|
77
|
-
add_offense(
|
73
|
+
add_offense(
|
74
|
+
node,
|
75
|
+
message: "'#{key}' is not one of the permitted flash keys: #{ALLOWED_FLASH_KEYS}"
|
76
|
+
)
|
78
77
|
end
|
79
78
|
end
|
80
79
|
end
|
data/lib/gl_rubocop/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gl_rubocop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Give Lively
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-08-
|
11
|
+
date: 2025-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|