rubocop-cask 0.3.1 → 0.4.0
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 +4 -4
- data/lib/rubocop/cask/ast/cask_block.rb +7 -7
- data/lib/rubocop/cask/ast/stanza.rb +2 -2
- data/lib/rubocop/cask/extend/{astrolabe/node.rb → node.rb} +2 -2
- data/lib/rubocop/cask/version.rb +1 -1
- data/lib/rubocop-cask.rb +1 -1
- data/spec/project_spec.rb +1 -1
- data/spec/rubocop/cop/cask/license_unknown_comment_spec.rb +1 -1
- metadata +17 -4
- data/lib/rubocop/cop/cask/official_download_host_comment.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d6e78ae374d9b9bb43976cd4095483e0210ba89
|
4
|
+
data.tar.gz: b5607d074e11f612320d4cb001ec2a8e21d46bb9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00431a8517d5749a6b7879c38bd152f99e971af4deb698d49d8e7034c0c85558628a32f7db4f7502f242c64727e34fd619cde56df67dd68aac1125e584c23b77
|
7
|
+
data.tar.gz: 2ec4844850ff3bf570d8f29692e9f246a640915b7b24ebca1796919d88be809c8f4b81ea3c6ce4e776f015a3cddba33820a47108ddcee4d4458e2233675132a8
|
@@ -16,7 +16,7 @@ module RuboCop
|
|
16
16
|
|
17
17
|
attr_reader :block_node, :comments
|
18
18
|
|
19
|
-
|
19
|
+
alias cask_node block_node
|
20
20
|
|
21
21
|
def_delegator :cask_node, :block_body, :cask_body
|
22
22
|
|
@@ -43,13 +43,13 @@ module RuboCop
|
|
43
43
|
|
44
44
|
def sort_stanzas(stanzas)
|
45
45
|
stanzas.sort do |s1, s2|
|
46
|
-
i1
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
i1 - i2
|
46
|
+
i1 = stanza_order_index(s1)
|
47
|
+
i2 = stanza_order_index(s2)
|
48
|
+
if i1 == i2
|
49
|
+
i1 = stanzas.index(s1)
|
50
|
+
i2 = stanzas.index(s2)
|
52
51
|
end
|
52
|
+
i1 - i2
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
@@ -16,7 +16,7 @@ module RuboCop
|
|
16
16
|
|
17
17
|
attr_reader :method_node, :comments
|
18
18
|
|
19
|
-
|
19
|
+
alias stanza_node method_node
|
20
20
|
|
21
21
|
def_delegator :stanza_node, :method_name, :stanza_name
|
22
22
|
def_delegator :stanza_node, :parent, :parent_node
|
@@ -51,7 +51,7 @@ module RuboCop
|
|
51
51
|
self.class == other.class && stanza_node == other.stanza_node
|
52
52
|
end
|
53
53
|
|
54
|
-
|
54
|
+
alias eql? ==
|
55
55
|
|
56
56
|
Constants::STANZA_ORDER.each do |stanza_name|
|
57
57
|
class_eval <<-EOS, __FILE__, __LINE__
|
data/lib/rubocop/cask/version.rb
CHANGED
data/lib/rubocop-cask.rb
CHANGED
@@ -2,7 +2,7 @@ require 'rubocop'
|
|
2
2
|
|
3
3
|
require 'rubocop/cask/constants'
|
4
4
|
require 'rubocop/cask/extend/string'
|
5
|
-
require 'rubocop/cask/extend/
|
5
|
+
require 'rubocop/cask/extend/node'
|
6
6
|
require 'rubocop/cask/ast/cask_header'
|
7
7
|
require 'rubocop/cask/ast/cask_block'
|
8
8
|
require 'rubocop/cask/ast/stanza'
|
data/spec/project_spec.rb
CHANGED
@@ -16,7 +16,7 @@ describe 'RuboCop Project' do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
it 'has configuration for all cops' do
|
19
|
-
expect(default_config.keys.sort).to eq(
|
19
|
+
expect(default_config.keys.sort).to eq(cop_names.sort)
|
20
20
|
end
|
21
21
|
|
22
22
|
it 'has a nicely formatted description for all cops' do
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-cask
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.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: 2016-01-
|
11
|
+
date: 2016-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rubocop
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.36'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.36'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -43,14 +57,13 @@ files:
|
|
43
57
|
- lib/rubocop/cask/ast/cask_header.rb
|
44
58
|
- lib/rubocop/cask/ast/stanza.rb
|
45
59
|
- lib/rubocop/cask/constants.rb
|
46
|
-
- lib/rubocop/cask/extend/
|
60
|
+
- lib/rubocop/cask/extend/node.rb
|
47
61
|
- lib/rubocop/cask/extend/string.rb
|
48
62
|
- lib/rubocop/cask/inject.rb
|
49
63
|
- lib/rubocop/cask/version.rb
|
50
64
|
- lib/rubocop/cop/cask/license_unknown_comment.rb
|
51
65
|
- lib/rubocop/cop/cask/mixin/cask_help.rb
|
52
66
|
- lib/rubocop/cop/cask/no_dsl_version.rb
|
53
|
-
- lib/rubocop/cop/cask/official_download_host_comment.rb
|
54
67
|
- lib/rubocop/cop/cask/stanza_grouping.rb
|
55
68
|
- lib/rubocop/cop/cask/stanza_order.rb
|
56
69
|
- spec/project_spec.rb
|
File without changes
|