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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 93ee69cb3bda02db58d3d0a80d05777c8fbba9b2
4
- data.tar.gz: 629c266189384ea91ee6c0b49c4d2ae8ddfd5234
3
+ metadata.gz: 7d6e78ae374d9b9bb43976cd4095483e0210ba89
4
+ data.tar.gz: b5607d074e11f612320d4cb001ec2a8e21d46bb9
5
5
  SHA512:
6
- metadata.gz: cf0e65bf5b65523765923c60eac2f66eb4941f6d9e24a57d7221a7f034b82f1b178d09330d57afc0d1ceb5a40d98c838ec3c44c6982ee7538899e23d1881912e
7
- data.tar.gz: c673de132548bac8f80f9e39925cd1b408124a8838fe2b8e642a9a52a21d05199d0898d309cedde5a1b40126b3d149b6c1f591f74b91792f1f9ab98efb4df9fe
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
- alias_method :cask_node, :block_node
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, i2 = [s1, s2].map { |s| stanza_order_index(s) }
47
- if i1 != i2
48
- i1 - i2
49
- else
50
- i1, i2 = [s1, s2].map { |s| stanzas.index(s) }
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
- alias_method :stanza_node, :method_node
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
- alias_method :eql?, :==
54
+ alias eql? ==
55
55
 
56
56
  Constants::STANZA_ORDER.each do |stanza_name|
57
57
  class_eval <<-EOS, __FILE__, __LINE__
@@ -1,5 +1,5 @@
1
- module Astrolabe
2
- # Extensions for Astrolabe's AST Node class
1
+ module RuboCop
2
+ # Extensions for RuboCop's AST Node class
3
3
  class Node
4
4
  include RuboCop::Cask::Constants
5
5
 
@@ -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.3.1'
7
+ STRING = '0.4.0'
8
8
 
9
9
  def self.gem_version
10
10
  Gem::Version.new(STRING)
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/astrolabe/node'
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((cop_names).sort)
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
@@ -52,7 +52,7 @@ describe RuboCop::Cop::Cask::LicenseUnknownComment do
52
52
  severity: :convention,
53
53
  line: 2,
54
54
  column: 2,
55
- source: "#{license_unknown_comment}"
55
+ source: license_unknown_comment
56
56
  }]
57
57
  end
58
58
 
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.3.1
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-05 00:00:00.000000000 Z
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/astrolabe/node.rb
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