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 +4 -4
- data/README.md +6 -8
- data/config/default.yml +3 -3
- data/lib/rubocop/cask/version.rb +1 -1
- data/lib/rubocop/cop/cask/homepage_matches_url.rb +1 -1
- data/lib/rubocop/cop/cask/stanza_grouping.rb +1 -1
- data/lib/rubocop/cop/cask/stanza_order.rb +1 -1
- data/spec/rubocop/cop/cask/homepage_matches_url_spec.rb +2 -2
- data/spec/rubocop/cop/cask/homepage_url_trailing_slash_spec.rb +9 -0
- data/spec/spec_helper.rb +5 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e71739c6d9c001535648c6c6a2d039abb5b5b11
|
4
|
+
data.tar.gz: 03ecf1f97bb90e0f727f0dc09232c9f50d366761
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
[![
|
5
|
-
[![
|
6
|
-
[![
|
7
|
-
|
8
|
-
[
|
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/
|
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/
|
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/
|
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
|
data/lib/rubocop/cask/version.rb
CHANGED
@@ -12,7 +12,7 @@ module RuboCop
|
|
12
12
|
extend Forwardable
|
13
13
|
include CaskHelp
|
14
14
|
|
15
|
-
REFERENCE_URL = 'https://github.com/
|
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/
|
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/
|
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/
|
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/
|
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
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.
|
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-
|
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.
|
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.
|
40
|
+
version: 0.57.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|