rubocop-cask 0.6.0 → 0.6.1

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
  SHA1:
3
- metadata.gz: fde2ac4a0e0cef02e238de6a58d6a04db65e6656
4
- data.tar.gz: 67f97b33a965cb4dbafb4e1cdfb029a8425713e9
3
+ metadata.gz: fdf1590bc7ee295cab8d7d7b9935aaf60b6f12fa
4
+ data.tar.gz: 683d75e81a15b4996a314b235c80c7e00e8aa438
5
5
  SHA512:
6
- metadata.gz: c2c0ace1669319de7dc0890ad375614d35dadbb05be0ab4e430edf75929c77cc5be286a428ecb1a5acb5acdef89f32b0e8eb1a203aae2505922c25a2328afd88
7
- data.tar.gz: 74a4a37ecd7c0ed8505210a20ead7023d1855e38ff40c75dd341d96c8cdfd354ef78c8276d12e5fe5d0f5ad15c35fd050c007029db9578a15d2dd74a527e3938
6
+ metadata.gz: 76e6f815914c2b8f55d6a775b3524dbfae2b1e17273ff499ef3a7362a220839d01751fb203b4cd1f4d9605656705229da8c2983760e088e8b745017cbd6c927c
7
+ data.tar.gz: ec69d1c8baf993884abde7d64968dba4e0fef377ca8819548b8faaae4bdf635d1dae99b31b79d1601c338322243e561a08996e8636e8bce2847b3c14cd8012e1
@@ -44,7 +44,7 @@ module RuboCop
44
44
  end
45
45
 
46
46
  def toplevel_stanza?
47
- parent_node.parent.cask_block?
47
+ parent_node.cask_block? || parent_node.parent.cask_block?
48
48
  end
49
49
 
50
50
  def ==(other)
@@ -4,7 +4,7 @@ module RuboCop
4
4
  module Cask
5
5
  # Version information for the Cask RuboCop plugin.
6
6
  module Version
7
- STRING = '0.6.0'
7
+ STRING = '0.6.1'
8
8
 
9
9
  def self.gem_version
10
10
  Gem::Version.new(STRING)
@@ -9,6 +9,18 @@ describe RuboCop::Cop::Cask::StanzaGrouping do
9
9
  'stanzas within the same group should have no lines between them'
10
10
  end
11
11
 
12
+ context 'when there is only one stanza' do
13
+ let(:source) do
14
+ <<-CASK.undent
15
+ cask 'foo' do
16
+ version :latest
17
+ end
18
+ CASK
19
+ end
20
+
21
+ include_examples 'does not report any offenses'
22
+ end
23
+
12
24
  context 'when no stanzas are incorrectly grouped' do
13
25
  let(:source) do
14
26
  <<-CASK.undent
@@ -3,6 +3,18 @@ describe RuboCop::Cop::Cask::StanzaOrder do
3
3
 
4
4
  subject(:cop) { described_class.new }
5
5
 
6
+ context 'when there is only one stanza' do
7
+ let(:source) do
8
+ <<-CASK.undent
9
+ cask 'foo' do
10
+ version :latest
11
+ end
12
+ CASK
13
+ end
14
+
15
+ include_examples 'does not report any offenses'
16
+ end
17
+
6
18
  context 'when no stanzas are out of order' do
7
19
  let(:source) do
8
20
  <<-CASK.undent
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.6.0
4
+ version: 0.6.1
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-05-15 00:00:00.000000000 Z
11
+ date: 2016-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  version: '0'
92
92
  requirements: []
93
93
  rubyforge_project:
94
- rubygems_version: 2.5.1
94
+ rubygems_version: 2.6.4
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: Code style checking for Homebrew-Cask files