rubocop-bridgetown 0.6.0 → 0.7.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: 77d5770855e6106a4b722873f8e11e505997617642aa247f5e3629a9e55a66a5
4
- data.tar.gz: 006da9d177a2812008ddaf7f50cd39beb42d21b301f98e9da11452e1bd575685
3
+ metadata.gz: fbb4194baf6b80d9fc1ae0dd1724dbe708962b474d859d8ff2e057522e6d6e0e
4
+ data.tar.gz: 9d15a5806a283a0f6cc7eb50081d2cb6f8d9ff06a69af00a2262037c742a70bf
5
5
  SHA512:
6
- metadata.gz: 9e9ce63f05136e486de72593361f48479e450ea3894608e2104b2f98d1092ee7c0927a8512034010d8f720ea07c735e0ada0eea7021767a6b254277144ac0656
7
- data.tar.gz: 690b96fa2e93606e1c9b3ea9a7a2d0d17e79046782397f5947595909df80e6d3a5e447659a3dd2464a9a67cd14e0a196ee0a44b82a89bada119f984ae87317fa
6
+ metadata.gz: fc99fc2edee3d56748fa5a168c1e0cdfcba895563e2f652644ef2460a5118fdb4a6d550bdb4f977e56e65f8a6002aa940e3a5a23dd249f3c5d9ef52c782ed0b1
7
+ data.tar.gz: 6744e787fcc118f0100dbebb2196eaf39c267218d89200c18b589e87afad5ae3a6a9929c4de682e280a5516dd81e02d722c4296eb0c220ae7cb4ccd83d893a86
data/.rubocop.yml CHANGED
@@ -1,4 +1,4 @@
1
- require:
1
+ plugins:
2
2
  - rubocop-performance
3
3
 
4
4
  AllCops:
data/README.md CHANGED
@@ -74,7 +74,7 @@ You can override any settings inherited from the extension by configuring cops i
74
74
 
75
75
  Besides cops which are provided directly by RuboCop and `rubocop-performance`, there are a few additional cops provided by this plugin:
76
76
 
77
- * `Bridgetown/InsecureHeredoc`: this will monitor any heredocs in your code starting with `HTML` or `MARKDOWN` for potential XSS issues inside of any string interpolations. To avoid linting errors, you will need to wrap any interpolated code in the string with one of the following method names: `html`, `html_map`, `html_attributes`, `text`, or `render`. These methods are provided by the [Streamlined](https://github.com/bridgetownrb/streamlined) gem, bundled in Bridgetown 2.0 by default (but you can use them in any Ruby application including Rails).
77
+ * `Bridgetown/InsecureHeredoc`: this will monitor any heredocs in your code starting with `HTML` or `MARKDOWN` for potential XSS issues inside of any string interpolations. To avoid linting errors, you will need to wrap any interpolated code in the string with one of the following method names: `html`, `html_map`, `html_attributes`, `text`, or `render`. These methods are provided by the [Streamlined](https://codeberg.org/jaredwhite/streamlined) gem, bundled in Bridgetown 2.0 by default (but you can use them in any Ruby application).
78
78
  * `Bridgetown/NoPAllowed`: this encourages using your framework's logger rather than `p` to output debugging information.
79
79
  * `Bridgetown/NoPutsAllowed`: this encourages using your framework's logger rather than `puts` to output debugging information.
80
80
 
@@ -12,7 +12,7 @@ module RuboCop
12
12
  def on_heredoc(node)
13
13
  return unless node.source.match?(%r!(HTML|MARKDOWN)$!) &&
14
14
  heredoc_body(node).match?(
15
- %r%[^\\]#\{(?!\s*?(html|html_map|html_attributes|text|render)[ \-\(])%
15
+ %r%[^\\]#\{(?!\s*?(html|html_map|html_attributes|text|render)[ \-\(])% # rubocop:todo Style/RedundantRegexpEscape
16
16
  )
17
17
 
18
18
  add_offense(node, message: MSG)
@@ -9,7 +9,7 @@ module RuboCop
9
9
  def_node_search :p_called?, "(send _ :p _)"
10
10
 
11
11
  def on_send(node)
12
- add_offense(node, location: :selector) if p_called?(node)
12
+ add_offense(node) if p_called?(node)
13
13
  end
14
14
  end
15
15
  end
@@ -9,7 +9,7 @@ module RuboCop
9
9
  def_node_search :puts_called?, "(send nil? :puts _)"
10
10
 
11
11
  def on_send(node)
12
- add_offense(node, location: :selector) if puts_called?(node)
12
+ add_offense(node) if puts_called?(node)
13
13
  end
14
14
  end
15
15
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-bridgetown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-11-03 00:00:00.000000000 Z
10
+ date: 2025-10-07 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rubocop
@@ -16,28 +15,28 @@ dependencies:
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
- version: '1.23'
18
+ version: '1.72'
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - "~>"
25
24
  - !ruby/object:Gem::Version
26
- version: '1.23'
25
+ version: '1.72'
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: rubocop-performance
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - "~>"
32
31
  - !ruby/object:Gem::Version
33
- version: '1.12'
32
+ version: '1.24'
34
33
  type: :runtime
35
34
  prerelease: false
36
35
  version_requirements: !ruby/object:Gem::Requirement
37
36
  requirements:
38
37
  - - "~>"
39
38
  - !ruby/object:Gem::Version
40
- version: '1.12'
39
+ version: '1.24'
41
40
  description: A RuboCop extension to enforce common code style in Bridgetown and beyond
42
41
  email:
43
42
  - maintainers@bridgetownrb.com
@@ -52,12 +51,11 @@ files:
52
51
  - lib/rubocop/cop/bridgetown/insecure_heredoc.rb
53
52
  - lib/rubocop/cop/bridgetown/no_p_allowed.rb
54
53
  - lib/rubocop/cop/bridgetown/no_puts_allowed.rb
55
- homepage: https://github.com/bridgetownrb/rubocop-bridgetown
54
+ homepage: https://codeberg.org/bridgetownrb/rubocop-bridgetown
56
55
  licenses:
57
56
  - MIT
58
57
  metadata:
59
58
  rubygems_mfa_required: 'true'
60
- post_install_message:
61
59
  rdoc_options: []
62
60
  require_paths:
63
61
  - lib
@@ -72,8 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
70
  - !ruby/object:Gem::Version
73
71
  version: '0'
74
72
  requirements: []
75
- rubygems_version: 3.5.3
76
- signing_key:
73
+ rubygems_version: 3.6.2
77
74
  specification_version: 4
78
75
  summary: Code style check for Bridgetown projects
79
76
  test_files: []