rubocop-cask 0.19.0 → 0.20.0

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
  SHA1:
3
- metadata.gz: 9dab2598c25f48ea717b03ba6d09262f9b6af38a
4
- data.tar.gz: 9a542c482866387c48043a1f9d01f2b7eb337c74
3
+ metadata.gz: 4e71739c6d9c001535648c6c6a2d039abb5b5b11
4
+ data.tar.gz: 03ecf1f97bb90e0f727f0dc09232c9f50d366761
5
5
  SHA512:
6
- metadata.gz: af5fdb993e7a2e916d8f1b0cf24672bcb913ec2409801a5e7d6827bcbdedf6e5b2ddf88f893d8fa7d4dae10fd5db9fea531f1efa20cd7b65220ef95ce964a706
7
- data.tar.gz: ef857a14574aa8a459242f98114462432f6cb0d57a9d282a388831839210b5131cb0097452660079b69dde4c295eab7992692667b37ad77d3567b3ca62a4cee6
6
+ metadata.gz: f93e16e8048467cad96b499e936bb43a819272e5d2d32bb848aabab1245d9fa67cbad2db5a4234a27339965c8359d93ae748443f4a1259df62c3db5e7c96752a
7
+ data.tar.gz: 97eea4ef2ddc744a1d9c51c46f11bc4f2ef1dc0c94f98ad75955c7e75ba9bc335a0e5d0a0a8425b44cf979a67602937fe763925b9b182cbe1467bbef74b2ea2e
data/README.md CHANGED
@@ -1,14 +1,12 @@
1
1
  # RuboCop Cask
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/rubocop-cask.svg)](http://badge.fury.io/rb/rubocop-cask)
4
- [![Dependency Status](https://gemnasium.com/caskroom/rubocop-cask.svg)](https://gemnasium.com/caskroom/rubocop-cask)
5
- [![Build Status](https://travis-ci.org/caskroom/rubocop-cask.svg?branch=master)](https://travis-ci.org/caskroom/rubocop-cask)
6
- [![Coverage Status](https://img.shields.io/codeclimate/coverage/github/caskroom/rubocop-cask.svg)](https://codeclimate.com/github/caskroom/rubocop-cask)
7
- [![Code Climate](https://codeclimate.com/github/caskroom/rubocop-cask/badges/gpa.svg)](https://codeclimate.com/github/caskroom/rubocop-cask)
8
- [![Inline docs](http://inch-ci.org/github/caskroom/rubocop-cask.svg)](http://inch-ci.org/github/caskroom/rubocop-cask)
9
-
10
- Cask-specific analysis for your [Homebrew-Cask](https://github.com/caskroom/homebrew-cask) taps, as an extension to
11
- [RuboCop](https://github.com/bbatsov/rubocop). Heavily inspired by [`rubocop-rspec`](https://github.com/nevir/rubocop-rspec).
4
+ [![Build Status](https://travis-ci.org/Homebrew/rubocop-cask.svg?branch=master)](https://travis-ci.org/Homebrew/rubocop-cask)
5
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/977ef213ba6fb6c08022/test_coverage)](https://codeclimate.com/github/Homebrew/rubocop-cask/test_coverage)
6
+ [![Maintainability](https://api.codeclimate.com/v1/badges/977ef213ba6fb6c08022/maintainability)](https://codeclimate.com/github/Homebrew/rubocop-cask/maintainability)
7
+
8
+ Cask-specific analysis for your [Homebrew-Cask](https://github.com/Homebrew/homebrew-cask) taps, as an extension to
9
+ [RuboCop](https://github.com/bbatsov/rubocop). Heavily inspired by [`rubocop-rspec`](https://github.com/rubocop-rspec/rubocop-rspec).
12
10
 
13
11
  ## Installation
14
12
 
data/config/default.yml CHANGED
@@ -4,7 +4,7 @@ AllCops:
4
4
  # Cask Cops
5
5
 
6
6
  Cask/HomepageMatchesUrl:
7
- Description: 'Ensure that the homepage and url match, otherwise add a comment. More info at https://github.com/caskroom/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment'
7
+ Description: 'Ensure that the homepage and url match, otherwise add a comment. More info at https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment'
8
8
  Enabled: true
9
9
 
10
10
  Cask/HomepageUrlTrailingSlash:
@@ -16,11 +16,11 @@ Cask/NoDslVersion:
16
16
  Enabled: true
17
17
 
18
18
  Cask/StanzaGrouping:
19
- Description: 'Ensure that cask stanzas are grouped correctly. More info at https://github.com/caskroom/homebrew-cask/blob/master/CONTRIBUTING.md#stanza-order'
19
+ Description: 'Ensure that cask stanzas are grouped correctly. More info at https://github.com/Homebrew/homebrew-cask/blob/master/CONTRIBUTING.md#stanza-order'
20
20
  Enabled: true
21
21
 
22
22
  Cask/StanzaOrder:
23
- Description: 'Ensure that cask stanzas are sorted correctly. More info at https://github.com/caskroom/homebrew-cask/blob/master/CONTRIBUTING.md#stanza-order'
23
+ Description: 'Ensure that cask stanzas are sorted correctly. More info at https://github.com/Homebrew/homebrew-cask/blob/master/CONTRIBUTING.md#stanza-order'
24
24
  Enabled: true
25
25
 
26
26
  # Built-In Cops
@@ -3,6 +3,6 @@ require 'rubygems'
3
3
  module RuboCop
4
4
  module Cask
5
5
  # Version information for the Cask RuboCop plugin.
6
- VERSION = '0.19.0'.freeze
6
+ VERSION = '0.20.0'.freeze
7
7
  end
8
8
  end
@@ -12,7 +12,7 @@ module RuboCop
12
12
  extend Forwardable
13
13
  include CaskHelp
14
14
 
15
- REFERENCE_URL = 'https://github.com/caskroom/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment'.freeze
15
+ REFERENCE_URL = 'https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment'.freeze
16
16
 
17
17
  COMMENT_FORMAT = /# [^ ]+ was verified as official when first introduced to the cask/
18
18
 
@@ -4,7 +4,7 @@ module RuboCop
4
4
  module Cop
5
5
  module Cask
6
6
  # This cop checks that a cask's stanzas are grouped correctly.
7
- # See https://github.com/caskroom/homebrew-cask/blob/master/CONTRIBUTING.md#stanza-order
7
+ # See https://github.com/Homebrew/homebrew-cask/blob/master/CONTRIBUTING.md#stanza-order
8
8
  # for more info.
9
9
  class StanzaGrouping < Cop
10
10
  extend Forwardable
@@ -4,7 +4,7 @@ module RuboCop
4
4
  module Cop
5
5
  module Cask
6
6
  # This cop checks that a cask's stanzas are ordered correctly.
7
- # See https://github.com/caskroom/homebrew-cask/blob/master/CONTRIBUTING.md#stanza-order
7
+ # See https://github.com/Homebrew/homebrew-cask/blob/master/CONTRIBUTING.md#stanza-order
8
8
  # for more info.
9
9
  class StanzaOrder < Cop
10
10
  extend Forwardable
@@ -107,7 +107,7 @@ describe RuboCop::Cop::Cask::HomepageMatchesUrl do
107
107
  [{
108
108
  message: '`# example.com was verified as official` does not ' \
109
109
  'match the expected comment format. For details, see ' \
110
- 'https://github.com/caskroom/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment',
110
+ 'https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment',
111
111
  severity: :convention,
112
112
  line: 2,
113
113
  column: 2,
@@ -185,7 +185,7 @@ describe RuboCop::Cop::Cask::HomepageMatchesUrl do
185
185
  [{
186
186
  message: '`example.com` does not match `example.org`, a comment ' \
187
187
  'has to be added above the `url` stanza. For details, see ' \
188
- 'https://github.com/caskroom/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment',
188
+ 'https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment',
189
189
  severity: :convention,
190
190
  line: 2,
191
191
  column: 2,
@@ -36,6 +36,13 @@ describe RuboCop::Cop::Cask::HomepageUrlTrailingSlash do
36
36
  end
37
37
  CASK
38
38
  end
39
+ let(:correct_source) do
40
+ <<-CASK.undent
41
+ cask 'foo' do
42
+ homepage 'https://foo.example.com/'
43
+ end
44
+ CASK
45
+ end
39
46
  let(:expected_offenses) do
40
47
  [{
41
48
  message: "'https://foo.example.com' must have a slash "\
@@ -48,6 +55,8 @@ describe RuboCop::Cop::Cask::HomepageUrlTrailingSlash do
48
55
  end
49
56
 
50
57
  include_examples 'reports offenses'
58
+
59
+ include_examples 'autocorrects source'
51
60
  end
52
61
  end
53
62
  end
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,11 @@
1
1
  require 'rubocop'
2
2
  require 'rubocop/rspec/support'
3
3
 
4
+ if ENV['COVERAGE']
5
+ require 'simplecov'
6
+ SimpleCov.start
7
+ end
8
+
4
9
  project_path = File.join(File.dirname(__FILE__), '..')
5
10
  Dir["#{project_path}/spec/support/**/*.rb"].each { |f| require f }
6
11
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-cask
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Hagins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-17 00:00:00.000000000 Z
11
+ date: 2018-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: public_suffix
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.55.0
33
+ version: 0.57.2
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: 0.55.0
40
+ version: 0.57.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement