rubocop_challenger 2.0.0.pre7 → 2.0.0.pre8

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: 22c90cea64f2773fb79c8ee599c97045b3003fc7c8c0456ba8243e6f215051c4
4
- data.tar.gz: feea37d04644461e05d1267af6106853a2b29dd22c3308bcbbd2736cf9b41ade
3
+ metadata.gz: 46a23224fddbe8926bf666b3c64dd3d06a2f465869971f3cf33410f354cb50e6
4
+ data.tar.gz: ca85681e5c1f2f851fb49e02aa0f72ef69708b4adb5e46a8760b0912bae6e31c
5
5
  SHA512:
6
- metadata.gz: e656aa2baa243e7624e95052aa509e2ddfc00ddcf1ab93e4b13aa46c32f286f53ec702942c0efb5f360f0dde537a5aca682b205cdd62d7cf3ef6b09b8841c6f1
7
- data.tar.gz: 772f0b16d39f8a40623147f42b8aaf6f78dd4d9b931e271b1691930b1d6e04cfbd1f8b920adb6eb2796b25c062d3ecb9e6c9cf05818a3c71a0e64bbd94d3be9b
6
+ metadata.gz: 88e6ffd5764d5e073622a7e92c789226e5ea3b00010f53d1869193707cfc36d072b791432cbaaec21408559768eb5544d5bc436064a9501078dbc4f2e86bf148
7
+ data.tar.gz: 21a413f9277576b1e0c745e712c108a1e4087a78937ad20164a32dac00cff7eefad0000c68021616f026df11aeb4415f1c5de21faf57faf08c79405a58a0ae3f
data/.gem_comet.yml ADDED
@@ -0,0 +1,6 @@
1
+ version: 1
2
+
3
+ release:
4
+ base_branch: master
5
+ release_branch: production
6
+ version_file_path: lib/rubocop_challenger/version.rb
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2019-07-09 02:06:20 +0900 using RuboCop version 0.72.0.
2
+ # `rubocop --auto-gen-config --exclude-limit 30 --no-auto-gen-timestamp`
3
+ # using RuboCop version 0.74.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.pre7)
4
+ rubocop_challenger (2.0.0.pre8)
5
5
  pr_comet (~> 0.2.0)
6
6
  rainbow
7
7
  rubocop
@@ -31,7 +31,7 @@ GEM
31
31
  parallel (1.17.0)
32
32
  parser (2.6.3.0)
33
33
  ast (~> 2.4.0)
34
- pr_comet (0.2.0)
34
+ pr_comet (0.2.1)
35
35
  octokit
36
36
  rainbow
37
37
  pry (0.12.2)
@@ -58,16 +58,16 @@ GEM
58
58
  rspec-support (3.8.2)
59
59
  rspec_junit_formatter (0.4.1)
60
60
  rspec-core (>= 2, < 4, != 2.12.0)
61
- rubocop (0.72.0)
61
+ rubocop (0.74.0)
62
62
  jaro_winkler (~> 1.5.1)
63
63
  parallel (~> 1.10)
64
64
  parser (>= 2.6)
65
65
  rainbow (>= 2.2.2, < 4.0)
66
66
  ruby-progressbar (~> 1.7)
67
67
  unicode-display_width (>= 1.4.0, < 1.7)
68
- rubocop-performance (1.4.0)
68
+ rubocop-performance (1.4.1)
69
69
  rubocop (>= 0.71.0)
70
- rubocop-rspec (1.33.0)
70
+ rubocop-rspec (1.35.0)
71
71
  rubocop (>= 0.60.0)
72
72
  ruby-progressbar (1.10.1)
73
73
  sawyer (0.8.2)
@@ -4,7 +4,6 @@ require 'erb'
4
4
  require 'yard'
5
5
  require 'rainbow'
6
6
  require 'pr_comet'
7
- require 'rubocop'
8
7
  require 'rubocop_challenger/errors'
9
8
  require 'rubocop_challenger/version'
10
9
  require 'rubocop_challenger/rubocop/rule'
@@ -20,11 +19,11 @@ require 'rubocop_challenger/cli'
20
19
  require 'rubocop_challenger/bundler/command'
21
20
  require 'rubocop_challenger/github/pr_template'
22
21
 
23
- # Loads gems for feature of integrations
24
- %w[rubocop-performance rubocop-rails rubocop-rspec].each do |dependency|
25
- begin
26
- require dependency
27
- rescue LoadError
28
- nil
29
- end
22
+ module RubocopChallenger
23
+ RSPEC_GEMS = %w[
24
+ rubocop
25
+ rubocop-performance
26
+ rubocop-rails
27
+ rubocop-rspec
28
+ ].freeze
30
29
  end
@@ -67,10 +67,7 @@ module RubocopChallenger
67
67
  def update_rubocop!
68
68
  bundler = Bundler::Command.new
69
69
  pull_request.commit! ':police_car: $ bundle update rubocop' do
70
- bundler.update 'rubocop',
71
- 'rubocop-performance',
72
- 'rubocop-rails',
73
- 'rubocop-rspec'
70
+ bundler.update(*RSPEC_GEMS)
74
71
  end
75
72
  end
76
73
 
@@ -14,7 +14,7 @@ module RubocopChallenger
14
14
 
15
15
  def initialize(file_path, mode)
16
16
  @mode = mode
17
- @command = Rubocop::Command.new
17
+ @command = Rubocop::Command.new
18
18
  @todo_reader = Rubocop::TodoReader.new(file_path)
19
19
  @todo_writer = Rubocop::TodoWriter.new(file_path)
20
20
  end
@@ -5,6 +5,7 @@ module RubocopChallenger
5
5
  # To read YARD style documentation from rubocop gem source code
6
6
  class Yardoc
7
7
  def initialize(title)
8
+ load_rspec_gems!
8
9
  @cop_class = find_cop_class(title)
9
10
  YARD.parse(source_file_path)
10
11
  @yardoc = YARD::Registry.all(:class).first
@@ -23,6 +24,17 @@ module RubocopChallenger
23
24
 
24
25
  attr_reader :cop_class, :yardoc
25
26
 
27
+ # Loads gems for YARDoc creation
28
+ def load_rspec_gems!
29
+ RSPEC_GEMS.each do |dependency|
30
+ begin
31
+ require dependency
32
+ rescue LoadError
33
+ nil
34
+ end
35
+ end
36
+ end
37
+
26
38
  # Find a RuboCop class by cop name. It find from rubocop/rspec if cannot
27
39
  # find any class from rubocop gem.
28
40
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubocopChallenger
4
- VERSION = '2.0.0.pre7'
4
+ VERSION = '2.0.0.pre8'
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.pre7
4
+ version: 2.0.0.pre8
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-07-08 00:00:00.000000000 Z
11
+ date: 2019-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pr_comet
@@ -202,6 +202,7 @@ extra_rdoc_files: []
202
202
  files:
203
203
  - ".circleci/config.yml"
204
204
  - ".envrc.skeleton"
205
+ - ".gem_comet.yml"
205
206
  - ".gitignore"
206
207
  - ".rspec"
207
208
  - ".rubocop.yml"
@@ -214,7 +215,6 @@ files:
214
215
  - Rakefile
215
216
  - bin/console
216
217
  - bin/jailbreak
217
- - bin/release
218
218
  - bin/setup
219
219
  - challenger.gemspec
220
220
  - exe/rubocop_challenger
data/bin/release DELETED
@@ -1,40 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- # usage: bin/release VERSION
5
-
6
- require 'bundler/setup'
7
- require 'rubocop_challenger'
8
-
9
- VERSION_FORMAT = /\A\d+\.\d+\.\d+(\.(pre|beta|rc)\d?)?\z/.freeze
10
- version = ARGV[0]
11
- rubocop = RubocopChallenger::Rubocop::Command.new
12
- pr_comet = PrComet.new(base: 'master', branch: "update/v#{version}")
13
-
14
- # Verifying
15
- abort 'usage: bin/release VERSION' if version.nil?
16
- abort 'A version must be like a `1.2.3`' unless version =~ VERSION_FORMAT
17
-
18
- # Modify a version file
19
- pr_comet.commit 'Update version' do
20
- File.write('lib/rubocop_challenger/version.rb', <<~VERSION)
21
- # frozen_string_literal: true
22
-
23
- module RubocopChallenger
24
- VERSION = '#{version}'
25
- end
26
- VERSION
27
- end
28
-
29
- # Bundle Update
30
- pr_comet.commit 'Run $ bundle update' do
31
- `bundle update`
32
- end
33
-
34
- # Regenerate .rubocop_todo.yml
35
- pr_comet.commit 'Regenerate .rubocop_todo.yml' do
36
- rubocop.auto_gen_config
37
- end
38
-
39
- # Create a pull request
40
- pr_comet.create!(title: "Update v#{version}", body: '')