runger_style 5.6.0 → 5.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 +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +2 -2
- data/lib/runger_style/cops/capybara/click_ambiguously.rb +15 -0
- data/lib/runger_style/cops/default/require_all_custom_cops.rb +7 -0
- data/lib/runger_style/cops/default/require_all_monkeypatches.rb +5 -0
- data/lib/runger_style/version.rb +1 -1
- data/lib/runger_style.rb +1 -1
- data/rulesets/capybara.yml +9 -0
- data/rulesets/default.yml +1 -1
- metadata +11 -9
- data/lib/runger_style/cops/require_all_monkeypatches.rb +0 -5
- /data/lib/runger_style/cops/{require_all_custom_cops.rb → capybara/require_all_custom_cops.rb} +0 -0
- /data/lib/runger_style/cops/{argument_alignment.rb → default/argument_alignment.rb} +0 -0
- /data/lib/runger_style/cops/{first_argument_indentation.rb → default/first_argument_indentation.rb} +0 -0
- /data/lib/runger_style/{monkeypatches → cops/default/monkeypatches}/multiline_element_line_breaks.rb +0 -0
- /data/lib/runger_style/{monkeypatches → cops/default/monkeypatches}/multiline_expression_indentation.rb +0 -0
- /data/lib/runger_style/cops/{multiline_hash_value_indentation.rb → default/multiline_hash_value_indentation.rb} +0 -0
- /data/lib/runger_style/cops/{multiline_method_arguments_line_breaks.rb → default/multiline_method_arguments_line_breaks.rb} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5e730830fe1047b48c1b164d9fe75077212ddc755b69de830a055096e96edf0
|
4
|
+
data.tar.gz: 1135cdb63db280a9eb50ed20b0b81709331034c41d8bae7feebb3aed7a3d3589
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aad4fd7aae84f1a1d4b846e42643f10cad2c438061c6225a5bf81ac969cabe98d8273ca2f253d0a00c11214a743f8f130815794fa432e2fc00405ae10d7fa2f5
|
7
|
+
data.tar.gz: d948ea9b48164ab543367685949059ddb0a77e0c6fac373f35356508b8983bae785752cd99e125c6308f229a8234bf96d3f1158a516faabb74fcd205e0379f56
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## v5.7.0 (2025-03-10)
|
2
|
+
- Disable `Capybara/AmbiguousClick` and `Capybara/ClickLinkOrButtonStyle` and add `RungerStyle/ClickAmbiguously`, which does the opposite of `Capybara/AmbiguousClick`, i.e. it requires the use of `click_on` and forbids the use of `click_button` or `click_link`.
|
3
|
+
|
4
|
+
### Internal
|
5
|
+
- Move default custom cops and monkeypatches to `default/` subdirectory. This will make it possible to also add cops/monkeypatches for other plugins in other subdirectories (e.g. capybara) that we don't want to require/include in the default config.
|
6
|
+
|
1
7
|
## v5.6.0 (2025-03-10)
|
2
8
|
- Switch from `require` to `plugins` for `rubocop-rspec_rails` ruleset (`rulesets/rspec_rails.yml`).
|
3
9
|
- Switch from `require` to `plugins` for `rubocop-capybara` ruleset (`rulesets/capybara.yml`).
|
data/Gemfile.lock
CHANGED
@@ -9,7 +9,7 @@ GIT
|
|
9
9
|
PATH
|
10
10
|
remote: .
|
11
11
|
specs:
|
12
|
-
runger_style (5.
|
12
|
+
runger_style (5.7.0)
|
13
13
|
prism (>= 0.24.0)
|
14
14
|
rubocop (>= 1.72.0)
|
15
15
|
|
@@ -221,7 +221,7 @@ CHECKSUMS
|
|
221
221
|
ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
|
222
222
|
runger_byebug (11.4.0) sha256=569e22ba2215f57e7f69e145fcb63be401e29fcd312f7936d813e12d0c7bbee6
|
223
223
|
runger_release_assistant (2.0.0) sha256=f4f5708291eaeef1b881208f87a494877fe768739d6e96b7293fc335b28a3865
|
224
|
-
runger_style (5.
|
224
|
+
runger_style (5.7.0)
|
225
225
|
securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
|
226
226
|
slop (4.10.1) sha256=844322b5ffcf17ed4815fdb173b04a20dd82b4fd93e3744c88c8fafea696d9c7
|
227
227
|
stringio (3.1.5) sha256=bca92461515a131535743bc81d5559fa1de7d80cff9a654d6c0af6f9f27e35c8
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RungerStyle # rubocop:disable Style/ClassAndModuleChildren
|
4
|
+
class ClickAmbiguously < ::RuboCop::Cop::Base
|
5
|
+
extend ::RuboCop::Cop::AutoCorrector
|
6
|
+
MSG = 'Use `click_on` instead of `click_link` or `click_button`.'
|
7
|
+
RESTRICT_ON_SEND = %i[click_button click_link].freeze
|
8
|
+
|
9
|
+
def on_send(node)
|
10
|
+
add_offense(node) do |corrector|
|
11
|
+
corrector.replace(node.loc.selector, 'click_on')
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/runger_style/version.rb
CHANGED
data/lib/runger_style.rb
CHANGED
data/rulesets/capybara.yml
CHANGED
@@ -1,7 +1,16 @@
|
|
1
|
+
require:
|
2
|
+
- ../lib/runger_style/cops/capybara/require_all_custom_cops.rb
|
3
|
+
|
1
4
|
plugins:
|
2
5
|
- rubocop-capybara
|
3
6
|
|
7
|
+
Capybara/AmbiguousClick:
|
8
|
+
Enabled: false
|
9
|
+
Capybara/ClickLinkOrButtonStyle:
|
10
|
+
Enabled: false
|
4
11
|
Capybara/NegationMatcher:
|
5
12
|
EnforcedStyle: not_to
|
6
13
|
Capybara/SpecificMatcher:
|
7
14
|
Enabled: false
|
15
|
+
RungerStyle/ClickAmbiguously:
|
16
|
+
Enabled: true
|
data/rulesets/default.yml
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: runger_style
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Runger
|
@@ -66,14 +66,16 @@ files:
|
|
66
66
|
- bin/rspec
|
67
67
|
- bin/rubocop
|
68
68
|
- lib/runger_style.rb
|
69
|
-
- lib/runger_style/cops/
|
70
|
-
- lib/runger_style/cops/
|
71
|
-
- lib/runger_style/cops/
|
72
|
-
- lib/runger_style/cops/
|
73
|
-
- lib/runger_style/cops/
|
74
|
-
- lib/runger_style/cops/
|
75
|
-
- lib/runger_style/
|
76
|
-
- lib/runger_style/
|
69
|
+
- lib/runger_style/cops/capybara/click_ambiguously.rb
|
70
|
+
- lib/runger_style/cops/capybara/require_all_custom_cops.rb
|
71
|
+
- lib/runger_style/cops/default/argument_alignment.rb
|
72
|
+
- lib/runger_style/cops/default/first_argument_indentation.rb
|
73
|
+
- lib/runger_style/cops/default/monkeypatches/multiline_element_line_breaks.rb
|
74
|
+
- lib/runger_style/cops/default/monkeypatches/multiline_expression_indentation.rb
|
75
|
+
- lib/runger_style/cops/default/multiline_hash_value_indentation.rb
|
76
|
+
- lib/runger_style/cops/default/multiline_method_arguments_line_breaks.rb
|
77
|
+
- lib/runger_style/cops/default/require_all_custom_cops.rb
|
78
|
+
- lib/runger_style/cops/default/require_all_monkeypatches.rb
|
77
79
|
- lib/runger_style/version.rb
|
78
80
|
- rulesets/capybara.yml
|
79
81
|
- rulesets/default.yml
|
/data/lib/runger_style/cops/{require_all_custom_cops.rb → capybara/require_all_custom_cops.rb}
RENAMED
File without changes
|
File without changes
|
/data/lib/runger_style/cops/{first_argument_indentation.rb → default/first_argument_indentation.rb}
RENAMED
File without changes
|
/data/lib/runger_style/{monkeypatches → cops/default/monkeypatches}/multiline_element_line_breaks.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|