rubocop_challenger 2.0.0.pre8 → 2.0.0.pre9

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: 46a23224fddbe8926bf666b3c64dd3d06a2f465869971f3cf33410f354cb50e6
4
- data.tar.gz: ca85681e5c1f2f851fb49e02aa0f72ef69708b4adb5e46a8760b0912bae6e31c
3
+ metadata.gz: 49f15eb335d59c4434b4d8652eea95e0fa0aacac7bdb9e85a0ce03fc7006bddd
4
+ data.tar.gz: e2e310141fea1580bab207518796f7006b0cb81528857df626143f525b0df0b4
5
5
  SHA512:
6
- metadata.gz: 88e6ffd5764d5e073622a7e92c789226e5ea3b00010f53d1869193707cfc36d072b791432cbaaec21408559768eb5544d5bc436064a9501078dbc4f2e86bf148
7
- data.tar.gz: 21a413f9277576b1e0c745e712c108a1e4087a78937ad20164a32dac00cff7eefad0000c68021616f026df11aeb4415f1c5de21faf57faf08c79405a58a0ae3f
6
+ metadata.gz: 5dafbd5acb4bbe5f5bdf271f773642f5fdb1939d419d68436d48832304b90639a6967c7798311689148e940c509d1dab4362ccd01b90d21fe56e3ba2edd1ede7
7
+ data.tar.gz: 545076e8b439f5cbce74b92bc8d99f31327e325efa97d62c312979c50f9c58d3de6e988028801eaa5200b75c30228d268bd8d6e7aa6e7cad79d9bca302241054
@@ -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_todo.yml CHANGED
@@ -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.74.0.
3
+ # using RuboCop version 0.75.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,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop_challenger (2.0.0.pre8)
5
- pr_comet (~> 0.2.0)
4
+ rubocop_challenger (2.0.0.pre9)
5
+ pr_comet (>= 0.2, < 0.4)
6
6
  rainbow
7
7
  rubocop
8
8
  rubocop-performance
@@ -13,14 +13,14 @@ PATH
13
13
  GEM
14
14
  remote: https://rubygems.org/
15
15
  specs:
16
- addressable (2.6.0)
17
- public_suffix (>= 2.0.2, < 4.0)
16
+ addressable (2.7.0)
17
+ public_suffix (>= 2.0.2, < 5.0)
18
18
  ast (2.4.0)
19
19
  byebug (11.0.1)
20
20
  coderay (1.1.2)
21
21
  diff-lcs (1.3)
22
22
  docile (1.3.2)
23
- faraday (0.15.4)
23
+ faraday (0.16.2)
24
24
  multipart-post (>= 1.2, < 3)
25
25
  jaro_winkler (1.5.3)
26
26
  json (2.2.0)
@@ -29,9 +29,9 @@ GEM
29
29
  octokit (4.14.0)
30
30
  sawyer (~> 0.8.0, >= 0.5.3)
31
31
  parallel (1.17.0)
32
- parser (2.6.3.0)
32
+ parser (2.6.5.0)
33
33
  ast (~> 2.4.0)
34
- pr_comet (0.2.1)
34
+ pr_comet (0.3.0)
35
35
  octokit
36
36
  rainbow
37
37
  pry (0.12.2)
@@ -40,40 +40,40 @@ GEM
40
40
  pry-byebug (3.7.0)
41
41
  byebug (~> 11.0)
42
42
  pry (~> 0.10)
43
- public_suffix (3.1.1)
43
+ public_suffix (4.0.1)
44
44
  rainbow (3.0.0)
45
- rake (10.5.0)
45
+ rake (13.0.0)
46
46
  rspec (3.8.0)
47
47
  rspec-core (~> 3.8.0)
48
48
  rspec-expectations (~> 3.8.0)
49
49
  rspec-mocks (~> 3.8.0)
50
50
  rspec-core (3.8.2)
51
51
  rspec-support (~> 3.8.0)
52
- rspec-expectations (3.8.4)
52
+ rspec-expectations (3.8.5)
53
53
  diff-lcs (>= 1.2.0, < 2.0)
54
54
  rspec-support (~> 3.8.0)
55
- rspec-mocks (3.8.1)
55
+ rspec-mocks (3.8.2)
56
56
  diff-lcs (>= 1.2.0, < 2.0)
57
57
  rspec-support (~> 3.8.0)
58
- rspec-support (3.8.2)
58
+ rspec-support (3.8.3)
59
59
  rspec_junit_formatter (0.4.1)
60
60
  rspec-core (>= 2, < 4, != 2.12.0)
61
- rubocop (0.74.0)
61
+ rubocop (0.75.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.1)
68
+ rubocop-performance (1.5.0)
69
69
  rubocop (>= 0.71.0)
70
- rubocop-rspec (1.35.0)
71
- rubocop (>= 0.60.0)
70
+ rubocop-rspec (1.36.0)
71
+ rubocop (>= 0.68.1)
72
72
  ruby-progressbar (1.10.1)
73
73
  sawyer (0.8.2)
74
74
  addressable (>= 2.3.5)
75
75
  faraday (> 0.8, < 2.0)
76
- simplecov (0.17.0)
76
+ simplecov (0.17.1)
77
77
  docile (~> 1.1)
78
78
  json (>= 1.8, < 3)
79
79
  simplecov-html (~> 0.10.0)
@@ -88,7 +88,7 @@ PLATFORMS
88
88
  DEPENDENCIES
89
89
  bundler (~> 1.16)
90
90
  pry-byebug
91
- rake (~> 10.0)
91
+ rake (~> 13.0)
92
92
  rspec
93
93
  rspec_junit_formatter
94
94
  rubocop_challenger!
data/challenger.gemspec CHANGED
@@ -22,7 +22,7 @@ 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.add_runtime_dependency 'pr_comet', '~> 0.2.0'
25
+ spec.add_runtime_dependency 'pr_comet', '>= 0.2', '< 0.4'
26
26
  spec.add_runtime_dependency 'rainbow'
27
27
  spec.add_runtime_dependency 'rubocop'
28
28
  spec.add_runtime_dependency 'rubocop-performance'
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
32
32
 
33
33
  spec.add_development_dependency 'bundler', '~> 1.16'
34
34
  spec.add_development_dependency 'pry-byebug'
35
- spec.add_development_dependency 'rake', '~> 10.0'
35
+ spec.add_development_dependency 'rake', '~> 13.0'
36
36
  spec.add_development_dependency 'rspec'
37
37
  spec.add_development_dependency 'rspec_junit_formatter'
38
38
  spec.add_development_dependency 'simplecov'
@@ -4,28 +4,39 @@ module RubocopChallenger
4
4
  module Github
5
5
  # To generate Pull Request template as markdown
6
6
  class PrTemplate
7
+ FOOTER_TEXT = 'Auto generated by [rubocop_challenger](https://github.com/ryz310/rubocop_challenger)'
8
+
7
9
  def initialize(rule, template_path = nil)
8
10
  template_path ||= default_template_path
9
11
  @template = File.read(template_path)
10
12
  @rule = rule
11
- @yardoc = Rubocop::Yardoc.new(title)
12
13
  end
13
14
 
14
15
  def generate
15
16
  <<~TEMPLATE
16
17
  #{ERB.new(template, nil, '-').result(binding)}
17
- Auto generated by [rubocop_challenger](https://github.com/ryz310/rubocop_challenger)
18
+ #{FOOTER_TEXT}
19
+ TEMPLATE
20
+ rescue StandardError => e
21
+ error_template = File.read(error_template_path)
22
+ <<~TEMPLATE
23
+ #{ERB.new(error_template, nil, '-').result(binding)}
24
+ #{FOOTER_TEXT}
18
25
  TEMPLATE
19
26
  end
20
27
 
21
28
  private
22
29
 
23
- attr_reader :template, :rule, :yardoc
30
+ attr_reader :template, :rule
24
31
 
25
32
  def default_template_path
26
33
  File.expand_path('../../templates/default.md.erb', __dir__)
27
34
  end
28
35
 
36
+ def error_template_path
37
+ File.expand_path('../../templates/error.md.erb', __dir__)
38
+ end
39
+
29
40
  def title
30
41
  rule.title
31
42
  end
@@ -41,6 +52,10 @@ module RubocopChallenger
41
52
  def examples
42
53
  yardoc.examples
43
54
  end
55
+
56
+ def yardoc
57
+ @yardoc ||= Rubocop::Yardoc.new(title)
58
+ end
44
59
  end
45
60
  end
46
61
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubocopChallenger
4
- VERSION = '2.0.0.pre8'
4
+ VERSION = '2.0.0.pre9'
5
5
  end
@@ -0,0 +1,14 @@
1
+ # Rubocop challenge!
2
+
3
+ Sorry! Something went wrong! :bow:
4
+ Please report bugs [here](https://github.com/ryz310/rubocop_challenger/issues/new?assignees=ryz310&labels=bug&template=bug_report.md) with following error information.
5
+
6
+ ```
7
+ title: <%= title %>
8
+ message: <%= e.message %>
9
+
10
+ ---
11
+ <% e.backtrace.each do |line| -%>
12
+ <%= line %>
13
+ <% end -%>
14
+ ```
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop_challenger
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre8
4
+ version: 2.0.0.pre9
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-08-19 00:00:00.000000000 Z
11
+ date: 2019-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pr_comet
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0.2'
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: 0.2.0
22
+ version: '0.4'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '0.2'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: 0.2.0
32
+ version: '0.4'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: rainbow
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -142,14 +148,14 @@ dependencies:
142
148
  requirements:
143
149
  - - "~>"
144
150
  - !ruby/object:Gem::Version
145
- version: '10.0'
151
+ version: '13.0'
146
152
  type: :development
147
153
  prerelease: false
148
154
  version_requirements: !ruby/object:Gem::Requirement
149
155
  requirements:
150
156
  - - "~>"
151
157
  - !ruby/object:Gem::Version
152
- version: '10.0'
158
+ version: '13.0'
153
159
  - !ruby/object:Gem::Dependency
154
160
  name: rspec
155
161
  requirement: !ruby/object:Gem::Requirement
@@ -203,6 +209,7 @@ files:
203
209
  - ".circleci/config.yml"
204
210
  - ".envrc.skeleton"
205
211
  - ".gem_comet.yml"
212
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
206
213
  - ".gitignore"
207
214
  - ".rspec"
208
215
  - ".rubocop.yml"
@@ -239,6 +246,7 @@ files:
239
246
  - lib/rubocop_challenger/version.rb
240
247
  - lib/templates/checklist.md.erb
241
248
  - lib/templates/default.md.erb
249
+ - lib/templates/error.md.erb
242
250
  - renovate.json
243
251
  homepage: https://github.com/ryz310/rubocop_challenger
244
252
  licenses: