rubocop-cask 0.13.1 → 0.13.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 197d2dc9d4d55e422bbe3d50141e74c07a0f7fa2
4
- data.tar.gz: 4855faee3ce96a80535e9eb1e6ce07e41ac2a5ad
3
+ metadata.gz: 1e35cb45141219854be2f103929cca3c7cc5dd68
4
+ data.tar.gz: d5a858d92468080ff329af0ab01ddfce94be981e
5
5
  SHA512:
6
- metadata.gz: e515c01419676f84e597a6cf7614eca3e98b0010d02011c35e39bab5f04cb2c92a4331351d79672e1184eb04f3d35198ad0ed4b3a6da1499738cbda6518d2578
7
- data.tar.gz: d138379aa213e7c98c907a13428c06c69006fc79284991c8baaef6296904758d1c72e74c5ba372a2902c0f114fd2b6b1c3dcc0fc09bb0297d4b71fc2f142863a
6
+ metadata.gz: 3ff8f36c00b1ff154badc1bd56ff65eb9f9fa931d3f13027bb7e13c9a02acfec902027abea90c3d8415ea59f7b698a9b36090dec94ddac2817f95b0384a73844
7
+ data.tar.gz: 82a6e8f0dbf13e1ffed5f41095aae62990c7154daf1be1a8389ebf4de8d7a8fbd64713b4e6a64ecf30ede04f4fbad2369af52e69bc7b79ae43892cf3cb63eac6
data/README.md CHANGED
@@ -74,6 +74,17 @@ Cask/NoDslVersion:
74
74
  4. Push to the branch (`git push origin my-new-feature`)
75
75
  5. Create new Pull Request
76
76
 
77
+
78
+ ## Maintaining
79
+
80
+ To publish a new release:
81
+
82
+ 1. update the version in `lib/rubocop/cask/version.rb`
83
+ 2. run `bundle exec rake build` to run tests and generate the changelog
84
+ 3. commit the changes
85
+ 4. run `bundle exec rake release`
86
+
87
+
77
88
  ## License
78
89
 
79
90
  `rubocop-cask` is MIT licensed. [See the accompanying file](MIT-LICENSE.md) for
@@ -54,11 +54,11 @@ module RuboCop
54
54
  alias eql? ==
55
55
 
56
56
  Constants::STANZA_ORDER.each do |stanza_name|
57
- class_eval <<-EOS, __FILE__, __LINE__
57
+ class_eval <<-RUBY, __FILE__, __LINE__
58
58
  def #{stanza_name}?
59
59
  stanza_name == :#{stanza_name}
60
60
  end
61
- EOS
61
+ RUBY
62
62
  end
63
63
  end
64
64
  end
@@ -4,12 +4,12 @@ module RuboCop
4
4
  class Node
5
5
  include RuboCop::Cask::Constants
6
6
 
7
- def_matcher :method_node, '{$(send ...) (block $(send ...) ...)}'
8
- def_matcher :block_args, '(block _ $_ _)'
9
- def_matcher :block_body, '(block _ _ $_)'
7
+ def_node_matcher :method_node, '{$(send ...) (block $(send ...) ...)}'
8
+ def_node_matcher :block_args, '(block _ $_ _)'
9
+ def_node_matcher :block_body, '(block _ _ $_)'
10
10
 
11
- def_matcher :key_node, '{(pair $_ _) (hash (pair $_ _) ...)}'
12
- def_matcher :val_node, '{(pair _ $_) (hash (pair _ $_) ...)}'
11
+ def_node_matcher :key_node, '{(pair $_ _) (hash (pair $_ _) ...)}'
12
+ def_node_matcher :val_node, '{(pair _ $_) (hash (pair _ $_) ...)}'
13
13
 
14
14
  def cask_block?
15
15
  block_type? && method_node.cask_header?
@@ -3,6 +3,6 @@ require 'rubygems'
3
3
  module RuboCop
4
4
  module Cask
5
5
  # Version information for the Cask RuboCop plugin.
6
- VERSION = '0.13.1'.freeze
6
+ VERSION = '0.13.2'.freeze
7
7
  end
8
8
  end
@@ -12,7 +12,7 @@ module RuboCop
12
12
  MSG_NO_SLASH = "'%s' must have a slash after the domain.".freeze
13
13
 
14
14
  def on_homepage_stanza(stanza)
15
- url_node = stanza.stanza_node.method_args.first
15
+ url_node = stanza.stanza_node.first_argument
16
16
  url = url_node.str_content
17
17
 
18
18
  return if url !~ %r{^.+://[^/]+$}
@@ -154,7 +154,7 @@ describe RuboCop::Cop::Cask::StanzaOrder do
154
154
  end
155
155
 
156
156
  it 'preserves the original order' do
157
- expect_autocorrected_source(cop, source, correct_source)
157
+ expect_autocorrected_source(source, correct_source)
158
158
  end
159
159
  end
160
160
 
@@ -1,29 +1,29 @@
1
1
  module CopSharedExamples
2
2
  shared_examples 'does not report any offenses' do
3
3
  it 'does not report any offenses' do
4
- expect_no_offenses(cop, source)
4
+ expect_no_offenses(source)
5
5
  end
6
6
  end
7
7
 
8
8
  shared_examples 'reports offenses' do
9
9
  it 'reports offenses' do
10
- expect_reported_offenses(cop, source, expected_offenses)
10
+ expect_reported_offenses(source, expected_offenses)
11
11
  end
12
12
  end
13
13
 
14
14
  shared_examples 'autocorrects source' do
15
15
  it 'autocorrects source' do
16
- expect_autocorrected_source(cop, source, correct_source)
16
+ expect_autocorrected_source(source, correct_source)
17
17
  end
18
18
  end
19
19
 
20
- def expect_no_offenses(cop, source)
21
- inspect_source(cop, source)
20
+ def expect_no_offenses(source)
21
+ inspect_source(source)
22
22
  expect(cop.offenses).to be_empty
23
23
  end
24
24
 
25
- def expect_reported_offenses(cop, source, expected_offenses)
26
- inspect_source(cop, source)
25
+ def expect_reported_offenses(source, expected_offenses)
26
+ inspect_source(source)
27
27
  expect(cop.offenses.size).to eq(expected_offenses.size)
28
28
  expected_offenses.zip(cop.offenses).each do |expected, actual|
29
29
  expect_offense(expected, actual)
@@ -38,8 +38,8 @@ module CopSharedExamples
38
38
  expect(actual.location.source).to eq(expected[:source])
39
39
  end
40
40
 
41
- def expect_autocorrected_source(cop, source, correct_source)
42
- new_source = autocorrect_source(cop, source)
41
+ def expect_autocorrected_source(source, correct_source)
42
+ new_source = autocorrect_source(source)
43
43
  expect(new_source).to eq(Array(correct_source).join("\n"))
44
44
  end
45
45
  end
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.13.1
4
+ version: 0.13.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Hagins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-05 00:00:00.000000000 Z
11
+ date: 2017-09-22 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.49.1
33
+ version: 0.50.0
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.49.1
40
+ version: 0.50.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement