rubocop_challenger 0.4.0 → 0.4.1

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: 0e6ab36ea5a8373773c832d7f40e7867b857fc11682737f2a618e6ceda54ec65
4
- data.tar.gz: f33fa38af154d266e71c48c4268cb3438e241e5575fc793080cb14f41c51392d
3
+ metadata.gz: 0c62287bd8b6f8d30cf267cd97de4d0ed75bae2221921c3aaa5ae693ca84425b
4
+ data.tar.gz: c36a4659c2dcfdb1a7855c4520b4888bfdfb90d439ac2eb23946a6c4acfe6fd5
5
5
  SHA512:
6
- metadata.gz: 8919ffd26ae70dfc7752505abf9a06278fa774a9cb8e31df6698b466c0399fb7ced53560737f8bac7a07bd378e1388ae0a7a9d76a74fcf18282b70253bc67c95
7
- data.tar.gz: 6cfe197bffdc6064494d1de3267ab64e327ce2a57e7cef1b89a24990ea62f6bd6810cbc2bb4e8286ca8f4f421a2674f9576bea9e34576e339bd48eca57456cee
6
+ metadata.gz: 8954be18ac3ea3123f3d2bb9bfe69e535a3320a17e31bea8bc8470bd7fd8b640fadd127c39c1582b5d1e7e6a04decdac8b5bbf52ee7da5ea524c181b16941662
7
+ data.tar.gz: ec6c16b49f0f8d16364667407a19392100f4770e116d0f6935365f04bcd1edb9c8aad0655ab271e3146752167470774637385f7dae56883a6a08212e4c26121b
data/.circleci/config.yml CHANGED
@@ -108,8 +108,8 @@ jobs:
108
108
  - run:
109
109
  name: Rubocop Challenge
110
110
  command: |
111
- gem install -N rubocop_challenger
112
- rubocop_challenger go \
111
+ bundle install
112
+ bundle exec rubocop_challenger go \
113
113
  --email=ryz310@gmail.com \
114
114
  --name=ryz310 \
115
115
  --template=./lib/templates/checklist.md.erb \
@@ -160,9 +160,6 @@ workflows:
160
160
  branches:
161
161
  only:
162
162
  - production
163
- - rubocop_challenge:
164
- requires:
165
- - release
166
163
 
167
164
  challenge:
168
165
  triggers:
data/.rubocop_todo.yml CHANGED
@@ -1,19 +1,21 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2018-10-26 14:40:31 +0900 using RuboCop version 0.59.2.
3
+ # on 2018-10-28 11:16:18 +0900 using RuboCop version 0.60.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
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 1
9
+ # Offense count: 14
10
10
  # Cop supports --auto-correct.
11
- # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
12
- # SupportedStyles: space, no_space
13
- # SupportedStylesForEmptyBraces: space, no_space
14
- Layout/SpaceInsideBlockBraces:
11
+ # Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
12
+ # SupportedHashRocketStyles: key, separator, table
13
+ # SupportedColonStyles: key, separator, table
14
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
15
+ Layout/AlignHash:
15
16
  Exclude:
16
- - 'Gemfile'
17
+ - 'bin/create_release_pr'
18
+ - 'lib/rubocop_challenger/cli.rb'
17
19
 
18
20
  # Offense count: 7
19
21
  # Configuration parameters: CountComments, ExcludedMethods.
@@ -43,9 +45,9 @@ Style/Documentation:
43
45
 
44
46
  # Offense count: 1
45
47
  # Cop supports --auto-correct.
46
- Style/RedundantSelf:
48
+ Style/MutableConstant:
47
49
  Exclude:
48
- - 'lib/rubocop_challenger/rubocop/rule.rb'
50
+ - 'bin/create_release_pr'
49
51
 
50
52
  # Offense count: 7
51
53
  # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
data/Gemfile CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
5
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
6
 
7
7
  # Specify your gem's dependencies in rubocop_challenger.gemspec
8
8
  gemspec
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop_challenger (0.4.0)
4
+ rubocop_challenger (0.4.1)
5
5
  pr-daikou (~> 0.2.0)
6
6
  rubocop
7
7
  rubocop-rspec
@@ -36,14 +36,14 @@ GEM
36
36
  rspec-support (3.8.0)
37
37
  rspec_junit_formatter (0.4.1)
38
38
  rspec-core (>= 2, < 4, != 2.12.0)
39
- rubocop (0.59.2)
39
+ rubocop (0.60.0)
40
40
  jaro_winkler (~> 1.5.1)
41
41
  parallel (~> 1.10)
42
42
  parser (>= 2.5, != 2.5.1.1)
43
43
  powerpack (~> 0.1)
44
44
  rainbow (>= 2.2.2, < 4.0)
45
45
  ruby-progressbar (~> 1.7)
46
- unicode-display_width (~> 1.0, >= 1.0.1)
46
+ unicode-display_width (~> 1.4.0)
47
47
  rubocop-rspec (1.30.0)
48
48
  rubocop (>= 0.58.0)
49
49
  ruby-progressbar (1.10.0)
data/README.md CHANGED
@@ -15,7 +15,15 @@ I call such work *Rubocop Challenge*. And the *RubocopChallenger* is a gem to su
15
15
 
16
16
  ## Usage
17
17
 
18
- ### 1. Setting GitHub personal access token
18
+ ### 1. Edit your Gemfile
19
+
20
+ Put this line in your Gemfile.
21
+
22
+ ```rb
23
+ gem 'rubocop_challenger', group: :development, require: false
24
+ ```
25
+
26
+ ### 2. Setting GitHub personal access token
19
27
 
20
28
  GitHub personal access token is required for sending pull requests to your repository.
21
29
 
@@ -25,7 +33,7 @@ GitHub personal access token is required for sending pull requests to your repos
25
33
  1. Add an environment variable `GITHUB_ACCESS_TOKEN` with your GitHub personal access token
26
34
  ![circleci environment variables](images/circleci_environment_variables.png)
27
35
 
28
- ### 2. Configure .circleci/config.yml
36
+ ### 3. Configure .circleci/config.yml
29
37
 
30
38
  Configure your `.circleci/config.yml` to run rubocop_challenger, for example:
31
39
 
@@ -43,8 +51,8 @@ jobs:
43
51
  - run:
44
52
  name: Rubocop Challenge
45
53
  command: |
46
- gem install -N rubocop_challenger
47
- rubocop_challenger go \
54
+ bundle install
55
+ bundle exec rubocop_challenger go \
48
56
  --email=rubocop-challenge@example.com \
49
57
  --name="'Rubocop Challenge'"
50
58
 
@@ -28,7 +28,8 @@ module RubocopChallenger
28
28
  def verify_target_rule
29
29
  return unless target_rule.nil?
30
30
 
31
- raise 'There is no auto-correctable rule'
31
+ puts 'There is no auto-correctable rule'
32
+ exit
32
33
  end
33
34
 
34
35
  def target_rule
@@ -14,7 +14,7 @@ module RubocopChallenger
14
14
  end
15
15
 
16
16
  def <=>(other)
17
- self.offense_count <=> other.offense_count
17
+ offense_count <=> other.offense_count
18
18
  end
19
19
 
20
20
  def auto_correctable?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubocopChallenger
4
- VERSION = '0.4.0'
4
+ VERSION = '0.4.1'
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: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ryosuke_sato
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-26 00:00:00.000000000 Z
11
+ date: 2018-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pr-daikou