danger-shiphawk-plugin 1.0.4 → 1.0.5

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: c165ca2ae5ce55512c4701d1c9063f6d0cd17838aee898d9a2bbd77f5c6ceb0d
4
- data.tar.gz: f449d42f6d43f54448bfda81ba961251ff3057fc3c79b940ac2e16aa8a9654d9
3
+ metadata.gz: bcc0847f4844f1da75335311fa0ee2b5d3a7f465573084d92b6f73b8ab68ad9f
4
+ data.tar.gz: 92aba600565c9a11c3c13e52a56d79c09b34a888192a8f297c73230bcd3d1b91
5
5
  SHA512:
6
- metadata.gz: 59ccff3aae2338fa76c7239e5558d59b902f9ce8c0ccd1d3d9094bd7d807286a8acbbe6b47bf3e8d6770339dc3709b39b36224535bd717e104977d1f8cc5e242
7
- data.tar.gz: 2de47e18ef3c871a0fd8a7d7f0682caae8f8f5bc52cf9658679703aa4a1ff9fe233eb21e91c232a8f353c3593724ba291776be6b5600460a51e31c243f5977d5
6
+ metadata.gz: 99a55d064dad0a1ded2bfe8cc4060c8c105591081ab437444e38877a06dd9c5ff8ffd02328d1ff19b85fda871099482ca880659f2ef11bdf26eef6bceb3585be
7
+ data.tar.gz: 708c4380c7741c99b3094532a9bda3892e3571e61ee9260268aa005198e43af40395dae1913762b4e2a1b1b606dda9cd4c6a1c1ae2bccb33e0c3958dc514b2a0
data/README.md CHANGED
@@ -22,7 +22,7 @@ The following keys are supported:
22
22
  * `files: 'all'` ('all' | 'diff') Files to lint
23
23
  * `config: nil` Path to the config `.rubocop.yml` file
24
24
  * `limit_of_warnings: 10` (Number) Count of offenses that should be displayed
25
- * `autofix_count: 30` (Number) Rubocop auto-fix will appear when errors count less then this number
25
+ * `autofix_hint_threshold: 0` (Number) Rubocop auto-fix message will appear when errors count more then this number
26
26
 
27
27
  ## License:
28
28
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -33,5 +33,5 @@ Then create new version of a gem:
33
33
 
34
34
  ```
35
35
  gem build danger-shiphawk-plugin.gemspec
36
- gem push danger-shiphawk-plugin-xxx.gem
36
+ gem push danger-shiphawk-plugin-1.0.4.gem
37
37
  ```
data/lib/danger_plugin.rb CHANGED
@@ -24,7 +24,7 @@ module Danger
24
24
  @files = options.fetch(:files, 'all')
25
25
  @config = options.fetch(:config, nil)
26
26
  @limit_of_warnings = options.fetch(:limit_of_warnings, 10)
27
- @autofix_count = options.fetch(:autofix_count, 30)
27
+ @autofix_hint_threshold = options.fetch(:autofix_hint_threshold, 0)
28
28
 
29
29
  return if offenses.empty?
30
30
 
@@ -62,7 +62,8 @@ module Danger
62
62
  end
63
63
 
64
64
  def rubocop
65
- command = ['rubocop']
65
+ command = ['bundle', 'exec']
66
+ command += ['rubocop']
66
67
  command += ['--format', 'json']
67
68
  command += ['--config', @config.shellescape] if @config
68
69
 
@@ -84,7 +85,7 @@ module Danger
84
85
 
85
86
  def message_autofix
86
87
  return if offenses.empty?
87
- return if offenses.size > @autofix_count
88
+ return if @autofix_hint_threshold > offenses.size
88
89
 
89
90
  msg = '## Please fix rubocop mistakes: `rubocop --auto-correct`'
90
91
  print_message(msg, :fail)
data/lib/version.rb CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Danger
4
4
  module ShipHawkPlugin
5
- VERSION = '1.0.4'
5
+ VERSION = '1.0.5'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger-shiphawk-plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - ShipHawk Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-23 00:00:00.000000000 Z
11
+ date: 2019-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: danger
@@ -25,19 +25,19 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rubocop-shiphawk
28
+ name: rubocop
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '1'
33
+ version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '1'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement