rubocop-cask 0.10.6 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rubocop/cask/extend/node.rb +26 -24
- data/lib/rubocop/cask/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbaf42203ee69f23608c04ca5ea1716c1be38f99
|
4
|
+
data.tar.gz: c77fa91c8897a7ee2c25bc8183a6d16d7a65edd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3e31e4f8ea44916bf8246715f1a0fe002a71b9c52985c181b1fea3f22c4fe5e2009080bd2bb5dda85c21f91162d8785ae74584de74d511bb3626afd1d8d5165
|
7
|
+
data.tar.gz: 32cdd91d9c96411537cb117e7b5dc60cfe9ce687d02f728d22909a198cf3fa9b98660d28fa4291291205902d1adde499ea8d3669a23fb5d973b46c0119bcef3c
|
@@ -1,35 +1,37 @@
|
|
1
1
|
module RuboCop
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
module AST
|
3
|
+
# Extensions for RuboCop's AST Node class
|
4
|
+
class Node
|
5
|
+
include RuboCop::Cask::Constants
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
7
|
+
def_matcher :method_node, '{$(send ...) (block $(send ...) ...)}'
|
8
|
+
def_matcher :block_args, '(block _ $_ _)'
|
9
|
+
def_matcher :block_body, '(block _ _ $_)'
|
9
10
|
|
10
|
-
|
11
|
-
|
11
|
+
def_matcher :key_node, '{(pair $_ _) (hash (pair $_ _) ...)}'
|
12
|
+
def_matcher :val_node, '{(pair _ $_) (hash (pair _ $_) ...)}'
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
14
|
+
def cask_block?
|
15
|
+
block_type? && method_node.cask_header?
|
16
|
+
end
|
16
17
|
|
17
|
-
|
18
|
-
|
19
|
-
|
18
|
+
def cask_header?
|
19
|
+
send_type? && CASK_METHOD_NAMES.include?(method_name)
|
20
|
+
end
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
22
|
+
def stanza?
|
23
|
+
(send_type? || block_type?) && STANZA_ORDER.include?(method_name)
|
24
|
+
end
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
|
26
|
+
def heredoc?
|
27
|
+
loc.is_a?(Parser::Source::Map::Heredoc)
|
28
|
+
end
|
28
29
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
30
|
+
def expression
|
31
|
+
base_expression = loc.expression
|
32
|
+
descendants.select(&:heredoc?).reduce(base_expression) do |expr, node|
|
33
|
+
expr.join(node.loc.heredoc_end)
|
34
|
+
end
|
33
35
|
end
|
34
36
|
end
|
35
37
|
end
|
data/lib/rubocop/cask/version.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.11.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:
|
11
|
+
date: 2017-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: public_suffix
|
@@ -30,28 +30,28 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.47.1
|
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.47.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '1.
|
47
|
+
version: '1.14'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '1.
|
54
|
+
version: '1.14'
|
55
55
|
description: |2
|
56
56
|
Code style checking for Homebrew-Cask files.
|
57
57
|
A plugin for the RuboCop code style enforcing & linting tool.
|