rubocop_challenger 2.1.0 → 2.2.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: d097a5ea1b6b131558d645c7d5b89a9be3c53e632f933ae4fa3ce239a9ddac23
4
- data.tar.gz: b2a91d4b753a142d0f632816222a9c0e1257cc98a4dfd3948cade3aa1cbd370e
3
+ metadata.gz: 9de614d27c025b681596e5f3e59cfdd0faf220647f6d5f74b5ba1d1b6e3c4714
4
+ data.tar.gz: 7a7f66167b732e1db0c24dc764f568ebf65f8379cfa8f00ea77e16f3659fa075
5
5
  SHA512:
6
- metadata.gz: 6b1b6250da286f15506c6bcd700a9a5973a75e848ae34f71e653aef5f65733214e6b22e7cf06a104d993cfd13c4bcf4e231543ab5c0100cc7f4a1b6e16a20c45
7
- data.tar.gz: e4b3fed47b69d1247e713365d517188d87f5f97aadf5e9f67256e8b6c9b798c52eaf0c385018fccc08cfbf5c23e3cb8957c9980e7e97c460f7295a49091d60b2
6
+ metadata.gz: 4b808e5e3d05bed8fc1793d812eded0b17168d392ae0219bdfe96ccb5a1be77cdc9bb96e3d33b40c91f8f1deb354cec555fdd563f5e2f1c5b4c3fd53b774e9ab
7
+ data.tar.gz: 128d208942ccd3d8d198a4bdf506428e0efcfb766d898fc6e606b1cc6fe2f445be63269ac1742ed80e731c8c2a621b90f63af8afb03d33bc24eb28e3835d4225
@@ -1,12 +1,24 @@
1
1
  # [Usage]
2
2
  #
3
3
  # $ gem install gem_comet
4
+ # $ gem_comet init
4
5
  # $ gem_comet release {version number, like as "1.2.3"}
6
+ # $ gem_comet changelog
7
+ # $ gem_comet versions
5
8
 
6
- version: 1.1
9
+ version: 1.2
7
10
 
8
11
  release:
9
12
  base_branch: master
10
13
  release_branch: production
11
14
  version_file_path: lib/rubocop_challenger/version.rb
12
15
  changelog_file_path: CHANGELOG.md # optional
16
+ changelog:
17
+ categories:
18
+ - Feature
19
+ - Bugfix
20
+ - Security
21
+ - Breaking Change
22
+ - Rubocop Challenge
23
+ - Dependabot
24
+ - Misc
@@ -1,5 +1,15 @@
1
1
  # Change log
2
2
 
3
+ ## v2.2.0 (Jan 11, 2021)
4
+
5
+ ### Feature
6
+
7
+ * [#449](https://github.com/ryz310/rubocop_challenger/pull/449) Add verbose option ([@ryz310](https://github.com/ryz310))
8
+
9
+ ### Dependabot
10
+
11
+ * [#447](https://github.com/ryz310/rubocop_challenger/pull/447) ryz310/dependabot/bundler/rubocop-1.8.1 ([@ryz310](https://github.com/ryz310))
12
+
3
13
  ## v2.1.0 (Jan 11, 2021)
4
14
 
5
15
  ### Feature
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop_challenger (2.1.0)
5
- pr_comet (~> 0.4.0)
4
+ rubocop_challenger (2.2.0)
5
+ pr_comet (~> 0.5.1)
6
6
  rainbow
7
7
  rubocop (>= 0.87)
8
8
  rubocop-performance
@@ -45,7 +45,7 @@ GEM
45
45
  parallel (1.20.1)
46
46
  parser (3.0.0.0)
47
47
  ast (~> 2.4.1)
48
- pr_comet (0.4.0)
48
+ pr_comet (0.5.1)
49
49
  octokit
50
50
  rainbow
51
51
  pry (0.13.1)
@@ -75,7 +75,7 @@ GEM
75
75
  rspec-support (3.10.1)
76
76
  rspec_junit_formatter (0.4.1)
77
77
  rspec-core (>= 2, < 4, != 2.12.0)
78
- rubocop (1.8.0)
78
+ rubocop (1.8.1)
79
79
  parallel (~> 1.10)
80
80
  parser (>= 3.0.0.0)
81
81
  rainbow (>= 2.2.2, < 4.0)
data/README.md CHANGED
@@ -56,7 +56,7 @@ version: 2
56
56
  jobs:
57
57
  rubocop_challenge:
58
58
  docker:
59
- - image: circleci/ruby:2.6-node-browsers
59
+ - image: circleci/ruby:3.0
60
60
  working_directory: ~/repo
61
61
  steps:
62
62
  - checkout
@@ -83,20 +83,6 @@ workflows:
83
83
  - rubocop_challenge
84
84
  ```
85
85
 
86
- If you added `rubocop_challenger` gem in your Gemfile so please modify script of installing and execution as following:
87
-
88
- ```yml
89
- steps:
90
- - checkout
91
- - run:
92
- name: Rubocop Challenge
93
- command: |
94
- bundle install
95
- bundle exec rubocop_challenger go \
96
- --email=rubocop-challenger@example.com \
97
- --name="Rubocop Challenger"
98
- ```
99
-
100
86
  ## CLI command references
101
87
 
102
88
  ```sh
@@ -117,23 +103,25 @@ Usage:
117
103
  rubocop_challenger go --email=EMAIL --name=NAME
118
104
 
119
105
  Options:
120
- --email=EMAIL # The Pull Request committer email
121
- --name=NAME # The Pull Request committer name
122
- f, [--file-path=FILE_PATH] # Set your ".rubocop_todo.yml" path
123
- # Default: .rubocop_todo.yml
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.
125
- [--mode=MODE] # Mode to select deletion target. You can choice "most_occurrence", "least_occurrence", or "random"
126
- # Default: most_occurrence
127
- b, [--base-branch=BASE_BRANCH] # The Branch to merge into
128
- # Default: master
129
- l, [--labels=one two three] # Label to give to Pull Request
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.
133
- [--no-create-pr] # No create a pull request (for testing)
134
- [--exclude-limit=N] # For how many exclude properties when creating the .rubocop_todo.yml
135
- [--auto-gen-timestamp], [--no-auto-gen-timestamp] # Include the date and time when creating the .rubocop_todo.yml
136
- # Default: true
106
+ --email=EMAIL # The Pull Request committer email
107
+ --name=NAME # The Pull Request committer name
108
+ f, [--file-path=FILE_PATH] # Set your ".rubocop_todo.yml" path
109
+ # Default: .rubocop_todo.yml
110
+ 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.
111
+ [--mode=MODE] # Mode to select deletion target. You can choice "most_occurrence", "least_occurrence", or "random"
112
+ # Default: most_occurrence
113
+ b, [--base-branch=BASE_BRANCH] # The Branch to merge into
114
+ # Default: master
115
+ l, [--labels=one two three] # Label to give to Pull Request
116
+ # Default: ["rubocop challenge"]
117
+ [--project-column-name=PROJECT_COLUMN_NAME] # A project column name. You can add the created PR to the GitHub project
118
+ [--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.
119
+ [--no-create-pr] # No create a pull request (for testing)
120
+ [--exclude-limit=N] # For how many exclude properties when creating the .rubocop_todo.yml
121
+ [--auto-gen-timestamp], [--no-auto-gen-timestamp] # Include the date and time when creating the .rubocop_todo.yml
122
+ # Default: true
123
+ [--only-safe-auto-correct], [--no-only-safe-auto-correct] # If given `true`, it executes `rubocop --auto-correct`,it means to correct safe cops only.
124
+ [--verbose], [--no-verbose] # Displays executing command.
137
125
 
138
126
  Run `$ rubocop --auto-correct` and create a PR to GitHub repo
139
127
  ```
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
24
24
 
25
25
  spec.required_ruby_version = '>= 2.5'
26
26
 
27
- spec.add_runtime_dependency 'pr_comet', '~> 0.4.0'
27
+ spec.add_runtime_dependency 'pr_comet', '~> 0.5.1'
28
28
  spec.add_runtime_dependency 'rainbow'
29
29
  spec.add_runtime_dependency 'rubocop', '>= 0.87'
30
30
  spec.add_runtime_dependency 'rubocop-performance'
@@ -6,6 +6,10 @@ module RubocopChallenger
6
6
  class Command
7
7
  include PrComet::CommandLine
8
8
 
9
+ def initialize(verbose: false)
10
+ @verbose = verbose
11
+ end
12
+
9
13
  # Executes `$ bundle update` which excludes not installed gems
10
14
  #
11
15
  # @param gem_names [Array<String>] The target gem names
@@ -66,6 +66,10 @@ module RubocopChallenger
66
66
  default: false,
67
67
  desc: 'If given `true`, it executes `rubocop --auto-correct`,' \
68
68
  'it means to correct safe cops only.'
69
+ option :verbose,
70
+ type: :boolean,
71
+ default: false,
72
+ desc: 'Displays executing command.'
69
73
  def go
70
74
  Go.new(options).exec
71
75
  rescue Errors::NoAutoCorrectableRule => e
@@ -26,6 +26,8 @@ module RubocopChallenger
26
26
  # A target project ID. If does not supplied, this method will find a
27
27
  # project which associated the repository. When the repository has
28
28
  # multiple projects, you should supply this.
29
+ # @option verbose [Boolean]
30
+ # Displays executing command.
29
31
  def initialize(options)
30
32
  @options = options
31
33
  end
@@ -53,7 +55,7 @@ module RubocopChallenger
53
55
 
54
56
  # Executes `$ bundle update` for the rubocop and the associated gems
55
57
  def update_rubocop!
56
- bundler = Bundler::Command.new
58
+ bundler = Bundler::Command.new(verbose: options[:verbose])
57
59
  pull_request.commit! ':police_car: $ bundle update rubocop' do
58
60
  bundler.update(*RSPEC_GEMS)
59
61
  end
@@ -173,7 +175,8 @@ module RubocopChallenger
173
175
  labels: options[:labels],
174
176
  dry_run: options[:'no-create-pr'],
175
177
  project_column_name: options[:project_column_name],
176
- project_id: options[:project_id]
178
+ project_id: options[:project_id],
179
+ verbose: options[:verbose]
177
180
  }
178
181
  end
179
182
 
@@ -21,12 +21,15 @@ module RubocopChallenger
21
21
  # A target project ID. If does not supplied, this method will find a
22
22
  # project which associated the repository. When the repository has
23
23
  # multiple projects, you should supply this.
24
- def initialize(user_name:, user_email:, **options)
24
+ # @option verbose [Boolean]
25
+ # Displays executing command.
26
+ def initialize(user_name:, user_email:, **options) # rubocop:disable Metrics/MethodLength
25
27
  @pr_comet = PrComet.new(
26
28
  base: options[:base_branch],
27
29
  branch: "rubocop-challenge/#{timestamp}",
28
30
  user_name: user_name,
29
- user_email: user_email
31
+ user_email: user_email,
32
+ verbose: options[:verbose]
30
33
  )
31
34
  @labels = options[:labels]
32
35
  @dry_run = options[:dry_run]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubocopChallenger
4
- VERSION = '2.1.0'
4
+ VERSION = '2.2.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop_challenger
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ryosuke_sato
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.4.0
19
+ version: 0.5.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.4.0
26
+ version: 0.5.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rainbow
29
29
  requirement: !ruby/object:Gem::Requirement