rubocop_challenger 2.3.0 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bde919f42750c43651a3ba58f00ef400b79f7cea3f0c2ff1b64881f6ee102a8d
4
- data.tar.gz: ff457584a6703667d588d6f744762f1219f23a64eee85c0e09fdd471fef734ca
3
+ metadata.gz: 3b24f35e2c475248e1e943b97cd33e10f21288d7b4bc23eda0a36183b61bc810
4
+ data.tar.gz: a61b3f9ca356153987f24d40a9e62204fcdef7301c95b28cb55d5954798df668
5
5
  SHA512:
6
- metadata.gz: 82858f597d72c55790f1766d8bfb804afd74aac984579d83e05e4fc2c5db0c36a8b6259c614f4155b4e636963aeb19e0ce1c09ea7f709f594500838fec5615e2
7
- data.tar.gz: d36e502a7cc7aace9ed87440cc19b8f1b025141c8c769787f85fda86285b903793458cbf96cbe32580af57098f35e361adb4e253d8c7770c3709a536e8b10e92
6
+ metadata.gz: c174dde8680eb1001a08d3694a8a938100ae699e1c66d2ce4d94380dbc7b235f68dbedbd5a507c35a8e51af675f1132c943b538941917415fec27bdc8ee8bc60
7
+ data.tar.gz: af642d8970d3c720953991c25dd83bd575f2423919330087001ec841438003c9972a2301f51ddcc48a33cf86bcf98349d1b0ae772e4ade3dfa7059baa548b03f
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:
@@ -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
@@ -6,7 +6,7 @@ require:
6
6
  inherit_from: .rubocop_todo.yml
7
7
 
8
8
  AllCops:
9
- TargetRubyVersion: 2.5
9
+ TargetRubyVersion: 2.6
10
10
  NewCops: enable
11
11
 
12
12
  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.23.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,26 @@
1
1
  # Change log
2
2
 
3
+ ## v2.4.0 (Dec 26, 2021)
4
+
5
+ ### Feature
6
+
7
+ * [#550](https://github.com/ryz310/rubocop_challenger/pull/550) The end of ruby 2.5 support ([@ryz310](https://github.com/ryz310))
8
+
9
+ ### Rubocop Challenge
10
+
11
+ * [#544](https://github.com/ryz310/rubocop_challenger/pull/544) Gemspec/RequireMFA-20211115233051 ([@ryz310](https://github.com/ryz310))
12
+
13
+ ### Dependabot
14
+
15
+ * [#479](https://github.com/ryz310/rubocop_challenger/pull/479) ryz310/dependabot/bundler/rubocop-1.13.0 ([@ryz310](https://github.com/ryz310))
16
+ * [#482](https://github.com/ryz310/rubocop_challenger/pull/482) ryz310/dependabot/bundler/rubocop-rspec-2.3.0 ([@ryz310](https://github.com/ryz310))
17
+ * [#483](https://github.com/ryz310/rubocop_challenger/pull/483) ryz310/dependabot/add-v2-config-file ([@ryz310](https://github.com/ryz310))
18
+ * [#518](https://github.com/ryz310/rubocop_challenger/pull/518) Bump rake from 13.0.4 to 13.0.6 ([@ryz310](https://github.com/ryz310))
19
+ * [#537](https://github.com/ryz310/rubocop_challenger/pull/537) ryz310/dependabot/bundler/rubocop-rails-2.12.4 ([@ryz310](https://github.com/ryz310))
20
+ * [#542](https://github.com/ryz310/rubocop_challenger/pull/542) Bump addressable from 2.7.0 to 2.8.0 ([@ryz310](https://github.com/ryz310))
21
+ * [#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))
22
+ * [#546](https://github.com/ryz310/rubocop_challenger/pull/546) Bump yard from 0.9.26 to 0.9.27 ([@ryz310](https://github.com/ryz310))
23
+
3
24
  ## v2.3.0 (Feb 23, 2021)
4
25
 
5
26
  ### 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.4.0)
5
5
  pr_comet (~> 0.5.1)
6
6
  rainbow
7
7
  rubocop (>= 0.87)
@@ -15,35 +15,49 @@ PATH
15
15
  GEM
16
16
  remote: https://rubygems.org/
17
17
  specs:
18
- activesupport (6.1.3)
18
+ activesupport (6.1.4.4)
19
19
  concurrent-ruby (~> 1.0, >= 1.0.2)
20
20
  i18n (>= 1.6, < 2)
21
21
  minitest (>= 5.1)
22
22
  tzinfo (~> 2.0)
23
23
  zeitwerk (~> 2.3)
24
- addressable (2.7.0)
24
+ addressable (2.8.0)
25
25
  public_suffix (>= 2.0.2, < 5.0)
26
26
  ast (2.4.2)
27
27
  byebug (11.1.3)
28
28
  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)
29
+ concurrent-ruby (1.1.9)
30
+ diff-lcs (1.5.0)
31
+ docile (1.4.0)
32
+ faraday (1.8.0)
33
+ faraday-em_http (~> 1.0)
34
+ faraday-em_synchrony (~> 1.0)
35
+ faraday-excon (~> 1.1)
36
+ faraday-httpclient (~> 1.0.1)
33
37
  faraday-net_http (~> 1.0)
38
+ faraday-net_http_persistent (~> 1.1)
39
+ faraday-patron (~> 1.0)
40
+ faraday-rack (~> 1.0)
34
41
  multipart-post (>= 1.2, < 3)
35
- ruby2_keywords
42
+ ruby2_keywords (>= 0.0.4)
43
+ faraday-em_http (1.0.0)
44
+ faraday-em_synchrony (1.0.0)
45
+ faraday-excon (1.1.0)
46
+ faraday-httpclient (1.0.1)
36
47
  faraday-net_http (1.0.1)
37
- i18n (1.8.9)
48
+ faraday-net_http_persistent (1.2.0)
49
+ faraday-patron (1.0.0)
50
+ faraday-rack (1.0.0)
51
+ i18n (1.8.11)
38
52
  concurrent-ruby (~> 1.0)
39
53
  method_source (1.0.0)
40
- minitest (5.14.3)
54
+ minitest (5.15.0)
41
55
  multipart-post (2.1.1)
42
- octokit (4.20.0)
56
+ octokit (4.21.0)
43
57
  faraday (>= 0.9)
44
58
  sawyer (~> 0.8.0, >= 0.5.3)
45
- parallel (1.20.1)
46
- parser (3.0.0.0)
59
+ parallel (1.21.0)
60
+ parser (3.0.3.2)
47
61
  ast (~> 2.4.1)
48
62
  pr_comet (0.5.1)
49
63
  octokit
@@ -57,9 +71,9 @@ GEM
57
71
  public_suffix (4.0.6)
58
72
  rack (2.2.3)
59
73
  rainbow (3.0.0)
60
- rake (13.0.3)
61
- regexp_parser (2.1.0)
62
- rexml (3.2.4)
74
+ rake (13.0.6)
75
+ regexp_parser (2.2.0)
76
+ rexml (3.2.5)
63
77
  rspec (3.10.0)
64
78
  rspec-core (~> 3.10.0)
65
79
  rspec-expectations (~> 3.10.0)
@@ -72,34 +86,33 @@ GEM
72
86
  rspec-mocks (3.10.2)
73
87
  diff-lcs (>= 1.2.0, < 2.0)
74
88
  rspec-support (~> 3.10.0)
75
- rspec-support (3.10.2)
89
+ rspec-support (3.10.3)
76
90
  rspec_junit_formatter (0.4.1)
77
91
  rspec-core (>= 2, < 4, != 2.12.0)
78
- rubocop (1.10.0)
92
+ rubocop (1.24.0)
79
93
  parallel (~> 1.10)
80
94
  parser (>= 3.0.0.0)
81
95
  rainbow (>= 2.2.2, < 4.0)
82
96
  regexp_parser (>= 1.8, < 3.0)
83
97
  rexml
84
- rubocop-ast (>= 1.2.0, < 2.0)
98
+ rubocop-ast (>= 1.15.0, < 2.0)
85
99
  ruby-progressbar (~> 1.7)
86
100
  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)
101
+ rubocop-ast (1.15.0)
102
+ parser (>= 3.0.1.1)
103
+ rubocop-performance (1.13.0)
104
+ rubocop (>= 1.7.0, < 2.0)
91
105
  rubocop-ast (>= 0.4.0)
92
- rubocop-rails (2.9.1)
106
+ rubocop-rails (2.13.0)
93
107
  activesupport (>= 4.2.0)
94
108
  rack (>= 1.1)
95
- rubocop (>= 0.90.0, < 2.0)
96
- rubocop-rake (0.5.1)
97
- rubocop
98
- rubocop-rspec (2.2.0)
109
+ rubocop (>= 1.7.0, < 2.0)
110
+ rubocop-rake (0.6.0)
99
111
  rubocop (~> 1.0)
100
- rubocop-ast (>= 1.1.0)
112
+ rubocop-rspec (2.6.0)
113
+ rubocop (~> 1.19)
101
114
  ruby-progressbar (1.11.0)
102
- ruby2_keywords (0.0.4)
115
+ ruby2_keywords (0.0.5)
103
116
  sawyer (0.8.2)
104
117
  addressable (>= 2.3.5)
105
118
  faraday (> 0.8, < 2.0)
@@ -108,18 +121,21 @@ GEM
108
121
  simplecov-html (~> 0.11)
109
122
  simplecov_json_formatter (~> 0.1)
110
123
  simplecov-html (0.12.3)
111
- simplecov_json_formatter (0.1.2)
124
+ simplecov_json_formatter (0.1.3)
112
125
  thor (1.1.0)
113
126
  tzinfo (2.0.4)
114
127
  concurrent-ruby (~> 1.0)
115
- unicode-display_width (2.0.0)
116
- yard (0.9.26)
117
- zeitwerk (2.4.2)
128
+ unicode-display_width (2.1.0)
129
+ webrick (1.7.0)
130
+ yard (0.9.27)
131
+ webrick (~> 1.7.0)
132
+ zeitwerk (2.5.1)
118
133
 
119
134
  PLATFORMS
120
135
  ruby
121
136
 
122
137
  DEPENDENCIES
138
+ activesupport (~> 6.1)
123
139
  bundler (>= 2.0)
124
140
  pry-byebug
125
141
  rake (~> 13.0)
@@ -129,4 +145,4 @@ DEPENDENCIES
129
145
  simplecov (= 0.21.2)
130
146
 
131
147
  BUNDLED WITH
132
- 2.2.3
148
+ 2.2.22
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'
@@ -40,4 +40,7 @@ Gem::Specification.new do |spec|
40
40
  spec.add_development_dependency 'rspec'
41
41
  spec.add_development_dependency 'rspec_junit_formatter'
42
42
  spec.add_development_dependency 'simplecov', '0.21.2'
43
+ spec.metadata = {
44
+ 'rubygems_mfa_required' => 'true'
45
+ }
43
46
  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
@@ -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.4.0'
5
5
  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.4.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: 2021-12-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pr_comet
@@ -229,10 +229,10 @@ extensions: []
229
229
  extra_rdoc_files: []
230
230
  files:
231
231
  - ".circleci/config.yml"
232
- - ".dependabot/config.yml"
233
232
  - ".envrc.skeleton"
234
233
  - ".gem_comet.yml"
235
234
  - ".github/ISSUE_TEMPLATE/bug_report.md"
235
+ - ".github/dependabot.yml"
236
236
  - ".gitignore"
237
237
  - ".rspec"
238
238
  - ".rubocop.yml"
@@ -276,7 +276,8 @@ files:
276
276
  homepage: https://github.com/ryz310/rubocop_challenger
277
277
  licenses:
278
278
  - MIT
279
- metadata: {}
279
+ metadata:
280
+ rubygems_mfa_required: 'true'
280
281
  post_install_message:
281
282
  rdoc_options: []
282
283
  require_paths:
@@ -285,14 +286,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
285
286
  requirements:
286
287
  - - ">="
287
288
  - !ruby/object:Gem::Version
288
- version: '2.5'
289
+ version: '2.6'
289
290
  required_rubygems_version: !ruby/object:Gem::Requirement
290
291
  requirements:
291
292
  - - ">="
292
293
  - !ruby/object:Gem::Version
293
294
  version: '0'
294
295
  requirements: []
295
- rubygems_version: 3.2.3
296
+ rubygems_version: 3.2.32
296
297
  signing_key:
297
298
  specification_version: 4
298
299
  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"