rubocop_challenger 2.0.0.pre10 → 2.0.0.pre11

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: d67e6fa862e17cb078a6a0ce6ca30da2ef9ad7a018de2376868f70a3c74b823d
4
- data.tar.gz: daccb1264f5e090079c0519c4fde274ee2680cd8650832018bd5ec6650d2b8e0
3
+ metadata.gz: 3b2db4e87954f2b94aec3b1186ab795953c9d8d2cd913bef408d86c73f2fb82a
4
+ data.tar.gz: 5accad2aaf18560773b5114eea31a97328246450e896178160efbfbc3adce17b
5
5
  SHA512:
6
- metadata.gz: 00d94a11992c2fbd2e32f4b168e2700296c5e8e0bea0d9281c9e5a181a4284e644b0f945a0806f892cc8e88a640c62d53a716d1df9fed1007f62e506de69e5f8
7
- data.tar.gz: 508b7235da31b782c11e7ca5abbec1ecd9cd98a6ad67d76e130db151809b548012afb1f4af6fbabd1a0478ed79ef911813a917f81349e7ca0382f16376a2b482
6
+ metadata.gz: '08b75d25e5c940539b6d7159df800f05ec25d6d20bca0f336e669456cf6553095d1274ca663707e732b169bee6aa2fd83280138350b8662471d8834b4b093b11'
7
+ data.tar.gz: 2303e39ef619725013ebef9864fae2019ea5c0e2329c65072224954bb6d4e2cfd4ef7701a913f7e66513cc8faa9f22761839803534c515e2c38ac501885a95ee
@@ -5,15 +5,15 @@
5
5
  version: 2.1
6
6
 
7
7
  orbs:
8
- ruby-orbs: sue445/ruby-orbs@1.4.3
8
+ ruby-orbs: sue445/ruby-orbs@1.6.0
9
9
  code-climate: rvla/code-climate@0.0.2
10
10
 
11
11
  references:
12
12
  - &ruby_version
13
13
  ruby_version:
14
14
  type: enum
15
- enum: ['2.4', '2.5', '2.6', 'latest']
16
- default: '2.4'
15
+ enum: ['2.5', '2.6', '2.7', 'latest']
16
+ default: '2.7'
17
17
 
18
18
  executors:
19
19
  default:
@@ -128,6 +128,9 @@ commands:
128
128
  <<: *ruby_version
129
129
  steps:
130
130
  - checkout
131
+ - run:
132
+ name: Install Bundler 2.x
133
+ command: gem install bundler:2.1.4
131
134
  - ruby-orbs/bundle-install:
132
135
  cache_key_prefix: v1-dependencies-<< parameters.ruby_version >>
133
136
  test_and_build:
@@ -189,15 +192,15 @@ workflows:
189
192
 
190
193
  commit:
191
194
  jobs:
192
- - build:
193
- name: build_on_ruby_2.4
194
- ruby_version: '2.4'
195
195
  - build:
196
196
  name: build_on_ruby_2.5
197
197
  ruby_version: '2.5'
198
198
  - build:
199
199
  name: build_on_ruby_2.6
200
200
  ruby_version: '2.6'
201
+ - build:
202
+ name: build_on_ruby_2.7
203
+ ruby_version: '2.7'
201
204
  - build:
202
205
  name: build_on_ruby_latest
203
206
  ruby_version: 'latest'
@@ -206,16 +209,16 @@ workflows:
206
209
  - integration_testing
207
210
  - upload-coverage:
208
211
  requires:
209
- - build_on_ruby_2.4
210
212
  - build_on_ruby_2.5
211
213
  - build_on_ruby_2.6
214
+ - build_on_ruby_2.7
212
215
  - build_on_ruby_latest
213
216
  - release:
214
217
  context: RubyGems API Key
215
218
  requires:
216
- - build_on_ruby_2.4
217
219
  - build_on_ruby_2.5
218
220
  - build_on_ruby_2.6
221
+ - build_on_ruby_2.7
219
222
  - build_on_ruby_latest
220
223
  - rubocop
221
224
  filters:
@@ -0,0 +1,18 @@
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"
@@ -5,17 +5,23 @@ require:
5
5
  inherit_from: .rubocop_todo.yml
6
6
 
7
7
  AllCops:
8
- TargetRubyVersion: 2.4
8
+ TargetRubyVersion: 2.5
9
9
 
10
10
  Metrics/BlockLength:
11
11
  Exclude:
12
12
  - 'challenger.gemspec'
13
13
  - 'spec/**/*'
14
14
 
15
+ Naming/VariableNumber:
16
+ EnforcedStyle: snake_case
17
+
15
18
  # For integration testing
16
19
  RSpec/MultipleExpectations:
17
20
  Exclude:
18
- - 'spec/rubocop_challenger/cli_spec.rb'
21
+ - 'spec/lib/rubocop_challenger/cli_spec.rb'
22
+
23
+ RSpec/MultipleMemoizedHelpers:
24
+ Max: 10
19
25
 
20
26
  RSpec/NestedGroups:
21
27
  Max: 4
@@ -0,0 +1,3 @@
1
+ ---
2
+ Ignore:
3
+ - Performance/StartWith
@@ -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 0.75.1.
3
+ # using RuboCop version 1.2.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
@@ -1,5 +1,38 @@
1
1
  # Change log
2
2
 
3
+ ## v2.0.0.pre11 (Nov 16, 2020)
4
+
5
+ ### Feature
6
+
7
+ * [#288](https://github.com/ryz310/rubocop_challenger/pull/288) Support ruby 2.7 ([@ryz310](https://github.com/ryz310))
8
+ * [#362](https://github.com/ryz310/rubocop_challenger/pull/362) Use rubocop auto correct all ([@ryz310](https://github.com/ryz310))
9
+ * [#398](https://github.com/ryz310/rubocop_challenger/pull/398) Add auto correct safe option ([@ryz310](https://github.com/ryz310))
10
+
11
+ ### Bugfix
12
+
13
+ * [#363](https://github.com/ryz310/rubocop_challenger/pull/363) Require rubocop-rails gem ([@ryz310](https://github.com/ryz310))
14
+
15
+ ### Breaking Change
16
+
17
+ * [#396](https://github.com/ryz310/rubocop_challenger/pull/396) End of support for Ruby 2.4 ([@ryz310](https://github.com/ryz310))
18
+
19
+ ### Misc
20
+
21
+ * [#261](https://github.com/ryz310/rubocop_challenger/pull/261) Bump pr_comet from 0.3.0 to 0.3.1 ([@ryz310](https://github.com/ryz310))
22
+ * [#262](https://github.com/ryz310/rubocop_challenger/pull/262) Bump rake from 13.0.0 to 13.0.1 ([@ryz310](https://github.com/ryz310))
23
+ * [#271](https://github.com/ryz310/rubocop_challenger/pull/271) Bump thor from 1.0.0 to 1.0.1 ([@ryz310](https://github.com/ryz310))
24
+ * [#290](https://github.com/ryz310/rubocop_challenger/pull/290) Bump pry-byebug from 3.7.0 to 3.8.0 ([@ryz310](https://github.com/ryz310))
25
+ * [#294](https://github.com/ryz310/rubocop_challenger/pull/294) Update ruby-orbs orb to v1.6.0 ([@ryz310](https://github.com/ryz310))
26
+ * [#303](https://github.com/ryz310/rubocop_challenger/pull/303) ryz310/dependabot/bundler/pry-byebug-3.9.0 ([@ryz310](https://github.com/ryz310))
27
+ * [#304](https://github.com/ryz310/rubocop_challenger/pull/304) Edit dependabot configuration ([@ryz310](https://github.com/ryz310))
28
+ * [#310](https://github.com/ryz310/rubocop_challenger/pull/310) Bump yard from 0.9.24 to 0.9.25 ([@ryz310](https://github.com/ryz310))
29
+ * [#317](https://github.com/ryz310/rubocop_challenger/pull/317) Performance/StartWith-20200523233027 ([@ryz310](https://github.com/ryz310))
30
+ * [#351](https://github.com/ryz310/rubocop_challenger/pull/351) ryz310/dependabot/bundler/rubocop-performance-1.8.1 ([@ryz310](https://github.com/ryz310))
31
+ * [#365](https://github.com/ryz310/rubocop_challenger/pull/365) ryz310/dependabot/bundler/rubocop-rspec-1.44.1 ([@ryz310](https://github.com/ryz310))
32
+ * [#376](https://github.com/ryz310/rubocop_challenger/pull/376) ryz310/dependabot/bundler/rspec-3.10.0 ([@ryz310](https://github.com/ryz310))
33
+ * [#386](https://github.com/ryz310/rubocop_challenger/pull/386) Re-generate .rubocop_todo.yml with RuboCop v1.2.0 ([@ryz310](https://github.com/ryz310))
34
+ * [#392](https://github.com/ryz310/rubocop_challenger/pull/392) ryz310/dependabot/bundler/rubocop-1.3.0 ([@ryz310](https://github.com/ryz310))
35
+
3
36
  ## 2.0.0.pre10 (Oct 18, 2019)
4
37
 
5
38
  ### Feature
@@ -10,3 +43,327 @@
10
43
 
11
44
  * ryz310/dependabot/bundler/rspec-3.9.0 ([#254](https://github.com/ryz310/rubocop_challenger/pull/254))
12
45
  * Re-generate .rubocop_todo.yml with RuboCop v0.75.1 ([#255](https://github.com/ryz310/rubocop_challenger/pull/255))
46
+
47
+ ## v2.0.0.pre9 (Oct 3, 2019)
48
+
49
+ ### Feature
50
+
51
+ * Add error reporting feature ([#250](https://ryz310@github.com/ryz310/rubocop_challenger/pull/250))
52
+
53
+ ### Misc
54
+
55
+ * ryz310/dependabot/bundler/rubocop-rspec-1.36.0 ([#246](https://ryz310@github.com/ryz310/rubocop_challenger/pull/246))
56
+ * Re-generate .rubocop_todo.yml with RuboCop v0.75.0 ([#247](https://ryz310@github.com/ryz310/rubocop_challenger/pull/247))
57
+ * ryz310/dependabot/bundler/rake-tw-13.0 ([#242](https://ryz310@github.com/ryz310/rubocop_challenger/pull/242))
58
+ * ryz310/dependabot/bundler/simplecov-0.17.1 ([#244](https://ryz310@github.com/ryz310/rubocop_challenger/pull/244))
59
+ * ryz310/dependabot/bundler/pr_comet-gte-0.2-and-lt-0.4 ([#245](https://ryz310@github.com/ryz310/rubocop_challenger/pull/245))
60
+ * ryz310/dependabot/bundler/rubocop-performance-1.5.0 ([#248](https://ryz310@github.com/ryz310/rubocop_challenger/pull/248))
61
+
62
+ ## v2.0.0.pre8 (Aug 19, 2019)
63
+
64
+ ### Bugfix
65
+
66
+ * Fix/load error of the updated gems ([#238](https://ryz310@github.com/ryz310/rubocop_challenger/pull/238))
67
+
68
+ ### Misc
69
+
70
+ * Re-generate .rubocop_todo.yml with RuboCop v0.73.0 ([#234](https://ryz310@github.com/ryz310/rubocop_challenger/pull/234))
71
+ * Performance/RegexpMatch-20190729233033 ([#235](https://ryz310@github.com/ryz310/rubocop_challenger/pull/235))
72
+ * Layout/SpaceAroundOperators-20190731233025 ([#236](https://ryz310@github.com/ryz310/rubocop_challenger/pull/236))
73
+ * Introduce gem comet ([#239](https://ryz310@github.com/ryz310/rubocop_challenger/pull/239))
74
+
75
+ ## v2.0.0.pre7 (Jul 9, 2019)
76
+
77
+ ### Bugfix
78
+
79
+ * Fix the way of requirements loading for optional dependencies ([#231](https://ryz310@github.com/ryz310/rubocop_challenger/pull/231))
80
+
81
+ ### Security
82
+
83
+ * Bump yard from 0.9.19 to 0.9.20 ([#230](https://ryz310@github.com/ryz310/rubocop_challenger/pull/230))
84
+
85
+ ### Misc
86
+
87
+ * Migrate circle ci version to 2.1 ([#227](https://ryz310@github.com/ryz310/rubocop_challenger/pull/227))
88
+ * Style/WordArray-20190625233039 ([#228](https://ryz310@github.com/ryz310/rubocop_challenger/pull/228))
89
+
90
+ ## v2.0.0.pre6 (Jun 23, 2019)
91
+
92
+ ### Feature
93
+ ### Bugfix
94
+ ### Breaking Change
95
+ ### Misc
96
+
97
+ * Support base branch option ([#223](https://ryz310@github.com/ryz310/rubocop_challenger/pull/223))
98
+
99
+ ## v2.0.0.pre5 (Jun 13, 2019)
100
+
101
+ ### Feature
102
+
103
+ * Support auto gem config options ([#217](https://ryz310@github.com/ryz310/rubocop_challenger/pull/217))
104
+
105
+ ### Misc
106
+
107
+ * Use rainbow gem ([#216](https://ryz310@github.com/ryz310/rubocop_challenger/pull/216))
108
+ * Add pull request to GitHub project on execute ([#218](https://ryz310@github.com/ryz310/rubocop_challenger/pull/218))
109
+ * Add auto updating target gems ([#219](https://ryz310@github.com/ryz310/rubocop_challenger/pull/219))
110
+
111
+ ## v2.0.0.pre4 (Oct 19, 2019)
112
+
113
+ ### Bugfix
114
+
115
+ * Fix the version of pr_comet ([#212](https://ryz310@github.com/ryz310/rubocop_challenger/pull/212))
116
+
117
+ ## v2.0.0.pre3 (Jun 5, 2019)
118
+
119
+ ### Feature
120
+
121
+ * Render links for release note and compare page ([#208](https://ryz310@github.com/ryz310/rubocop_challenger/pull/208))
122
+
123
+ ### Misc
124
+
125
+ * Re-generate .rubocop_todo.yml with RuboCop v0.68.0 ([#196](https://ryz310@github.com/ryz310/rubocop_challenger/pull/196))
126
+ * Re-generate .rubocop_todo.yml with RuboCop v0.68.1 ([#203](https://ryz310@github.com/ryz310/rubocop_challenger/pull/203))
127
+ * Re-generate .rubocop_todo.yml with RuboCop v0.69.0 ([#204](https://ryz310@github.com/ryz310/rubocop_challenger/pull/204))
128
+ * Re-generate .rubocop_todo.yml with RuboCop v0.70.0 ([#206](https://ryz310@github.com/ryz310/rubocop_challenger/pull/206))
129
+ * Re-generate .rubocop_todo.yml with RuboCop v0.71.0 ([#207](https://ryz310@github.com/ryz310/rubocop_challenger/pull/207))
130
+ * Release 2.0.0.pre3 ([#211](https://ryz310@github.com/ryz310/rubocop_challenger/pull/211))
131
+
132
+ ## v2.0.0.pre2 (Apr 9, 2019)
133
+
134
+ ### Misc
135
+
136
+ * Re-generate .rubocop_todo.yml with RuboCop v0.67.1 ([#190](https://ryz310@github.com/ryz310/rubocop_challenger/pull/190))
137
+ * Re-generate .rubocop_todo.yml with RuboCop v0.67.2 ([#191](https://ryz310@github.com/ryz310/rubocop_challenger/pull/191))
138
+ * Extract with pr comet ([#192](https://ryz310@github.com/ryz310/rubocop_challenger/pull/192))
139
+
140
+ ## v2.0.0.pre (Mar 31, 2019)
141
+
142
+ ### Feature
143
+
144
+ * Implement the flow that create a PR which re-generate ".rubocop_todo.yml" ([#183](https://ryz310@github.com/ryz310/rubocop_challenger/pull/183))
145
+ * Bundle update rubocop ([#187](https://ryz310@github.com/ryz310/rubocop_challenger/pull/187))
146
+
147
+ ### Bugfix
148
+ ### Breaking Change
149
+
150
+ * Farewell ruby 2.3 ([#180](https://ryz310@github.com/ryz310/rubocop_challenger/pull/180))
151
+ * Remove base branch option ([#184](https://ryz310@github.com/ryz310/rubocop_challenger/pull/184))
152
+
153
+ ### Misc
154
+
155
+ * Use #abort instead of #puts and #exit! ([#178](https://ryz310@github.com/ryz310/rubocop_challenger/pull/178))
156
+ * Remove waffle.io badge ([#181](https://ryz310@github.com/ryz310/rubocop_challenger/pull/181))
157
+ * Improve code coverage and fix implements ([#185](https://ryz310@github.com/ryz310/rubocop_challenger/pull/185))
158
+ * Use #abort instead of #exit! ([#186](https://ryz310@github.com/ryz310/rubocop_challenger/pull/186))
159
+
160
+ ## v1.2.0 (Feb 27, 2019)
161
+
162
+ ### Feature
163
+
164
+ * Challenge incompleted list ([#170](https://ryz310@github.com/ryz310/rubocop_challenger/pull/170))
165
+
166
+ ### Bugfix
167
+
168
+ * Fix exit code when no more auto-correctable rule ([#175](https://ryz310@github.com/ryz310/rubocop_challenger/pull/175))
169
+
170
+ ### Breaking Change
171
+
172
+ * Remove "regenerate-rubocop-todo" option ([#170](https://ryz310@github.com/ryz310/rubocop_challenger/pull/170))
173
+
174
+ ## v1.1.2 (Feb 21, 2019)
175
+
176
+ ### Feature
177
+
178
+ * Re-generate .rubocop_todo.yml on pre-challenge ([#169](https://ryz310@github.com/ryz310/rubocop_challenger/pull/169))
179
+
180
+ ## v1.1.1 (Jan 17, 2019)
181
+
182
+ ### Bugfix
183
+
184
+ * Fix encountering name error when finding a cop class by cop name ([#164](https://ryz310@github.com/ryz310/rubocop_challenger/pull/164))
185
+
186
+ ### Misc
187
+
188
+ * Configure Renovate ([#162](https://ryz310@github.com/ryz310/rubocop_challenger/pull/162))
189
+
190
+ ## v1.1.0 (Dec 29, 2018)
191
+
192
+ ### Feature
193
+
194
+ * Support ruby 2.6 ([#156](https://ryz310@github.com/ryz310/rubocop_challenger/pull/156))
195
+
196
+ ### Misc
197
+
198
+ * Change emoji on the commit message ([#158](https://ryz310@github.com/ryz310/rubocop_challenger/pull/158))
199
+
200
+ ## v1.0.0 (Dec 3, 2018)
201
+
202
+ Release v1.0.0 :tada:
203
+
204
+ ## v1.0.0.pre4 (Nov 26, 2018)
205
+
206
+ ### Security
207
+
208
+ * Add quiet option on git push command ([#149](https://ryz310@github.com/ryz310/rubocop_challenger/pull/149))
209
+
210
+ ### Misc
211
+
212
+ * Add yard testing flow ([#150](https://ryz310@github.com/ryz310/rubocop_challenger/pull/150))
213
+ * Add jailbreak script ([#151](https://ryz310@github.com/ryz310/rubocop_challenger/pull/151))
214
+
215
+ ## v1.0.0.pre3 (Nov 17, 2018)
216
+
217
+ ### Feature
218
+
219
+ * Output the result in the execution ([#139](https://ryz310@github.com/ryz310/rubocop_challenger/pull/139))
220
+ * Colorize error log ([#145](https://ryz310@github.com/ryz310/rubocop_challenger/pull/145))
221
+
222
+ ### Bugfix
223
+
224
+ * Filter access token in the command logging ([#144](https://ryz310@github.com/ryz310/rubocop_challenger/pull/144))
225
+
226
+ ## v1.0.0.pre2 (Nov 15, 2018)
227
+
228
+ ### Feature
229
+
230
+ * Support private repository ([#132](https://ryz310@github.com/ryz310/rubocop_challenger/pull/132))
231
+ * Support old git version ([#133](https://ryz310@github.com/ryz310/rubocop_challenger/pull/133))
232
+
233
+ ### Misc
234
+
235
+ * Add Github::Client#add_labels spec ([#131](https://ryz310@github.com/ryz310/rubocop_challenger/pull/131))
236
+ * Remove a unnecessary option ([#134](https://ryz310@github.com/ryz310/rubocop_challenger/pull/134))
237
+
238
+ ## v1.0.0.pre (Nov 13, 2018)
239
+
240
+ ### Feature
241
+
242
+ * Use octokit ([#121](https://ryz310@github.com/ryz310/rubocop_challenger/pull/121))
243
+
244
+ ### Breaking Change
245
+
246
+ * Change `--regenerate-rubocop-todo` option default value to true
247
+
248
+ ### Misc
249
+
250
+ * Modify gem version validator ([#127](https://ryz310@github.com/ryz310/rubocop_challenger/pull/127))
251
+
252
+ ## v0.5.2 (Nov 4, 2018)
253
+
254
+ ### Misc
255
+
256
+ * Install code climate ([#116](https://ryz310@github.com/ryz310/rubocop_challenger/pull/116))
257
+ * Fix coveralls badge URL ([#117](https://ryz310@github.com/ryz310/rubocop_challenger/pull/117))
258
+ * Uninstall coveralls ([#118](https://ryz310@github.com/ryz310/rubocop_challenger/pull/118))
259
+
260
+ ## v0.5.1 (Nov 1, 2018)
261
+
262
+ ### Misc
263
+
264
+ * Style/MutableConstant at Tue Oct 30 23:30:33 UTC 2018 ([#106](https://ryz310@github.com/ryz310/rubocop_challenger/pull/106))
265
+ * Install coveralls ([#107](https://ryz310@github.com/ryz310/rubocop_challenger/pull/107))
266
+ * Definition of Metrics/BlockLength ([#109](https://ryz310@github.com/ryz310/rubocop_challenger/pull/109))
267
+ * Fix offense of RSpec/ExampleLength ([#110](https://ryz310@github.com/ryz310/rubocop_challenger/pull/110))
268
+ * Fix offense of Style/Documentation ([#111](https://ryz310@github.com/ryz310/rubocop_challenger/pull/111))
269
+ * Fix offense of Metrics/LineLength ([#112](https://ryz310@github.com/ryz310/rubocop_challenger/pull/112))
270
+ * Fix that testing target is wrong ([#113](https://ryz310@github.com/ryz310/rubocop_challenger/pull/113))
271
+
272
+ ## v0.5.0 (Oct 30, 2018)
273
+
274
+ ### Feature
275
+
276
+ * Use bundle exec ([#100](https://ryz310@github.com/ryz310/rubocop_challenger/pull/100))
277
+
278
+ ### Breaking Change
279
+
280
+ * Return example name ([#101](https://ryz310@github.com/ryz310/rubocop_challenger/pull/101))
281
+
282
+ ### Misc
283
+
284
+ * Layout/AlignHash at Sun Oct 28 23:30:20 UTC 2018 ([#97](https://ryz310@github.com/ryz310/rubocop_challenger/pull/97))
285
+ * Add Rubocop Challenge example to the README.md ([#98](https://ryz310@github.com/ryz310/rubocop_challenger/pull/98))
286
+ * Update bundle when create release PR ([#103](https://ryz310@github.com/ryz310/rubocop_challenger/pull/103))
287
+
288
+ ## v0.4.1 (Oct 28, 2018)
289
+
290
+ ### Bugfix
291
+
292
+ * Return status code 0 when exists no auto-correctable cop ([#91](https://ryz310@github.com/ryz310/rubocop_challenger/pull/91))
293
+ * Fix rubocop version mismatch ([#92](https://ryz310@github.com/ryz310/rubocop_challenger/pull/92))
294
+
295
+ ### Misc
296
+
297
+ * Style/RedundantSelf at Fri Oct 26 05:58:13 UTC 2018 ([#89](https://ryz310@github.com/ryz310/rubocop_challenger/pull/89))
298
+ * Layout/SpaceInsideBlockBraces at Sat Oct 27 23:30:21 UTC 2018 ([#93](https://ryz310@github.com/ryz310/rubocop_challenger/pull/93))
299
+
300
+ ## v0.4.0 (Oct 26, 2018)
301
+
302
+ ### Feature
303
+
304
+ * Generate document from yardoc ([#86](https://ryz310@github.com/ryz310/rubocop_challenger/pull/86))
305
+
306
+ ### Misc
307
+
308
+ * Rake/create pr for version up ([#81](https://ryz310@github.com/ryz310/rubocop_challenger/pull/81))
309
+ * Style/RescueModifier at Wed Oct 24 23:30:21 UTC 2018 ([#82](https://ryz310@github.com/ryz310/rubocop_challenger/pull/82))
310
+
311
+ ## v0.3.1 (Oct 23, 2018)
312
+
313
+ ### Feature
314
+
315
+ * Modify default template ([#73](https://ryz310@github.com/ryz310/rubocop_challenger/pull/73))
316
+
317
+
318
+ ## v0.3.0 (Oct 23, 2018)
319
+
320
+ ### Feature
321
+
322
+ * Add labels option ([#67](https://ryz310@github.com/ryz310/rubocop_challenger/pull/67))
323
+ * Add template option ([#70](https://ryz310@github.com/ryz310/rubocop_challenger/pull/70))
324
+
325
+ ### Misc
326
+
327
+ * Run rubocop challenge after release ([#68](https://ryz310@github.com/ryz310/rubocop_challenger/pull/68))
328
+
329
+ ## v0.2.1 (Oct 23, 2019)
330
+
331
+ ### Bugfix
332
+
333
+ * Fix default PR template file path ([#64](https://ryz310@github.com/ryz310/rubocop_challenger/pull/64))
334
+
335
+ ## v0.2.0 (Oct 23, 2018)
336
+
337
+ ### Feature
338
+
339
+ * Generate pr template ([#50](https://ryz310@github.com/ryz310/rubocop_challenger/pull/50))
340
+ * Add no-commit option ([#53](https://ryz310@github.com/ryz310/rubocop_challenger/pull/53))
341
+ * Return status code 1 when an error occurs ([#56](https://ryz310@github.com/ryz310/rubocop_challenger/pull/56))
342
+ * Add option which regenerate rubocop todo file ([#59](https://ryz310@github.com/ryz310/rubocop_challenger/pull/59))
343
+
344
+ ### Misc
345
+
346
+ * Add access token description ([#48](https://ryz310@github.com/ryz310/rubocop_challenger/pull/48))
347
+ * Add no document option to gem install command ([#51](https://ryz310@github.com/ryz310/rubocop_challenger/pull/51))
348
+
349
+ ## v0.1.3 (Oct 21, 2018)
350
+
351
+ ### Misc
352
+
353
+ * Style/TrailingCommaInArrayLiteral at Fri Oct 19 23:30:18 UTC 2018 ([#34](https://ryz310@github.com/ryz310/rubocop_challenger/pull/34))
354
+ * Update readme ([#36](https://ryz310@github.com/ryz310/rubocop_challenger/pull/36))
355
+ * Add challenge class spec ([#42](https://ryz310@github.com/ryz310/rubocop_challenger/pull/42))
356
+
357
+ ## v0.1.2 (Oct 19, 2018)
358
+
359
+ ### Misc
360
+
361
+ * Install from gem ([#28](https://ryz310@github.com/ryz310/rubocop_challenger/pull/28))
362
+
363
+ ## v0.1.1 (Oct 19, 2018)
364
+
365
+ Minor fixes
366
+
367
+ ## v0.1.0 (Oct 18, 2018)
368
+
369
+ Initial release! :rocket:
@@ -1,11 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop_challenger (2.0.0.pre10)
4
+ rubocop_challenger (2.0.0.pre11)
5
5
  pr_comet (>= 0.2, < 0.4)
6
6
  rainbow
7
- rubocop
7
+ rubocop (>= 0.87)
8
8
  rubocop-performance
9
+ rubocop-rails
9
10
  rubocop-rspec
10
11
  thor
11
12
  yard
@@ -13,63 +14,88 @@ PATH
13
14
  GEM
14
15
  remote: https://rubygems.org/
15
16
  specs:
17
+ activesupport (6.0.3.4)
18
+ concurrent-ruby (~> 1.0, >= 1.0.2)
19
+ i18n (>= 0.7, < 2)
20
+ minitest (~> 5.1)
21
+ tzinfo (~> 1.1)
22
+ zeitwerk (~> 2.2, >= 2.2.2)
16
23
  addressable (2.7.0)
17
24
  public_suffix (>= 2.0.2, < 5.0)
18
- ast (2.4.0)
19
- byebug (11.0.1)
20
- coderay (1.1.2)
21
- diff-lcs (1.3)
25
+ ast (2.4.1)
26
+ byebug (11.1.3)
27
+ coderay (1.1.3)
28
+ concurrent-ruby (1.1.7)
29
+ diff-lcs (1.4.4)
22
30
  docile (1.3.2)
23
- faraday (0.17.0)
31
+ faraday (1.1.0)
24
32
  multipart-post (>= 1.2, < 3)
25
- jaro_winkler (1.5.3)
26
- json (2.2.0)
27
- method_source (0.9.2)
33
+ ruby2_keywords
34
+ i18n (1.8.5)
35
+ concurrent-ruby (~> 1.0)
36
+ json (2.3.1)
37
+ method_source (1.0.0)
38
+ minitest (5.14.2)
28
39
  multipart-post (2.1.1)
29
- octokit (4.14.0)
40
+ octokit (4.19.0)
41
+ faraday (>= 0.9)
30
42
  sawyer (~> 0.8.0, >= 0.5.3)
31
- parallel (1.18.0)
32
- parser (2.6.5.0)
33
- ast (~> 2.4.0)
34
- pr_comet (0.3.0)
43
+ parallel (1.20.0)
44
+ parser (2.7.2.0)
45
+ ast (~> 2.4.1)
46
+ pr_comet (0.3.1)
35
47
  octokit
36
48
  rainbow
37
- pry (0.12.2)
38
- coderay (~> 1.1.0)
39
- method_source (~> 0.9.0)
40
- pry-byebug (3.7.0)
49
+ pry (0.13.1)
50
+ coderay (~> 1.1)
51
+ method_source (~> 1.0)
52
+ pry-byebug (3.9.0)
41
53
  byebug (~> 11.0)
42
- pry (~> 0.10)
43
- public_suffix (4.0.1)
54
+ pry (~> 0.13.0)
55
+ public_suffix (4.0.6)
56
+ rack (2.2.3)
44
57
  rainbow (3.0.0)
45
- rake (13.0.0)
46
- rspec (3.9.0)
47
- rspec-core (~> 3.9.0)
48
- rspec-expectations (~> 3.9.0)
49
- rspec-mocks (~> 3.9.0)
50
- rspec-core (3.9.0)
51
- rspec-support (~> 3.9.0)
52
- rspec-expectations (3.9.0)
58
+ rake (13.0.1)
59
+ regexp_parser (1.8.2)
60
+ rexml (3.2.4)
61
+ rspec (3.10.0)
62
+ rspec-core (~> 3.10.0)
63
+ rspec-expectations (~> 3.10.0)
64
+ rspec-mocks (~> 3.10.0)
65
+ rspec-core (3.10.0)
66
+ rspec-support (~> 3.10.0)
67
+ rspec-expectations (3.10.0)
53
68
  diff-lcs (>= 1.2.0, < 2.0)
54
- rspec-support (~> 3.9.0)
55
- rspec-mocks (3.9.0)
69
+ rspec-support (~> 3.10.0)
70
+ rspec-mocks (3.10.0)
56
71
  diff-lcs (>= 1.2.0, < 2.0)
57
- rspec-support (~> 3.9.0)
58
- rspec-support (3.9.0)
72
+ rspec-support (~> 3.10.0)
73
+ rspec-support (3.10.0)
59
74
  rspec_junit_formatter (0.4.1)
60
75
  rspec-core (>= 2, < 4, != 2.12.0)
61
- rubocop (0.75.1)
62
- jaro_winkler (~> 1.5.1)
76
+ rubocop (1.3.0)
63
77
  parallel (~> 1.10)
64
- parser (>= 2.6)
78
+ parser (>= 2.7.1.5)
65
79
  rainbow (>= 2.2.2, < 4.0)
80
+ regexp_parser (>= 1.8)
81
+ rexml
82
+ rubocop-ast (>= 1.1.1)
66
83
  ruby-progressbar (~> 1.7)
67
- unicode-display_width (>= 1.4.0, < 1.7)
68
- rubocop-performance (1.5.0)
69
- rubocop (>= 0.71.0)
70
- rubocop-rspec (1.36.0)
71
- rubocop (>= 0.68.1)
84
+ unicode-display_width (>= 1.4.0, < 2.0)
85
+ rubocop-ast (1.1.1)
86
+ parser (>= 2.7.1.5)
87
+ rubocop-performance (1.8.1)
88
+ rubocop (>= 0.87.0)
89
+ rubocop-ast (>= 0.4.0)
90
+ rubocop-rails (2.8.1)
91
+ activesupport (>= 4.2.0)
92
+ rack (>= 1.1)
93
+ rubocop (>= 0.87.0)
94
+ rubocop-rspec (2.0.0)
95
+ rubocop (~> 1.0)
96
+ rubocop-ast (>= 1.1.0)
72
97
  ruby-progressbar (1.10.1)
98
+ ruby2_keywords (0.0.2)
73
99
  sawyer (0.8.2)
74
100
  addressable (>= 2.3.5)
75
101
  faraday (> 0.8, < 2.0)
@@ -78,15 +104,19 @@ GEM
78
104
  json (>= 1.8, < 3)
79
105
  simplecov-html (~> 0.10.0)
80
106
  simplecov-html (0.10.2)
81
- thor (0.20.3)
82
- unicode-display_width (1.6.0)
83
- yard (0.9.20)
107
+ thor (1.0.1)
108
+ thread_safe (0.3.6)
109
+ tzinfo (1.2.8)
110
+ thread_safe (~> 0.1)
111
+ unicode-display_width (1.7.0)
112
+ yard (0.9.25)
113
+ zeitwerk (2.4.1)
84
114
 
85
115
  PLATFORMS
86
116
  ruby
87
117
 
88
118
  DEPENDENCIES
89
- bundler (~> 1.16)
119
+ bundler (>= 2.0)
90
120
  pry-byebug
91
121
  rake (~> 13.0)
92
122
  rspec
@@ -95,4 +125,4 @@ DEPENDENCIES
95
125
  simplecov
96
126
 
97
127
  BUNDLED WITH
98
- 1.17.3
128
+ 2.1.4
data/README.md CHANGED
@@ -140,7 +140,7 @@ Run `$ rubocop --auto-correct` and create a PR to GitHub repo
140
140
 
141
141
  ## Requirement
142
142
 
143
- * Ruby 2.4 or higher
143
+ * Ruby 2.5 or higher
144
144
 
145
145
  ## Development
146
146
 
@@ -22,15 +22,18 @@ 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'
26
+
25
27
  spec.add_runtime_dependency 'pr_comet', '>= 0.2', '< 0.4'
26
28
  spec.add_runtime_dependency 'rainbow'
27
- spec.add_runtime_dependency 'rubocop'
29
+ spec.add_runtime_dependency 'rubocop', '>= 0.87'
28
30
  spec.add_runtime_dependency 'rubocop-performance'
31
+ spec.add_runtime_dependency 'rubocop-rails'
29
32
  spec.add_runtime_dependency 'rubocop-rspec'
30
33
  spec.add_runtime_dependency 'thor'
31
34
  spec.add_runtime_dependency 'yard'
32
35
 
33
- spec.add_development_dependency 'bundler', '~> 1.16'
36
+ spec.add_development_dependency 'bundler', '>= 2.0'
34
37
  spec.add_development_dependency 'pry-byebug'
35
38
  spec.add_development_dependency 'rake', '~> 13.0'
36
39
  spec.add_development_dependency 'rspec'
@@ -61,6 +61,11 @@ module RubocopChallenger
61
61
  type: :boolean,
62
62
  default: true,
63
63
  desc: 'Include the date and time when creating the .rubocop_todo.yml'
64
+ option :'only-safe-auto-correct',
65
+ type: :boolean,
66
+ default: false,
67
+ desc: 'If given `true`, it executes `rubocop --auto-correct`,' \
68
+ 'it means to correct safe cops only.'
64
69
  def go
65
70
  Go.new(options).exec
66
71
  rescue Errors::NoAutoCorrectableRule => e
@@ -9,6 +9,9 @@ module RubocopChallenger
9
9
  # For how many exclude properties when creating the ".rubocop_todo.yml"
10
10
  # @option auto-gen-timestamp [Boolean]
11
11
  # Include the date and time when creating the ".rubocop_todo.yml"
12
+ # @option only-safe-auto-correct [Boolean]
13
+ # If given `true`, it executes `rubocop --auto-correct`,
14
+ # it means to correct safe cops only.
12
15
  # @option name [String]
13
16
  # The author name which use at the git commit
14
17
  # @option email [String]
@@ -25,9 +28,6 @@ module RubocopChallenger
25
28
  # multiple projects, you should supply this.
26
29
  def initialize(options)
27
30
  @options = options
28
- @exclude_limit = options[:'exclude-limit']
29
- @auto_gen_timestamp = options[:'auto-gen-timestamp']
30
- @pull_request = PullRequest.new(extract_pull_request_options(options))
31
31
  end
32
32
 
33
33
  # Executes Rubocop Challenge flow
@@ -45,22 +45,10 @@ module RubocopChallenger
45
45
 
46
46
  private
47
47
 
48
- attr_reader :options, :pull_request, :exclude_limit, :auto_gen_timestamp
48
+ attr_reader :options
49
49
 
50
- # Extracts options for the PullRequest class
51
- #
52
- # @param options [Hash] The target options
53
- # @return [Hash] Options for the PullRequest class
54
- def extract_pull_request_options(options)
55
- {
56
- user_name: options[:name],
57
- user_email: options[:email],
58
- base_branch: options[:base_branch],
59
- labels: options[:labels],
60
- dry_run: options[:'no-create-pr'],
61
- project_column_name: options[:project_column_name],
62
- project_id: options[:project_id]
63
- }
50
+ def pull_request
51
+ @pull_request ||= PullRequest.new(**pull_request_options)
64
52
  end
65
53
 
66
54
  # Executes `$ bundle update` for the rubocop and the associated gems
@@ -79,10 +67,7 @@ module RubocopChallenger
79
67
  def regenerate_rubocop_todo!
80
68
  before_version = scan_rubocop_version_in_rubocop_todo_file
81
69
  pull_request.commit! ':police_car: regenerate rubocop todo' do
82
- Rubocop::Command.new.auto_gen_config(
83
- exclude_limit: exclude_limit,
84
- auto_gen_timestamp: auto_gen_timestamp
85
- )
70
+ Rubocop::Command.new.auto_gen_config(**auto_gen_config_options)
86
71
  end
87
72
  after_version = scan_rubocop_version_in_rubocop_todo_file
88
73
 
@@ -107,7 +92,7 @@ module RubocopChallenger
107
92
  # @raise [Errors::NoAutoCorrectableRule]
108
93
  # Raises if there is no auto correctable rule in ".rubocop_todo.yml"
109
94
  def rubocop_challenge!(before_version, after_version)
110
- Rubocop::Challenge.exec(options[:file_path], options[:mode]).tap do |rule|
95
+ Rubocop::Challenge.exec(**rubocop_challenge_options).tap do |rule|
111
96
  pull_request.commit! ":police_car: #{rule.title}"
112
97
  end
113
98
  rescue Errors::NoAutoCorrectableRule => e
@@ -171,5 +156,32 @@ module RubocopChallenger
171
156
  todo_reader = Rubocop::TodoReader.new(options[:file_path])
172
157
  todo_reader.all_rules.include?(rule)
173
158
  end
159
+
160
+ def rubocop_challenge_options
161
+ {
162
+ file_path: options[:file_path],
163
+ mode: options[:mode],
164
+ only_safe_auto_correct: options[:'only-safe-auto-correct']
165
+ }
166
+ end
167
+
168
+ def pull_request_options
169
+ {
170
+ user_name: options[:name],
171
+ user_email: options[:email],
172
+ base_branch: options[:base_branch],
173
+ labels: options[:labels],
174
+ dry_run: options[:'no-create-pr'],
175
+ project_column_name: options[:project_column_name],
176
+ project_id: options[:project_id]
177
+ }
178
+ end
179
+
180
+ def auto_gen_config_options
181
+ {
182
+ exclude_limit: options[:'exclude-limit'],
183
+ auto_gen_timestamp: options[:'auto-gen-timestamp']
184
+ }
185
+ end
174
186
  end
175
187
  end
@@ -4,16 +4,17 @@ module RubocopChallenger
4
4
  module Rubocop
5
5
  # To execute Rubocop Challenge flow
6
6
  class Challenge
7
- def self.exec(file_path, mode)
8
- new(file_path, mode).send(:exec)
7
+ def self.exec(file_path:, mode:, only_safe_auto_correct:)
8
+ new(file_path, mode, only_safe_auto_correct).send(:exec)
9
9
  end
10
10
 
11
11
  private
12
12
 
13
- attr_reader :mode, :command, :todo_reader, :todo_writer
13
+ attr_reader :mode, :only_safe_auto_correct, :command, :todo_reader, :todo_writer
14
14
 
15
- def initialize(file_path, mode)
15
+ def initialize(file_path, mode, only_safe_auto_correct)
16
16
  @mode = mode
17
+ @only_safe_auto_correct = only_safe_auto_correct
17
18
  @command = Rubocop::Command.new
18
19
  @todo_reader = Rubocop::TodoReader.new(file_path)
19
20
  @todo_writer = Rubocop::TodoWriter.new(file_path)
@@ -23,7 +24,7 @@ module RubocopChallenger
23
24
  def exec
24
25
  verify_target_rule
25
26
  todo_writer.delete_rule(target_rule)
26
- command.auto_correct
27
+ command.auto_correct(only_safe_auto_correct: only_safe_auto_correct)
27
28
  target_rule
28
29
  end
29
30
 
@@ -7,8 +7,12 @@ module RubocopChallenger
7
7
  include PrComet::CommandLine
8
8
 
9
9
  # Executes auto correction
10
- def auto_correct
11
- run('--auto-correct')
10
+ def auto_correct(only_safe_auto_correct:)
11
+ if only_safe_auto_correct
12
+ run('--auto-correct')
13
+ else
14
+ run('--auto-correct-all')
15
+ end
12
16
  end
13
17
 
14
18
  # Generates `.rubocop_todo.yml`
@@ -27,11 +27,9 @@ module RubocopChallenger
27
27
  # Loads gems for YARDoc creation
28
28
  def load_rspec_gems!
29
29
  RSPEC_GEMS.each do |dependency|
30
- begin
31
- require dependency
32
- rescue LoadError
33
- nil
34
- end
30
+ require dependency
31
+ rescue LoadError
32
+ nil
35
33
  end
36
34
  end
37
35
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubocopChallenger
4
- VERSION = '2.0.0.pre10'
4
+ VERSION = '2.0.0.pre11'
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.0.0.pre10
4
+ version: 2.0.0.pre11
5
5
  platform: ruby
6
6
  authors:
7
7
  - ryosuke_sato
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-10-18 00:00:00.000000000 Z
11
+ date: 2020-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pr_comet
@@ -46,6 +46,20 @@ dependencies:
46
46
  version: '0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rubocop
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0.87'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0.87'
61
+ - !ruby/object:Gem::Dependency
62
+ name: rubocop-performance
49
63
  requirement: !ruby/object:Gem::Requirement
50
64
  requirements:
51
65
  - - ">="
@@ -59,7 +73,7 @@ dependencies:
59
73
  - !ruby/object:Gem::Version
60
74
  version: '0'
61
75
  - !ruby/object:Gem::Dependency
62
- name: rubocop-performance
76
+ name: rubocop-rails
63
77
  requirement: !ruby/object:Gem::Requirement
64
78
  requirements:
65
79
  - - ">="
@@ -118,16 +132,16 @@ dependencies:
118
132
  name: bundler
119
133
  requirement: !ruby/object:Gem::Requirement
120
134
  requirements:
121
- - - "~>"
135
+ - - ">="
122
136
  - !ruby/object:Gem::Version
123
- version: '1.16'
137
+ version: '2.0'
124
138
  type: :development
125
139
  prerelease: false
126
140
  version_requirements: !ruby/object:Gem::Requirement
127
141
  requirements:
128
- - - "~>"
142
+ - - ">="
129
143
  - !ruby/object:Gem::Version
130
- version: '1.16'
144
+ version: '2.0'
131
145
  - !ruby/object:Gem::Dependency
132
146
  name: pry-byebug
133
147
  requirement: !ruby/object:Gem::Requirement
@@ -207,12 +221,14 @@ extensions: []
207
221
  extra_rdoc_files: []
208
222
  files:
209
223
  - ".circleci/config.yml"
224
+ - ".dependabot/config.yml"
210
225
  - ".envrc.skeleton"
211
226
  - ".gem_comet.yml"
212
227
  - ".github/ISSUE_TEMPLATE/bug_report.md"
213
228
  - ".gitignore"
214
229
  - ".rspec"
215
230
  - ".rubocop.yml"
231
+ - ".rubocop_challenge.yml"
216
232
  - ".rubocop_todo.yml"
217
233
  - CHANGELOG.md
218
234
  - CODE_OF_CONDUCT.md
@@ -261,14 +277,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
261
277
  requirements:
262
278
  - - ">="
263
279
  - !ruby/object:Gem::Version
264
- version: '0'
280
+ version: '2.5'
265
281
  required_rubygems_version: !ruby/object:Gem::Requirement
266
282
  requirements:
267
283
  - - ">"
268
284
  - !ruby/object:Gem::Version
269
285
  version: 1.3.1
270
286
  requirements: []
271
- rubygems_version: 3.0.3
287
+ rubygems_version: 3.1.4
272
288
  signing_key:
273
289
  specification_version: 4
274
290
  summary: Make a clean your rubocop_todo.yml with CI