rubocop_challenger 2.3.0 → 2.6.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: bde919f42750c43651a3ba58f00ef400b79f7cea3f0c2ff1b64881f6ee102a8d
4
- data.tar.gz: ff457584a6703667d588d6f744762f1219f23a64eee85c0e09fdd471fef734ca
3
+ metadata.gz: f437746a124d1136ba8e063c238ce634a96a21204b55d43970cd0131aa7c698e
4
+ data.tar.gz: c69494134cb69557e40ab92af2dbbd5bc53c950f0c9d471995a4dab78a989843
5
5
  SHA512:
6
- metadata.gz: 82858f597d72c55790f1766d8bfb804afd74aac984579d83e05e4fc2c5db0c36a8b6259c614f4155b4e636963aeb19e0ce1c09ea7f709f594500838fec5615e2
7
- data.tar.gz: d36e502a7cc7aace9ed87440cc19b8f1b025141c8c769787f85fda86285b903793458cbf96cbe32580af57098f35e361adb4e253d8c7770c3709a536e8b10e92
6
+ metadata.gz: 91c99525eacb2713aa3f003ffc3afd9658c93d733a3ff36df24852a00f00e8fb27fb1431dfe78ef58d5ef98fdbf8ef1c981201134749e050a842d793217dceb6
7
+ data.tar.gz: 722cbfd0286ff9121615bdb3812e1667e09b1d8bafd316be1e387c56c61b26182e75b764c7754161fb3c0f0ff067e062fd67825697449f715d50f77c1e781ede
data/.circleci/config.yml CHANGED
@@ -12,7 +12,7 @@ references:
12
12
  - &ruby_version
13
13
  ruby_version:
14
14
  type: enum
15
- enum: ['2.5', '2.6', '2.7', '3.0', 'latest']
15
+ enum: ['2.6', '2.7', '3.0']
16
16
  default: '3.0'
17
17
 
18
18
  executors:
@@ -20,7 +20,7 @@ executors:
20
20
  parameters:
21
21
  <<: *ruby_version
22
22
  docker:
23
- - image: circleci/ruby:<< parameters.ruby_version >>
23
+ - image: cimg/ruby:<< parameters.ruby_version >>
24
24
  working_directory: ~/repo
25
25
 
26
26
  commands:
@@ -159,7 +159,7 @@ jobs:
159
159
  - code-climate/install
160
160
  - code-climate/sum-coverage:
161
161
  input: codeclimate.*.json
162
- parts: 5
162
+ parts: 3
163
163
  - code-climate/upload-coverage
164
164
  rubocop:
165
165
  executor: default
@@ -192,9 +192,6 @@ workflows:
192
192
 
193
193
  commit:
194
194
  jobs:
195
- - build:
196
- name: build_on_ruby_2.5
197
- ruby_version: '2.5'
198
195
  - build:
199
196
  name: build_on_ruby_2.6
200
197
  ruby_version: '2.6'
@@ -204,27 +201,20 @@ workflows:
204
201
  - build:
205
202
  name: build_on_ruby_3.0
206
203
  ruby_version: '3.0'
207
- - build:
208
- name: build_on_ruby_latest
209
- ruby_version: 'latest'
210
204
  - rubocop
211
205
  - yardoc
212
206
  - integration_testing
213
207
  - upload-coverage:
214
208
  requires:
215
- - build_on_ruby_2.5
216
209
  - build_on_ruby_2.6
217
210
  - build_on_ruby_2.7
218
211
  - build_on_ruby_3.0
219
- - build_on_ruby_latest
220
212
  - release:
221
213
  context: RubyGems API Key
222
214
  requires:
223
- - build_on_ruby_2.5
224
215
  - build_on_ruby_2.6
225
216
  - build_on_ruby_2.7
226
217
  - build_on_ruby_3.0
227
- - build_on_ruby_latest
228
218
  - rubocop
229
219
  filters:
230
220
  branches:
@@ -21,6 +21,7 @@ Add error message and backtrace if you can see.
21
21
  - rubocop-performance: [e.g. 1.2.3]
22
22
  - rubocop-rails: [e.g. 1.2.3]
23
23
  - rubocop-rspec: [e.g. 1.2.3]
24
+ - rubocop-thread_safety: [e.g. 1.2.3]
24
25
 
25
26
  **Additional context**
26
27
  Add any other context about the problem here.
@@ -0,0 +1,31 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ time: "08:00"
8
+ timezone: Japan
9
+ open-pull-requests-limit: 10
10
+ reviewers:
11
+ - ryz310
12
+ assignees:
13
+ - ryz310
14
+ labels:
15
+ - dependabot
16
+ ignore:
17
+ - dependency-name: simplecov
18
+ versions:
19
+ - ">= 0.19.a, < 0.20"
20
+ - dependency-name: rubocop
21
+ versions:
22
+ - 1.10.0
23
+ - 1.11.0
24
+ - 1.12.0
25
+ - 1.12.1
26
+ - dependency-name: rubocop-performance
27
+ versions:
28
+ - 1.10.0
29
+ - dependency-name: rubocop-rspec
30
+ versions:
31
+ - 2.2.0
data/.rubocop.yml CHANGED
@@ -2,11 +2,12 @@ require:
2
2
  - rubocop-performance
3
3
  - rubocop-rake
4
4
  - rubocop-rspec
5
+ - rubocop-thread_safety
5
6
 
6
7
  inherit_from: .rubocop_todo.yml
7
8
 
8
9
  AllCops:
9
- TargetRubyVersion: 2.5
10
+ TargetRubyVersion: 2.6
10
11
  NewCops: enable
11
12
 
12
13
  Metrics/BlockLength:
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config --exclude-limit 30 --no-auto-gen-timestamp`
3
- # using RuboCop version 1.10.0.
3
+ # using RuboCop version 1.26.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
data/CHANGELOG.md CHANGED
@@ -1,5 +1,62 @@
1
1
  # Change log
2
2
 
3
+ ## v2.6.0 (Mar 10, 2022)
4
+
5
+ ### Feature
6
+
7
+ * [#577](https://github.com/ryz310/rubocop_challenger/pull/577) Support new auto-correction comments at rubocop v1.26.0 ([@ryz310](https://github.com/ryz310))
8
+
9
+ ### Rubocop Challenge
10
+
11
+ * [#573](https://github.com/ryz310/rubocop_challenger/pull/573) RSpec/BeNil-20220228233046 ([@ryz310](https://github.com/ryz310))
12
+ * [#576](https://github.com/ryz310/rubocop_challenger/pull/576) Re-generate .rubocop_todo.yml with RuboCop v1.26.0 ([@ryz310](https://github.com/ryz310))
13
+
14
+ ### Dependabot
15
+
16
+ * [#571](https://github.com/ryz310/rubocop_challenger/pull/571) Bump rspec from 3.10.0 to 3.11.0 ([@ryz310](https://github.com/ryz310))
17
+ * [#574](https://github.com/ryz310/rubocop_challenger/pull/574) Bump rubocop-performance from 1.13.2 to 1.13.3 ([@ryz310](https://github.com/ryz310))
18
+ * [#575](https://github.com/ryz310/rubocop_challenger/pull/575) Bump activesupport from 6.1.4.6 to 6.1.4.7 ([@ryz310](https://github.com/ryz310))
19
+
20
+ ## v2.5.0 (Jan 18, 2022)
21
+
22
+ ### Feature
23
+
24
+ * [#566](https://github.com/ryz310/rubocop_challenger/pull/566) Support rubocop thread safety ([@ryz310](https://github.com/ryz310))
25
+
26
+ ### Rubocop Challenge
27
+
28
+ * [#554](https://github.com/ryz310/rubocop_challenger/pull/554) ryz310/rubocop-challenge/20211226233047 ([@ryz310](https://github.com/ryz310))
29
+ * [#555](https://github.com/ryz310/rubocop_challenger/pull/555) ryz310/rubocop-challenge/20211231233046 ([@ryz310](https://github.com/ryz310))
30
+
31
+ ### Dependabot
32
+
33
+ * [#556](https://github.com/ryz310/rubocop_challenger/pull/556) Bump rubocop-performance from 1.13.0 to 1.13.1 ([@ryz310](https://github.com/ryz310))
34
+ * [#561](https://github.com/ryz310/rubocop_challenger/pull/561) Bump rubocop-rails from 2.13.0 to 2.13.1 ([@ryz310](https://github.com/ryz310))
35
+ * [#560](https://github.com/ryz310/rubocop_challenger/pull/560) Bump rspec_junit_formatter from 0.4.1 to 0.5.1 ([@ryz310](https://github.com/ryz310))
36
+ * [#559](https://github.com/ryz310/rubocop_challenger/pull/559) ryz310/dependabot/bundler/thor-1.2.1 ([@ryz310](https://github.com/ryz310))
37
+ * [#562](https://github.com/ryz310/rubocop_challenger/pull/562) Bump rainbow from 3.0.0 to 3.1.1 ([@ryz310](https://github.com/ryz310))
38
+
39
+ ## v2.4.0 (Dec 26, 2021)
40
+
41
+ ### Feature
42
+
43
+ * [#550](https://github.com/ryz310/rubocop_challenger/pull/550) The end of ruby 2.5 support ([@ryz310](https://github.com/ryz310))
44
+
45
+ ### Rubocop Challenge
46
+
47
+ * [#544](https://github.com/ryz310/rubocop_challenger/pull/544) Gemspec/RequireMFA-20211115233051 ([@ryz310](https://github.com/ryz310))
48
+
49
+ ### Dependabot
50
+
51
+ * [#479](https://github.com/ryz310/rubocop_challenger/pull/479) ryz310/dependabot/bundler/rubocop-1.13.0 ([@ryz310](https://github.com/ryz310))
52
+ * [#482](https://github.com/ryz310/rubocop_challenger/pull/482) ryz310/dependabot/bundler/rubocop-rspec-2.3.0 ([@ryz310](https://github.com/ryz310))
53
+ * [#483](https://github.com/ryz310/rubocop_challenger/pull/483) ryz310/dependabot/add-v2-config-file ([@ryz310](https://github.com/ryz310))
54
+ * [#518](https://github.com/ryz310/rubocop_challenger/pull/518) Bump rake from 13.0.4 to 13.0.6 ([@ryz310](https://github.com/ryz310))
55
+ * [#537](https://github.com/ryz310/rubocop_challenger/pull/537) ryz310/dependabot/bundler/rubocop-rails-2.12.4 ([@ryz310](https://github.com/ryz310))
56
+ * [#542](https://github.com/ryz310/rubocop_challenger/pull/542) Bump addressable from 2.7.0 to 2.8.0 ([@ryz310](https://github.com/ryz310))
57
+ * [#543](https://github.com/ryz310/rubocop_challenger/pull/543) Bump rubocop-performance from 1.11.5 to 1.12.0 ([@ryz310](https://github.com/ryz310))
58
+ * [#546](https://github.com/ryz310/rubocop_challenger/pull/546) Bump yard from 0.9.26 to 0.9.27 ([@ryz310](https://github.com/ryz310))
59
+
3
60
  ## v2.3.0 (Feb 23, 2021)
4
61
 
5
62
  ### Feature
data/Gemfile CHANGED
@@ -4,5 +4,7 @@ source 'https://rubygems.org'
4
4
 
5
5
  git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
6
 
7
+ gem 'activesupport', '~> 6.1' # TODO: Remove this line at the end of Ruby 2.6 support
8
+
7
9
  # Specify your gem's dependencies in rubocop_challenger.gemspec
8
10
  gemspec
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop_challenger (2.3.0)
4
+ rubocop_challenger (2.6.0)
5
5
  pr_comet (~> 0.5.1)
6
6
  rainbow
7
7
  rubocop (>= 0.87)
@@ -9,41 +9,60 @@ PATH
9
9
  rubocop-rails
10
10
  rubocop-rake
11
11
  rubocop-rspec
12
+ rubocop-thread_safety
12
13
  thor
13
14
  yard
14
15
 
15
16
  GEM
16
17
  remote: https://rubygems.org/
17
18
  specs:
18
- activesupport (6.1.3)
19
+ activesupport (6.1.4.7)
19
20
  concurrent-ruby (~> 1.0, >= 1.0.2)
20
21
  i18n (>= 1.6, < 2)
21
22
  minitest (>= 5.1)
22
23
  tzinfo (~> 2.0)
23
24
  zeitwerk (~> 2.3)
24
- addressable (2.7.0)
25
+ addressable (2.8.0)
25
26
  public_suffix (>= 2.0.2, < 5.0)
26
27
  ast (2.4.2)
27
28
  byebug (11.1.3)
28
29
  coderay (1.1.3)
29
- concurrent-ruby (1.1.8)
30
- diff-lcs (1.4.4)
31
- docile (1.3.5)
32
- faraday (1.3.0)
30
+ concurrent-ruby (1.1.9)
31
+ diff-lcs (1.5.0)
32
+ docile (1.4.0)
33
+ faraday (1.10.0)
34
+ faraday-em_http (~> 1.0)
35
+ faraday-em_synchrony (~> 1.0)
36
+ faraday-excon (~> 1.1)
37
+ faraday-httpclient (~> 1.0)
38
+ faraday-multipart (~> 1.0)
33
39
  faraday-net_http (~> 1.0)
40
+ faraday-net_http_persistent (~> 1.0)
41
+ faraday-patron (~> 1.0)
42
+ faraday-rack (~> 1.0)
43
+ faraday-retry (~> 1.0)
44
+ ruby2_keywords (>= 0.0.4)
45
+ faraday-em_http (1.0.0)
46
+ faraday-em_synchrony (1.0.0)
47
+ faraday-excon (1.1.0)
48
+ faraday-httpclient (1.0.1)
49
+ faraday-multipart (1.0.3)
34
50
  multipart-post (>= 1.2, < 3)
35
- ruby2_keywords
36
51
  faraday-net_http (1.0.1)
37
- i18n (1.8.9)
52
+ faraday-net_http_persistent (1.2.0)
53
+ faraday-patron (1.0.0)
54
+ faraday-rack (1.0.0)
55
+ faraday-retry (1.0.3)
56
+ i18n (1.10.0)
38
57
  concurrent-ruby (~> 1.0)
39
58
  method_source (1.0.0)
40
- minitest (5.14.3)
59
+ minitest (5.15.0)
41
60
  multipart-post (2.1.1)
42
- octokit (4.20.0)
61
+ octokit (4.22.0)
43
62
  faraday (>= 0.9)
44
63
  sawyer (~> 0.8.0, >= 0.5.3)
45
- parallel (1.20.1)
46
- parser (3.0.0.0)
64
+ parallel (1.21.0)
65
+ parser (3.1.1.0)
47
66
  ast (~> 2.4.1)
48
67
  pr_comet (0.5.1)
49
68
  octokit
@@ -56,50 +75,51 @@ GEM
56
75
  pry (~> 0.13.0)
57
76
  public_suffix (4.0.6)
58
77
  rack (2.2.3)
59
- rainbow (3.0.0)
60
- rake (13.0.3)
61
- regexp_parser (2.1.0)
62
- rexml (3.2.4)
63
- rspec (3.10.0)
64
- rspec-core (~> 3.10.0)
65
- rspec-expectations (~> 3.10.0)
66
- rspec-mocks (~> 3.10.0)
67
- rspec-core (3.10.1)
68
- rspec-support (~> 3.10.0)
69
- rspec-expectations (3.10.1)
78
+ rainbow (3.1.1)
79
+ rake (13.0.6)
80
+ regexp_parser (2.2.1)
81
+ rexml (3.2.5)
82
+ rspec (3.11.0)
83
+ rspec-core (~> 3.11.0)
84
+ rspec-expectations (~> 3.11.0)
85
+ rspec-mocks (~> 3.11.0)
86
+ rspec-core (3.11.0)
87
+ rspec-support (~> 3.11.0)
88
+ rspec-expectations (3.11.0)
70
89
  diff-lcs (>= 1.2.0, < 2.0)
71
- rspec-support (~> 3.10.0)
72
- rspec-mocks (3.10.2)
90
+ rspec-support (~> 3.11.0)
91
+ rspec-mocks (3.11.0)
73
92
  diff-lcs (>= 1.2.0, < 2.0)
74
- rspec-support (~> 3.10.0)
75
- rspec-support (3.10.2)
76
- rspec_junit_formatter (0.4.1)
93
+ rspec-support (~> 3.11.0)
94
+ rspec-support (3.11.0)
95
+ rspec_junit_formatter (0.5.1)
77
96
  rspec-core (>= 2, < 4, != 2.12.0)
78
- rubocop (1.10.0)
97
+ rubocop (1.26.0)
79
98
  parallel (~> 1.10)
80
- parser (>= 3.0.0.0)
99
+ parser (>= 3.1.0.0)
81
100
  rainbow (>= 2.2.2, < 4.0)
82
101
  regexp_parser (>= 1.8, < 3.0)
83
102
  rexml
84
- rubocop-ast (>= 1.2.0, < 2.0)
103
+ rubocop-ast (>= 1.16.0, < 2.0)
85
104
  ruby-progressbar (~> 1.7)
86
105
  unicode-display_width (>= 1.4.0, < 3.0)
87
- rubocop-ast (1.4.1)
88
- parser (>= 2.7.1.5)
89
- rubocop-performance (1.9.2)
90
- rubocop (>= 0.90.0, < 2.0)
106
+ rubocop-ast (1.16.0)
107
+ parser (>= 3.1.1.0)
108
+ rubocop-performance (1.13.3)
109
+ rubocop (>= 1.7.0, < 2.0)
91
110
  rubocop-ast (>= 0.4.0)
92
- rubocop-rails (2.9.1)
111
+ rubocop-rails (2.13.2)
93
112
  activesupport (>= 4.2.0)
94
113
  rack (>= 1.1)
95
- rubocop (>= 0.90.0, < 2.0)
96
- rubocop-rake (0.5.1)
97
- rubocop
98
- rubocop-rspec (2.2.0)
114
+ rubocop (>= 1.7.0, < 2.0)
115
+ rubocop-rake (0.6.0)
99
116
  rubocop (~> 1.0)
100
- rubocop-ast (>= 1.1.0)
117
+ rubocop-rspec (2.9.0)
118
+ rubocop (~> 1.19)
119
+ rubocop-thread_safety (0.4.4)
120
+ rubocop (>= 0.53.0)
101
121
  ruby-progressbar (1.11.0)
102
- ruby2_keywords (0.0.4)
122
+ ruby2_keywords (0.0.5)
103
123
  sawyer (0.8.2)
104
124
  addressable (>= 2.3.5)
105
125
  faraday (> 0.8, < 2.0)
@@ -108,18 +128,21 @@ GEM
108
128
  simplecov-html (~> 0.11)
109
129
  simplecov_json_formatter (~> 0.1)
110
130
  simplecov-html (0.12.3)
111
- simplecov_json_formatter (0.1.2)
112
- thor (1.1.0)
131
+ simplecov_json_formatter (0.1.4)
132
+ thor (1.2.1)
113
133
  tzinfo (2.0.4)
114
134
  concurrent-ruby (~> 1.0)
115
- unicode-display_width (2.0.0)
116
- yard (0.9.26)
117
- zeitwerk (2.4.2)
135
+ unicode-display_width (2.1.0)
136
+ webrick (1.7.0)
137
+ yard (0.9.27)
138
+ webrick (~> 1.7.0)
139
+ zeitwerk (2.5.4)
118
140
 
119
141
  PLATFORMS
120
142
  ruby
121
143
 
122
144
  DEPENDENCIES
145
+ activesupport (~> 6.1)
123
146
  bundler (>= 2.0)
124
147
  pry-byebug
125
148
  rake (~> 13.0)
@@ -129,4 +152,4 @@ DEPENDENCIES
129
152
  simplecov (= 0.21.2)
130
153
 
131
154
  BUNDLED WITH
132
- 2.2.3
155
+ 2.2.32
data/README.md CHANGED
@@ -25,27 +25,7 @@ be continued to evolve.
25
25
 
26
26
  ## Usage
27
27
 
28
- ### 1. Edit your Gemfile
29
-
30
- If you do not specify the version of `rubocop` gem so you do not have to add `rubocop_challenger` gem in your Gemfile (**Recommended**).
31
-
32
- If you specify the version so put this line in your Gemfile.
33
-
34
- ```rb
35
- gem 'rubocop_challenger', group: :development, require: false
36
- ```
37
-
38
- ### 2. Setting GitHub personal access token
39
-
40
- GitHub personal access token is required for sending pull requests to your repository.
41
-
42
- 1. Go to [your account's settings page](https://github.com/settings/tokens) and [generate a new token](https://github.com/settings/tokens/new) with "repo" scope
43
- ![generate token](images/generate_token.png)
44
- 1. On [CircleCI](https://circleci.com) dashboard, go to your application's "Project Settings" -> "Environment Variables"
45
- 1. Add an environment variable `GITHUB_ACCESS_TOKEN` with your GitHub personal access token
46
- ![circleci environment variables](images/circleci_environment_variables.png)
47
-
48
- ### 3. Configure .circleci/config.yml
28
+ ### 1. Configure .circleci/config.yml
49
29
 
50
30
  Configure your `.circleci/config.yml` to run rubocop_challenger, for example:
51
31
 
@@ -83,6 +63,25 @@ workflows:
83
63
  - rubocop_challenge
84
64
  ```
85
65
 
66
+ **Should not append `gem 'rubocop_challenger'` on your Gemfile.**
67
+ I have seen cases where errors occur due to compatibility issues with other gems.
68
+
69
+ ### 2. Setting GitHub personal access token
70
+
71
+ GitHub personal access token is required for sending pull requests to your repository.
72
+
73
+ 1. Go to [your account's settings page](https://github.com/settings/tokens) and [generate a new token](https://github.com/settings/tokens/new) with "repo" scope
74
+ ![generate token](images/generate_token.png)
75
+ 1. On [CircleCI](https://circleci.com) dashboard, go to your application's "Project Settings" -> "Environment Variables"
76
+ 1. Add an environment variable `GITHUB_ACCESS_TOKEN` with your GitHub personal access token
77
+ ![circleci environment variables](images/circleci_environment_variables.png)
78
+
79
+ ### Want to use on GitHub Actions?
80
+
81
+ It's introduced in the following blog. Thank you Mr. Takuya Yamaguchi!
82
+
83
+ See: [RuboCop ChallengerをGitHub Actionsで動かす](https://zenn.dev/yamat47/articles/219e14ebcf31a1d13ff4)
84
+
86
85
  ## CLI command references
87
86
 
88
87
  ```sh
@@ -128,7 +127,7 @@ Run `$ rubocop --auto-correct` and create a PR to GitHub repo
128
127
 
129
128
  ## Requirement
130
129
 
131
- * Ruby 2.5 or higher
130
+ * Ruby 2.6 or higher
132
131
 
133
132
  ## Development
134
133
 
data/challenger.gemspec CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
23
  spec.require_paths = ['lib']
24
24
 
25
- spec.required_ruby_version = '>= 2.5'
25
+ spec.required_ruby_version = '>= 2.6'
26
26
 
27
27
  spec.add_runtime_dependency 'pr_comet', '~> 0.5.1'
28
28
  spec.add_runtime_dependency 'rainbow'
@@ -31,6 +31,7 @@ Gem::Specification.new do |spec|
31
31
  spec.add_runtime_dependency 'rubocop-rails'
32
32
  spec.add_runtime_dependency 'rubocop-rake'
33
33
  spec.add_runtime_dependency 'rubocop-rspec'
34
+ spec.add_runtime_dependency 'rubocop-thread_safety'
34
35
  spec.add_runtime_dependency 'thor'
35
36
  spec.add_runtime_dependency 'yard'
36
37
 
@@ -40,4 +41,7 @@ Gem::Specification.new do |spec|
40
41
  spec.add_development_dependency 'rspec'
41
42
  spec.add_development_dependency 'rspec_junit_formatter'
42
43
  spec.add_development_dependency 'simplecov', '0.21.2'
44
+ spec.metadata = {
45
+ 'rubygems_mfa_required' => 'true'
46
+ }
43
47
  end
@@ -14,13 +14,13 @@ module RubocopChallenger
14
14
 
15
15
  def generate
16
16
  <<~TEMPLATE
17
- #{ERB.new(template, nil, '-').result(binding)}
17
+ #{ERB.new(template, trim_mode: '-').result(binding)}
18
18
  #{FOOTER_TEXT}
19
19
  TEMPLATE
20
20
  rescue StandardError => e
21
21
  error_template = File.read(error_template_path)
22
22
  <<~TEMPLATE
23
- #{ERB.new(error_template, nil, '-').result(binding)}
23
+ #{ERB.new(error_template, trim_mode: '-').result(binding)}
24
24
  #{FOOTER_TEXT}
25
25
  TEMPLATE
26
26
  end
@@ -27,7 +27,8 @@ module RubocopChallenger
27
27
  end
28
28
 
29
29
  def auto_correctable?
30
- contents.include?('# Cop supports --auto-correct')
30
+ contents.include?('# Cop supports --auto-correct') || # for rubocop < v1.26.0
31
+ contents.match?(/# This cop supports (un)?safe auto-correction/) # for rubocop >= v1.26.0
31
32
  end
32
33
 
33
34
  def rubydoc_url
@@ -71,7 +71,7 @@ module RubocopChallenger
71
71
  else
72
72
  instance_methods
73
73
  .map { |m| cop_class.instance_method(m).source_location }
74
- .reject(&:nil?)
74
+ .compact
75
75
  .map(&:first)
76
76
  .first
77
77
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubocopChallenger
4
- VERSION = '2.3.0'
4
+ VERSION = '2.6.0'
5
5
  end
@@ -26,5 +26,6 @@ module RubocopChallenger
26
26
  rubocop-rails
27
27
  rubocop-rake
28
28
  rubocop-rspec
29
+ rubocop-thread_safety
29
30
  ].freeze
30
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop_challenger
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ryosuke_sato
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-02-23 00:00:00.000000000 Z
11
+ date: 2022-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pr_comet
@@ -108,6 +108,20 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rubocop-thread_safety
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: thor
113
127
  requirement: !ruby/object:Gem::Requirement
@@ -229,10 +243,10 @@ extensions: []
229
243
  extra_rdoc_files: []
230
244
  files:
231
245
  - ".circleci/config.yml"
232
- - ".dependabot/config.yml"
233
246
  - ".envrc.skeleton"
234
247
  - ".gem_comet.yml"
235
248
  - ".github/ISSUE_TEMPLATE/bug_report.md"
249
+ - ".github/dependabot.yml"
236
250
  - ".gitignore"
237
251
  - ".rspec"
238
252
  - ".rubocop.yml"
@@ -276,7 +290,8 @@ files:
276
290
  homepage: https://github.com/ryz310/rubocop_challenger
277
291
  licenses:
278
292
  - MIT
279
- metadata: {}
293
+ metadata:
294
+ rubygems_mfa_required: 'true'
280
295
  post_install_message:
281
296
  rdoc_options: []
282
297
  require_paths:
@@ -285,14 +300,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
285
300
  requirements:
286
301
  - - ">="
287
302
  - !ruby/object:Gem::Version
288
- version: '2.5'
303
+ version: '2.6'
289
304
  required_rubygems_version: !ruby/object:Gem::Requirement
290
305
  requirements:
291
306
  - - ">="
292
307
  - !ruby/object:Gem::Version
293
308
  version: '0'
294
309
  requirements: []
295
- rubygems_version: 3.2.3
310
+ rubygems_version: 3.2.32
296
311
  signing_key:
297
312
  specification_version: 4
298
313
  summary: Make a clean your rubocop_todo.yml with CI
@@ -1,18 +0,0 @@
1
- version: 1
2
- update_configs:
3
- - package_manager: "ruby:bundler"
4
- directory: "/"
5
- update_schedule: "live"
6
- default_reviewers:
7
- - "ryz310"
8
- default_assignees:
9
- - "ryz310"
10
- default_labels:
11
- - "dependabot"
12
- automerged_updates:
13
- - match:
14
- dependency_type: "development"
15
- update_type: "all"
16
- - match:
17
- dependency_type: "production"
18
- update_type: "semver:patch"