runger_style 5.5.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/.github/workflows/ruby.yml +7 -1
- data/CHANGELOG.md +10 -0
- data/Gemfile.lock +11 -9
- 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
- data/rulesets/rspec_rails.yml +1 -1
- metadata +12 -10
- 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/.github/workflows/ruby.yml
CHANGED
@@ -22,7 +22,13 @@ jobs:
|
|
22
22
|
gem install bundler -v 2.1.4
|
23
23
|
bundle install --jobs 4 --retry 3
|
24
24
|
- name: Run RuboCop
|
25
|
-
run: bin/rubocop --format clang
|
25
|
+
run: bin/rubocop --format clang --color 2> >(tee /tmp/rubocop_stderr >&2)
|
26
|
+
- name: Check that RuboCop didn't write anything to stderr
|
27
|
+
run: |
|
28
|
+
if [[ -s /tmp/rubocop_stderr ]] ; then
|
29
|
+
echo "Error: stderr was not empty" >&2
|
30
|
+
exit 1
|
31
|
+
fi
|
26
32
|
- name: Run RSpec tests
|
27
33
|
run: bin/rspec --format progress
|
28
34
|
- name: Ensure alpha version
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
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
|
+
|
7
|
+
## v5.6.0 (2025-03-10)
|
8
|
+
- Switch from `require` to `plugins` for `rubocop-rspec_rails` ruleset (`rulesets/rspec_rails.yml`).
|
9
|
+
- Switch from `require` to `plugins` for `rubocop-capybara` ruleset (`rulesets/capybara.yml`).
|
10
|
+
|
1
11
|
## v5.5.0 (2025-03-06)
|
2
12
|
- Switch from `require` to `plugins` for `rubocop-factory_bot` ruleset (`rulesets/factory_bot.yml`).
|
3
13
|
|
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
|
|
@@ -102,8 +102,9 @@ GEM
|
|
102
102
|
unicode-display_width (>= 2.4.0, < 4.0)
|
103
103
|
rubocop-ast (1.38.1)
|
104
104
|
parser (>= 3.3.1.0)
|
105
|
-
rubocop-capybara (2.
|
106
|
-
|
105
|
+
rubocop-capybara (2.22.0)
|
106
|
+
lint_roller (~> 1.1)
|
107
|
+
rubocop (~> 1.72, >= 1.72.1)
|
107
108
|
rubocop-factory_bot (2.27.0)
|
108
109
|
lint_roller (~> 1.1)
|
109
110
|
rubocop (~> 1.72, >= 1.72.1)
|
@@ -123,9 +124,10 @@ GEM
|
|
123
124
|
rubocop-rspec (3.5.0)
|
124
125
|
lint_roller (~> 1.1)
|
125
126
|
rubocop (~> 1.72, >= 1.72.1)
|
126
|
-
rubocop-rspec_rails (2.
|
127
|
-
|
128
|
-
rubocop
|
127
|
+
rubocop-rspec_rails (2.31.0)
|
128
|
+
lint_roller (~> 1.1)
|
129
|
+
rubocop (~> 1.72, >= 1.72.1)
|
130
|
+
rubocop-rspec (~> 3.5)
|
129
131
|
ruby-progressbar (1.13.0)
|
130
132
|
runger_byebug (11.4.0)
|
131
133
|
irb
|
@@ -209,17 +211,17 @@ CHECKSUMS
|
|
209
211
|
rspec-support (3.13.2) sha256=cea3a2463fd9b84b9dcc9685efd80ea701aa8f7b3decb3b3ce795ed67737dbec
|
210
212
|
rubocop (1.73.2) sha256=35cd1b1365ba97234323fe771abcecd09c9b77098464cd726c76aa7d9bc12b5d
|
211
213
|
rubocop-ast (1.38.1) sha256=80ecbe2ac9bb26693cab9405bf72b41b85a1f909f20f021b983c32c2e7d857fe
|
212
|
-
rubocop-capybara (2.
|
214
|
+
rubocop-capybara (2.22.0) sha256=9c3a6704ed0243e5332fdc45112b4bb90fc4cfd23a7f175f74af4a01e21627d0
|
213
215
|
rubocop-factory_bot (2.27.0) sha256=de9918bc4e1406b3025da87c5c34c91dd6c3e802cd59339790631f963a5652ba
|
214
216
|
rubocop-performance (1.24.0) sha256=e5bd39ff3e368395b9af886927cc37f5892f43db4bd6c8526594352d5b4440b5
|
215
217
|
rubocop-rails (2.30.3) sha256=fc5a6506daa916d15e282cc806943afa64a020bf592b93a94025d89a2a78a715
|
216
218
|
rubocop-rake (0.7.1) sha256=3797f2b6810c3e9df7376c26d5f44f3475eda59eb1adc38e6f62ecf027cbae4d
|
217
219
|
rubocop-rspec (3.5.0) sha256=710c942fe1af884ba8eea75cbb8bdbb051929a2208880a6fc2e2dce1eed5304c
|
218
|
-
rubocop-rspec_rails (2.
|
220
|
+
rubocop-rspec_rails (2.31.0) sha256=775375e18a26a1184a812ef3054b79d218e85601b9ae897f38f8be24dddf1f45
|
219
221
|
ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
|
220
222
|
runger_byebug (11.4.0) sha256=569e22ba2215f57e7f69e145fcb63be401e29fcd312f7936d813e12d0c7bbee6
|
221
223
|
runger_release_assistant (2.0.0) sha256=f4f5708291eaeef1b881208f87a494877fe768739d6e96b7293fc335b28a3865
|
222
|
-
runger_style (5.
|
224
|
+
runger_style (5.7.0)
|
223
225
|
securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
|
224
226
|
slop (4.10.1) sha256=844322b5ffcf17ed4815fdb173b04a20dd82b4fd93e3744c88c8fafea696d9c7
|
225
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
1
|
require:
|
2
|
+
- ../lib/runger_style/cops/capybara/require_all_custom_cops.rb
|
3
|
+
|
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
data/rulesets/rspec_rails.yml
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
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
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-03-
|
10
|
+
date: 2025-03-10 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: prism
|
@@ -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
|