rubocop_challenger 2.0.0.pre6 → 2.0.0.pre11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +162 -124
- data/.dependabot/config.yml +18 -0
- data/.gem_comet.yml +12 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +26 -0
- data/.rubocop.yml +11 -3
- data/.rubocop_challenge.yml +3 -0
- data/.rubocop_todo.yml +2 -2
- data/CHANGELOG.md +369 -0
- data/Gemfile.lock +82 -49
- data/README.md +1 -1
- data/bin/jailbreak +8 -6
- data/challenger.gemspec +8 -4
- data/lib/rubocop_challenger.rb +9 -2
- data/lib/rubocop_challenger/bundler/command.rb +1 -1
- data/lib/rubocop_challenger/cli.rb +5 -0
- data/lib/rubocop_challenger/github/pr_template.rb +18 -3
- data/lib/rubocop_challenger/go.rb +36 -27
- data/lib/rubocop_challenger/rubocop/challenge.rb +7 -6
- data/lib/rubocop_challenger/rubocop/command.rb +6 -2
- data/lib/rubocop_challenger/rubocop/yardoc.rb +10 -0
- data/lib/rubocop_challenger/version.rb +1 -1
- data/lib/templates/error.md.erb +18 -0
- metadata +54 -15
- data/bin/release +0 -40
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b2db4e87954f2b94aec3b1186ab795953c9d8d2cd913bef408d86c73f2fb82a
|
4
|
+
data.tar.gz: 5accad2aaf18560773b5114eea31a97328246450e896178160efbfbc3adce17b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08b75d25e5c940539b6d7159df800f05ec25d6d20bca0f336e669456cf6553095d1274ca663707e732b169bee6aa2fd83280138350b8662471d8834b4b093b11'
|
7
|
+
data.tar.gz: 2303e39ef619725013ebef9864fae2019ea5c0e2329c65072224954bb6d4e2cfd4ef7701a913f7e66513cc8faa9f22761839803534c515e2c38ac501885a95ee
|
data/.circleci/config.yml
CHANGED
@@ -2,127 +2,75 @@
|
|
2
2
|
#
|
3
3
|
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
|
4
4
|
#
|
5
|
-
version: 2
|
5
|
+
version: 2.1
|
6
|
+
|
7
|
+
orbs:
|
8
|
+
ruby-orbs: sue445/ruby-orbs@1.6.0
|
9
|
+
code-climate: rvla/code-climate@0.0.2
|
6
10
|
|
7
11
|
references:
|
8
|
-
- &
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./tmp/cc-test-reporter
|
14
|
-
chmod +x ./tmp/cc-test-reporter
|
15
|
-
- &restore_bundle_install_cache
|
16
|
-
restore_cache:
|
17
|
-
keys:
|
18
|
-
- v1-dependencies-{{ checksum "Gemfile.lock" }}
|
19
|
-
- v1-dependencies-
|
20
|
-
- &bundle_install
|
21
|
-
run:
|
22
|
-
name: Bundle Install
|
23
|
-
command: |
|
24
|
-
bundle install --jobs=4 --retry=3 --path vendor/bundle
|
25
|
-
- &save_bundle_install_cache
|
26
|
-
save_cache:
|
27
|
-
paths:
|
28
|
-
- ./vendor/bundle
|
29
|
-
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
|
30
|
-
- &run_rspec
|
31
|
-
run:
|
32
|
-
name: Run Rspec
|
33
|
-
command: |
|
34
|
-
mkdir /tmp/test-results
|
35
|
-
TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)"
|
36
|
-
./tmp/cc-test-reporter before-build
|
37
|
-
bundle exec rspec --format documentation \
|
38
|
-
--color \
|
39
|
-
--format RspecJunitFormatter \
|
40
|
-
--out /tmp/test-results/rspec.xml \
|
41
|
-
$TEST_FILES
|
42
|
-
./tmp/cc-test-reporter after-build --coverage-input-type simplecov --exit-code $?
|
12
|
+
- &ruby_version
|
13
|
+
ruby_version:
|
14
|
+
type: enum
|
15
|
+
enum: ['2.5', '2.6', '2.7', 'latest']
|
16
|
+
default: '2.7'
|
43
17
|
|
44
|
-
|
18
|
+
executors:
|
19
|
+
default:
|
20
|
+
parameters:
|
21
|
+
<<: *ruby_version
|
22
|
+
docker:
|
23
|
+
- image: circleci/ruby:<< parameters.ruby_version >>-node-browsers
|
45
24
|
working_directory: ~/repo
|
25
|
+
|
26
|
+
commands:
|
27
|
+
run_rspec:
|
28
|
+
description: 'Run RSpec'
|
46
29
|
steps:
|
47
|
-
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
30
|
+
- run:
|
31
|
+
name: 'Execute RSpec'
|
32
|
+
command: |
|
33
|
+
mkdir /tmp/test-results
|
34
|
+
TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)"
|
35
|
+
cc-test-reporter before-build
|
36
|
+
bundle exec rspec --format documentation \
|
37
|
+
--color \
|
38
|
+
--format RspecJunitFormatter \
|
39
|
+
--out /tmp/test-results/rspec.xml \
|
40
|
+
$TEST_FILES
|
41
|
+
- code-climate/format-coverage:
|
42
|
+
input-type: simplecov
|
43
|
+
prefix: $(readlink -f .)
|
44
|
+
coverage-file: coverage/.resultset.json
|
45
|
+
output: coverage/codeclimate.$CIRCLE_BUILD_NUM.json
|
46
|
+
- persist_to_workspace:
|
47
|
+
root: coverage
|
48
|
+
paths:
|
49
|
+
- codeclimate.*.json
|
53
50
|
- store_test_results:
|
54
51
|
path: /tmp/test-results
|
55
52
|
- store_artifacts:
|
56
53
|
path: /tmp/test-results
|
57
54
|
destination: test-results
|
58
|
-
|
59
|
-
name: Rake Build
|
60
|
-
command: |
|
61
|
-
bundle exec rake build
|
62
|
-
|
63
|
-
- &rubocop
|
64
|
-
working_directory: ~/repo
|
55
|
+
rubocop:
|
65
56
|
steps:
|
66
|
-
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
- &yardoc
|
73
|
-
working_directory: ~/repo
|
57
|
+
- run:
|
58
|
+
name: Run RuboCop
|
59
|
+
command: bundle exec rubocop
|
60
|
+
yardoc:
|
61
|
+
description: 'Generate YARDoc'
|
74
62
|
steps:
|
75
|
-
-
|
76
|
-
- *restore_bundle_install_cache
|
77
|
-
- *bundle_install
|
78
|
-
- *save_bundle_install_cache
|
79
|
-
- run: bundle exec yardoc -o ./yardoc
|
63
|
+
- run: bundle exec yardoc -o ./yardoc
|
80
64
|
- store_artifacts:
|
81
65
|
path: ./yardoc
|
82
66
|
destination: yardoc
|
83
|
-
|
84
|
-
jobs:
|
85
|
-
build_on_ruby_2.4:
|
86
|
-
docker:
|
87
|
-
- image: circleci/ruby:2.4-node-browsers
|
88
|
-
<<: *build
|
89
|
-
build_on_ruby_2.5:
|
90
|
-
docker:
|
91
|
-
- image: circleci/ruby:2.5-node-browsers
|
92
|
-
<<: *build
|
93
|
-
build_on_ruby_2.6:
|
94
|
-
docker:
|
95
|
-
- image: circleci/ruby:2.6-node-browsers
|
96
|
-
<<: *build
|
97
|
-
build_on_ruby_latest:
|
98
|
-
docker:
|
99
|
-
- image: circleci/ruby:latest-node-browsers-legacy
|
100
|
-
<<: *build
|
101
|
-
rubocop:
|
102
|
-
docker:
|
103
|
-
- image: circleci/ruby:2.4-node-browsers
|
104
|
-
<<: *rubocop
|
105
|
-
yardoc:
|
106
|
-
docker:
|
107
|
-
- image: circleci/ruby:2.4-node-browsers
|
108
|
-
<<: *yardoc
|
109
|
-
verify_rubocop_challenge:
|
110
|
-
docker:
|
111
|
-
- image: circleci/ruby:2.4-node-browsers
|
112
|
-
working_directory: ~/repo
|
67
|
+
rake_build:
|
113
68
|
steps:
|
114
|
-
- checkout
|
115
|
-
- *restore_bundle_install_cache
|
116
|
-
- *bundle_install
|
117
|
-
- *save_bundle_install_cache
|
118
|
-
- run: bundle exec rake install
|
119
69
|
- run:
|
120
|
-
name:
|
121
|
-
command:
|
122
|
-
|
123
|
-
|
124
|
-
bundle exec bin/jailbreak
|
125
|
-
git commit -am "jailbreak"
|
70
|
+
name: Rake Build
|
71
|
+
command: bundle exec rake build
|
72
|
+
verify_rubocop_challenge:
|
73
|
+
steps:
|
126
74
|
- run:
|
127
75
|
name: Verify Rubocop Challenge
|
128
76
|
command: |
|
@@ -131,13 +79,25 @@ jobs:
|
|
131
79
|
--name=ryz310 \
|
132
80
|
--mode=random \
|
133
81
|
--no-create-pr
|
134
|
-
|
82
|
+
integration_testing:
|
83
|
+
description: Integration testing for RuboCop Challenge
|
84
|
+
steps:
|
85
|
+
- run: bundle exec rake install
|
86
|
+
- run:
|
87
|
+
name: Jailbreak
|
88
|
+
command: |
|
89
|
+
git config --global user.email "testing@example.com"
|
90
|
+
git config --global user.name "Testing"
|
91
|
+
bundle exec bin/jailbreak
|
92
|
+
git commit -am "jailbreak"
|
93
|
+
- verify_rubocop_challenge
|
94
|
+
- verify_rubocop_challenge
|
95
|
+
- verify_rubocop_challenge
|
96
|
+
- verify_rubocop_challenge
|
97
|
+
- verify_rubocop_challenge
|
98
|
+
- verify_rubocop_challenge
|
135
99
|
rubocop_challenge:
|
136
|
-
docker:
|
137
|
-
- image: circleci/ruby:2.4-node-browsers
|
138
|
-
working_directory: ~/repo
|
139
100
|
steps:
|
140
|
-
- checkout
|
141
101
|
- run:
|
142
102
|
name: Rubocop Challenge
|
143
103
|
command: |
|
@@ -148,20 +108,13 @@ jobs:
|
|
148
108
|
--template=./lib/templates/checklist.md.erb \
|
149
109
|
--no-auto-gen-timestamp \
|
150
110
|
--exclude-limit=30
|
151
|
-
|
152
111
|
release:
|
153
|
-
|
154
|
-
- image: circleci/ruby:2.4-node-browsers
|
155
|
-
working_directory: ~/repo
|
112
|
+
description: Release to RubyGems.org
|
156
113
|
steps:
|
157
|
-
- checkout
|
158
|
-
- *restore_bundle_install_cache
|
159
|
-
- *bundle_install
|
160
|
-
- *save_bundle_install_cache
|
161
114
|
- run:
|
162
115
|
name: Create Rubygems Credentials
|
163
116
|
command: |
|
164
|
-
mkdir ~/.gem
|
117
|
+
mkdir ~/.gem || true
|
165
118
|
echo -e "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}" > ~/.gem/credentials
|
166
119
|
chmod 0600 ~/.gem/credentials
|
167
120
|
- run:
|
@@ -169,25 +122,103 @@ jobs:
|
|
169
122
|
command: |
|
170
123
|
git push --set-upstream origin ${CIRCLE_BRANCH}
|
171
124
|
bundle exec rake release --trace
|
125
|
+
setup:
|
126
|
+
description: Setup for Job Working
|
127
|
+
parameters:
|
128
|
+
<<: *ruby_version
|
129
|
+
steps:
|
130
|
+
- checkout
|
131
|
+
- run:
|
132
|
+
name: Install Bundler 2.x
|
133
|
+
command: gem install bundler:2.1.4
|
134
|
+
- ruby-orbs/bundle-install:
|
135
|
+
cache_key_prefix: v1-dependencies-<< parameters.ruby_version >>
|
136
|
+
test_and_build:
|
137
|
+
description: Build the RubyGem
|
138
|
+
steps:
|
139
|
+
- code-climate/install
|
140
|
+
- run_rspec
|
141
|
+
- rake_build
|
142
|
+
|
143
|
+
jobs:
|
144
|
+
build:
|
145
|
+
parameters:
|
146
|
+
<<: *ruby_version
|
147
|
+
executor:
|
148
|
+
name: default
|
149
|
+
ruby_version: << parameters.ruby_version >>
|
150
|
+
steps:
|
151
|
+
- setup:
|
152
|
+
ruby_version: << parameters.ruby_version >>
|
153
|
+
- test_and_build
|
154
|
+
upload-coverage:
|
155
|
+
executor: default
|
156
|
+
steps:
|
157
|
+
- attach_workspace:
|
158
|
+
at: ~/repo
|
159
|
+
- code-climate/install
|
160
|
+
- code-climate/sum-coverage:
|
161
|
+
input: codeclimate.*.json
|
162
|
+
parts: 4
|
163
|
+
- code-climate/upload-coverage
|
164
|
+
rubocop:
|
165
|
+
executor: default
|
166
|
+
steps:
|
167
|
+
- setup
|
168
|
+
- rubocop
|
169
|
+
yardoc:
|
170
|
+
executor: default
|
171
|
+
steps:
|
172
|
+
- setup
|
173
|
+
- yardoc
|
174
|
+
integration_testing:
|
175
|
+
executor: default
|
176
|
+
steps:
|
177
|
+
- setup
|
178
|
+
- integration_testing
|
179
|
+
rubocop_challenge:
|
180
|
+
executor: default
|
181
|
+
steps:
|
182
|
+
- checkout
|
183
|
+
- rubocop_challenge
|
184
|
+
release:
|
185
|
+
executor: default
|
186
|
+
steps:
|
187
|
+
- setup
|
188
|
+
- release
|
172
189
|
|
173
190
|
workflows:
|
174
191
|
version: 2
|
175
192
|
|
176
193
|
commit:
|
177
194
|
jobs:
|
178
|
-
-
|
179
|
-
|
180
|
-
|
181
|
-
-
|
195
|
+
- build:
|
196
|
+
name: build_on_ruby_2.5
|
197
|
+
ruby_version: '2.5'
|
198
|
+
- build:
|
199
|
+
name: build_on_ruby_2.6
|
200
|
+
ruby_version: '2.6'
|
201
|
+
- build:
|
202
|
+
name: build_on_ruby_2.7
|
203
|
+
ruby_version: '2.7'
|
204
|
+
- build:
|
205
|
+
name: build_on_ruby_latest
|
206
|
+
ruby_version: 'latest'
|
182
207
|
- rubocop
|
183
208
|
- yardoc
|
184
|
-
-
|
209
|
+
- integration_testing
|
210
|
+
- upload-coverage:
|
211
|
+
requires:
|
212
|
+
- build_on_ruby_2.5
|
213
|
+
- build_on_ruby_2.6
|
214
|
+
- build_on_ruby_2.7
|
215
|
+
- build_on_ruby_latest
|
185
216
|
- release:
|
186
217
|
context: RubyGems API Key
|
187
218
|
requires:
|
188
|
-
- build_on_ruby_2.4
|
189
219
|
- build_on_ruby_2.5
|
190
220
|
- build_on_ruby_2.6
|
221
|
+
- build_on_ruby_2.7
|
191
222
|
- build_on_ruby_latest
|
192
223
|
- rubocop
|
193
224
|
filters:
|
@@ -205,3 +236,10 @@ workflows:
|
|
205
236
|
- master
|
206
237
|
jobs:
|
207
238
|
- rubocop_challenge
|
239
|
+
|
240
|
+
experimental:
|
241
|
+
notify:
|
242
|
+
branches:
|
243
|
+
only:
|
244
|
+
- master
|
245
|
+
- production
|
@@ -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"
|
data/.gem_comet.yml
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# [Usage]
|
2
|
+
#
|
3
|
+
# $ gem install gem_comet
|
4
|
+
# $ gem_comet release {version number, like as "1.2.3"}
|
5
|
+
|
6
|
+
version: 1.1
|
7
|
+
|
8
|
+
release:
|
9
|
+
base_branch: master
|
10
|
+
release_branch: production
|
11
|
+
version_file_path: lib/rubocop_challenger/version.rb
|
12
|
+
changelog_file_path: CHANGELOG.md # optional
|
@@ -0,0 +1,26 @@
|
|
1
|
+
---
|
2
|
+
name: Bug report
|
3
|
+
about: Create a report to help us improve
|
4
|
+
title: ''
|
5
|
+
labels: bug
|
6
|
+
assignees: ryz310
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**Describe the bug**
|
11
|
+
A clear and concise description of what the bug is.
|
12
|
+
|
13
|
+
**Error information**
|
14
|
+
Add error message and backtrace if you can see.
|
15
|
+
|
16
|
+
**RubocopChallenger version (please complete the following information):**
|
17
|
+
- [e.g. 1.2.3]
|
18
|
+
|
19
|
+
**RuboCop versions (please complete the following information):**
|
20
|
+
- rubocop: [e.g. 1.2.3]
|
21
|
+
- rubocop-performance: [e.g. 1.2.3]
|
22
|
+
- rubocop-rails: [e.g. 1.2.3]
|
23
|
+
- rubocop-rspec: [e.g. 1.2.3]
|
24
|
+
|
25
|
+
**Additional context**
|
26
|
+
Add any other context about the problem here.
|
data/.rubocop.yml
CHANGED
@@ -1,19 +1,27 @@
|
|
1
|
-
require:
|
1
|
+
require:
|
2
|
+
- rubocop-performance
|
3
|
+
- rubocop-rspec
|
2
4
|
|
3
5
|
inherit_from: .rubocop_todo.yml
|
4
6
|
|
5
7
|
AllCops:
|
6
|
-
TargetRubyVersion: 2.
|
8
|
+
TargetRubyVersion: 2.5
|
7
9
|
|
8
10
|
Metrics/BlockLength:
|
9
11
|
Exclude:
|
10
12
|
- 'challenger.gemspec'
|
11
13
|
- 'spec/**/*'
|
12
14
|
|
15
|
+
Naming/VariableNumber:
|
16
|
+
EnforcedStyle: snake_case
|
17
|
+
|
13
18
|
# For integration testing
|
14
19
|
RSpec/MultipleExpectations:
|
15
20
|
Exclude:
|
16
|
-
- 'spec/rubocop_challenger/cli_spec.rb'
|
21
|
+
- 'spec/lib/rubocop_challenger/cli_spec.rb'
|
22
|
+
|
23
|
+
RSpec/MultipleMemoizedHelpers:
|
24
|
+
Max: 10
|
17
25
|
|
18
26
|
RSpec/NestedGroups:
|
19
27
|
Max: 4
|