rubocop-bridgetown 0.5.0 → 0.6.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c0dbd4664a138c208d2bea8b33a5f3f2362009540f79301b0fc63784d45d5d9
|
4
|
+
data.tar.gz: f754139df4508d58f73035e8a11b65525e93493241ddccce14e062ee4d7c6788
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52ea29e95791bdb813778412d1cf29db42bf311d6005bd9c3095e7b4e76c6645b25acb78666320f24ee4584409db10ca4addc23c46cd45ff1827e5c8edd59faa
|
7
|
+
data.tar.gz: 4a9666b7846f7786b16877fb1cae131fc2797a3cdc77148b52df443b65f9891fe443c448063e965d0d243948cf2ebbe09b753907ac3d81d572fc91a4f40d64be
|
data/.rubocop.yml
CHANGED
@@ -3,13 +3,13 @@
|
|
3
3
|
module RuboCop
|
4
4
|
module Cop
|
5
5
|
module Bridgetown
|
6
|
-
class NoPAllowed <
|
6
|
+
class NoPAllowed < Base
|
7
7
|
MSG = "Avoid using `p` to print things. Use `Bridgetown.logger` instead."
|
8
8
|
|
9
9
|
def_node_search :p_called?, "(send _ :p _)"
|
10
10
|
|
11
11
|
def on_send(node)
|
12
|
-
add_offense(node
|
12
|
+
add_offense(node) if p_called?(node)
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -3,13 +3,13 @@
|
|
3
3
|
module RuboCop
|
4
4
|
module Cop
|
5
5
|
module Bridgetown
|
6
|
-
class NoPutsAllowed <
|
6
|
+
class NoPutsAllowed < Base
|
7
7
|
MSG = "Avoid using `puts` to print things. Use `Bridgetown.logger` instead."
|
8
8
|
|
9
9
|
def_node_search :puts_called?, "(send nil? :puts _)"
|
10
10
|
|
11
11
|
def on_send(node)
|
12
|
-
add_offense(node
|
12
|
+
add_offense(node) if puts_called?(node)
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-bridgetown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bridgetown Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|