rubocop_challenger 2.0.0.pre5 → 2.0.0.pre6

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: b7d1fa4268fdf70c18f0d5e2f0529e40f44932af9722c8b5d3d602711255fcb6
4
- data.tar.gz: 3b1fce68b3d66ccfc0c504eccc608f5f02b41d731f027abe97fb78e07c8563ab
3
+ metadata.gz: 33d84d4d055937dc0fa3ee0aed23d03f38325ab53de12328fe9445240928d1ee
4
+ data.tar.gz: 0f59e8c4731ac330142392f6a9f6f0f4ad52bc981ca0b75cbbf6326fad5ad331
5
5
  SHA512:
6
- metadata.gz: 229ca155ff15eabf0c94e00645a06ef3d443573952982e623fcb9dec475ace6353dddc0f328c2717d7f856762d942e4bb9225d4e9721647527c2c6365a68e834
7
- data.tar.gz: abfb7b4136efe1f930fd3c87aaa9f08ad7f3cdeb7375def8d38e8c4571de9cf22584f486bcbe5f355a35adec37611499c3d58d28e5c04d736fa5bb7e0937a9c8
6
+ metadata.gz: e633830be11c008791b17b4bb77c730bc330a33d99072947a3f1a4212527fe2f9629a9a470fc53ff9acfc7b1aac7c74a52ddc3673ccc4556bde4a11e40d3b47e
7
+ data.tar.gz: 1a29a118c86d15f03dd181c924e6d87e08c26ca76f7e7eabe5cdaa953c3eaa47f0a9582e8972f7228f9d9b18a406463fad0a74fe112e459a2713b1d8354a0b20
data/.circleci/config.yml CHANGED
@@ -145,7 +145,9 @@ jobs:
145
145
  bundle exec rubocop_challenger go \
146
146
  --email=ryz310@gmail.com \
147
147
  --name=ryz310 \
148
- --template=./lib/templates/checklist.md.erb
148
+ --template=./lib/templates/checklist.md.erb \
149
+ --no-auto-gen-timestamp \
150
+ --exclude-limit=30
149
151
 
150
152
  release:
151
153
  docker:
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2019-06-13 12:10:32 +0900 using RuboCop version 0.71.0.
3
+ # on 2019-06-22 17:06:28 +0900 using RuboCop version 0.71.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/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop_challenger (2.0.0.pre5)
4
+ rubocop_challenger (2.0.0.pre6)
5
5
  pr_comet (~> 0.2.0)
6
6
  rainbow
7
7
  rubocop
@@ -21,7 +21,7 @@ GEM
21
21
  docile (1.3.2)
22
22
  faraday (0.15.4)
23
23
  multipart-post (>= 1.2, < 3)
24
- jaro_winkler (1.5.2)
24
+ jaro_winkler (1.5.3)
25
25
  json (2.2.0)
26
26
  method_source (0.9.2)
27
27
  multipart-post (2.1.1)
@@ -46,12 +46,12 @@ GEM
46
46
  rspec-core (~> 3.8.0)
47
47
  rspec-expectations (~> 3.8.0)
48
48
  rspec-mocks (~> 3.8.0)
49
- rspec-core (3.8.0)
49
+ rspec-core (3.8.1)
50
50
  rspec-support (~> 3.8.0)
51
51
  rspec-expectations (3.8.4)
52
52
  diff-lcs (>= 1.2.0, < 2.0)
53
53
  rspec-support (~> 3.8.0)
54
- rspec-mocks (3.8.0)
54
+ rspec-mocks (3.8.1)
55
55
  diff-lcs (>= 1.2.0, < 2.0)
56
56
  rspec-support (~> 3.8.0)
57
57
  rspec-support (3.8.2)
data/README.md CHANGED
@@ -7,7 +7,13 @@ On the other hand, `rubocop` has [`--auto-correct`](https://github.com/rubocop-h
7
7
  It is ideal that to remove a disabled rule from `.rubocop_todo.yml` every day, to check whether it passes test, and can be obtained consent from the team. But it requires strong persistence and time.
8
8
  I call such work *Rubocop Challenge*. And the *RubocopChallenger* is a gem to support this challenge!
9
9
 
10
- [![Rubocop Challenge](images/rubocop_challenge.png)](https://github.com/ryz310/rubocop_challenger/pull/97)
10
+ ## The history of RubocopChallenger with decrease of offence codes
11
+
12
+ The following chart shows the history of RubocopChallenger and decrease of offence codes at a `.rubocop_todo.yml`. The project was released at 5 years ago, and then it was introduced the RuboCop gem for huge source code including a lots of offence codes. Before using the RubocopChallenger, it was not maintain to reduce offence codes. One day, I felt a crisis and started maintain with manual. I made a lots of Pull Requests to reduce them but it's a load for me and reviewers. So I created a script for automation the flow, which is the predecessor of Rubocop Challenger gem. It brought reducing the offence codes continuously. After 8 months, finally it has done. There is no auto-correctable offence codes.
13
+ But there are many offences which is un-auto-correctable yet. I will try to reduce it with the RubocopChallenger. The RubocopChallenger will
14
+ be continued to evolve.
15
+
16
+ ![Decrease of offence codes](images/decrease_of_offence_codes.png)
11
17
 
12
18
  ## Rubocop Challenge Flow
13
19
 
@@ -15,6 +21,8 @@ I call such work *Rubocop Challenge*. And the *RubocopChallenger* is a gem to su
15
21
  1. When *RubocopChallenger* starts, delete a disabled rule from `.rubocop_todo.yml` existing in your project, execute `$ rubocop --auto-correct` and create a PR which include modified results
16
22
  1. You confirm the PR passes testing and then merge it if there is no problem
17
23
 
24
+ [![Rubocop Challenge](images/rubocop_challenge.png)](https://github.com/ryz310/rubocop_challenger/pull/97)
25
+
18
26
  ## Usage
19
27
 
20
28
  ### 1. Edit your Gemfile
@@ -116,8 +124,12 @@ Options:
116
124
  t, [--template=TEMPLATE] # A Pull Request template `erb` file path.You can use variable that `title`, `rubydoc_url`, `description` and `examples` into the erb file.
117
125
  [--mode=MODE] # Mode to select deletion target. You can choice "most_occurrence", "least_occurrence", or "random"
118
126
  # Default: most_occurrence
127
+ b, [--base-branch=BASE_BRANCH] # The Branch to merge into
128
+ # Default: master
119
129
  l, [--labels=one two three] # Label to give to Pull Request
120
130
  # Default: ["rubocop challenge"]
131
+ [--project-column-name=PROJECT_COLUMN_NAME] # A project column name. You can add the created PR to the GitHub project
132
+ [--project-id=N] # A target project ID. If does not supplied, this method will find a project which associated the repository. When the repository has multiple projects, you should supply this.
121
133
  [--no-create-pr] # No create a pull request (for testing)
122
134
  [--exclude-limit=N] # For how many exclude properties when creating the .rubocop_todo.yml
123
135
  [--auto-gen-timestamp], [--no-auto-gen-timestamp] # Include the date and time when creating the .rubocop_todo.yml
@@ -30,6 +30,11 @@ module RubocopChallenger
30
30
  default: 'most_occurrence',
31
31
  desc: 'Mode to select deletion target. You can choice ' \
32
32
  '"most_occurrence", "least_occurrence", or "random"'
33
+ option :base_branch,
34
+ type: :string,
35
+ default: 'master',
36
+ aliases: :b,
37
+ desc: 'The Branch to merge into'
33
38
  option :labels,
34
39
  type: :array,
35
40
  default: ['rubocop challenge'],
@@ -55,6 +55,7 @@ module RubocopChallenger
55
55
  {
56
56
  user_name: options[:name],
57
57
  user_email: options[:email],
58
+ base_branch: options[:base_branch],
58
59
  labels: options[:labels],
59
60
  dry_run: options[:'no-create-pr'],
60
61
  project_column_name: options[:project_column_name],
@@ -9,6 +9,8 @@ module RubocopChallenger
9
9
  # The email address which use at the git commit
10
10
  # @param options [Hash]
11
11
  # Optional parameters
12
+ # @option base_branch [String]
13
+ # The Branch to merge into
12
14
  # @option labels [Array<String>]
13
15
  # Will create a pull request with the labels
14
16
  # @option dry_run [Boolean]
@@ -21,7 +23,7 @@ module RubocopChallenger
21
23
  # multiple projects, you should supply this.
22
24
  def initialize(user_name:, user_email:, **options)
23
25
  @pr_comet = PrComet.new(
24
- base: 'master',
26
+ base: options[:base_branch],
25
27
  branch: "rubocop-challenge/#{timestamp}",
26
28
  user_name: user_name,
27
29
  user_email: user_email
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubocopChallenger
4
- VERSION = '2.0.0.pre5'
4
+ VERSION = '2.0.0.pre6'
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.pre5
4
+ version: 2.0.0.pre6
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-06-13 00:00:00.000000000 Z
11
+ date: 2019-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pr_comet
@@ -205,6 +205,7 @@ files:
205
205
  - challenger.gemspec
206
206
  - exe/rubocop_challenger
207
207
  - images/circleci_environment_variables.png
208
+ - images/decrease_of_offence_codes.png
208
209
  - images/generate_token.png
209
210
  - images/rubocop_challenge.png
210
211
  - lib/rubocop_challenger.rb