ezcater_rubocop 0.52.6 → 0.52.7

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
  SHA256:
3
- metadata.gz: 16127e410baceb0b52064cadf7167543c3eae96a88665feb765023478327a553
4
- data.tar.gz: c227adb07c6179481aff91e9171fc84c62e1ba8426829aea64f41cfb31f07eb7
3
+ metadata.gz: 539ee92b86a3440da6e5884eb0aaf1790c519b0ccd236a2e6826bdc47ed3db92
4
+ data.tar.gz: 0d566eb617de355309c2b84bc754874fb61a2c646a9aa5948aa3b07ecfa26b1f
5
5
  SHA512:
6
- metadata.gz: e5262a0cb2a0b35fe7f216f9c33ccf011c5654d6981c2b9faddd83fd9c52aad575dbde3d6b115e85ce7302f704a5dc15a5fab32d03b122fa6e47c71dda24144e
7
- data.tar.gz: 3c53917272aae7e3eb8cc9b0fa9ecc78c534470dc13204106797a0da7ab5b682008d16ca657b2a25bb9eacf3d07e09c0100f907bf1936803a434f13ce232687c
6
+ metadata.gz: 41f9a64c2b6d848ee5f93984fa46537d6950c9d1e904b4aab10fac0eb3f5232f6ed8ade686cf6fdec7ebaeb153309d12be93be88523b5288f31fe6e30af21efb
7
+ data.tar.gz: cc42c61dc7fa7daa73178de923b08f8d2e3e87346f602723724ecc83cdfa92777b9ef0bcedddd5fe8e15bb2105a9cedcd1df023373f555efc9462c36a8f90224
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # ezcater_rubocop
2
2
 
3
+ ## v0.52.7
4
+ - Enable `Style/FrozenStringLiteralComment` with the `when_needed` style.
5
+
3
6
  ## v0.52.6
4
7
  - Configure `Style/TrailingCommaInLiteral` with `consistent_comma` style.
5
8
 
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source "https://rubygems.org"
2
4
 
3
5
  git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require "English"
4
5
 
data/conf/rubocop.yml CHANGED
@@ -63,7 +63,8 @@ Style/EmptyLiteral:
63
63
  Enabled: false
64
64
 
65
65
  Style/FrozenStringLiteralComment:
66
- Enabled: false
66
+ Enabled: true
67
+ EnforcedStyle: when_needed
67
68
 
68
69
  Style/GuardClause:
69
70
  Enabled: false
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  lib = File.expand_path("../lib", __FILE__)
2
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
5
  require "ezcater_rubocop/version"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "ezcater_rubocop/version"
2
4
  require "rubocop-rspec"
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module EzcaterRubocop
2
- VERSION = "0.52.6".freeze
4
+ VERSION = "0.52.7"
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RuboCop
2
4
  module Cop
3
5
  module Ezcater
@@ -42,7 +44,7 @@ module RuboCop
42
44
 
43
45
  ACCESS_AFFECTED_METHODS = (ATTR_METHODS + %i(alias_method)).to_set.freeze
44
46
 
45
- MSG = "Use `%<visibility>s_%<method_name>s` instead".freeze
47
+ MSG = "Use `%<visibility>s_%<method_name>s` instead"
46
48
 
47
49
  def on_class(node)
48
50
  check_node(node.children[2]) # class body
@@ -1,9 +1,11 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RuboCop
2
4
  module Cop
3
5
  module Ezcater
4
6
  class RailsConfiguration < Cop
5
- MSG = "Use `Rails.configuration` instead of `Rails.application.config`.".freeze
6
- RAILS_CONFIGURATION = "Rails.configuration".freeze
7
+ MSG = "Use `Rails.configuration` instead of `Rails.application.config`."
8
+ RAILS_CONFIGURATION = "Rails.configuration"
7
9
 
8
10
  def_node_matcher "rails_application_config", <<-PATTERN
9
11
  (send (send (const _ :Rails) :application) :config)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RuboCop
2
4
  module Cop
3
5
  module Ezcater
@@ -18,7 +20,7 @@ module RuboCop
18
20
  # GraphQL::ExecutionError.new("An error occurred")
19
21
  # GraphQL::ExecutionError.new("You can't access this", options: { status_code: 401 })
20
22
  class RequireGqlErrorHelpers < Cop
21
- MSG = "Use the helpers provided by `GQLErrors` instead of raising `GraphQL::ExecutionError` directly.".freeze
23
+ MSG = "Use the helpers provided by `GQLErrors` instead of raising `GraphQL::ExecutionError` directly."
22
24
 
23
25
  def_node_matcher :graphql_const?, <<~PATTERN
24
26
  (const (const _ :GraphQL) :ExecutionError)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RuboCop
2
4
  module Cop
3
5
  module Ezcater
@@ -17,7 +19,7 @@ module RuboCop
17
19
  # end
18
20
  class RspecDotNotSelfDot < Cop
19
21
  SELF_DOT_REGEXP = /["']self\./
20
- MSG = 'Use ".<class method>" instead of "self.<class method>" for example group description.'.freeze
22
+ MSG = 'Use ".<class method>" instead of "self.<class method>" for example group description.'
21
23
 
22
24
  def_node_matcher :example_group_match, <<-PATTERN
23
25
  (send _ #{RuboCop::RSpec::Language::ExampleGroups::ALL.node_pattern_union} $_ ...)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RuboCop
2
4
  module Cop
3
5
  module Ezcater
@@ -13,9 +15,9 @@ module RuboCop
13
15
  # expect(foo).to eq([1, 2, 3])
14
16
  # expect(foo).to eq [1, 2, 3]
15
17
  class RspecMatchOrderedArray < Cop
16
- MATCH_ORDERED_ARRAY = "match_ordered_array".freeze
18
+ MATCH_ORDERED_ARRAY = "match_ordered_array"
17
19
  MSG = "Use the `match_ordered_array` matcher from ezcater_matchers gem "\
18
- "instead of `eq` when comparing collections".freeze
20
+ "instead of `eq` when comparing collections"
19
21
 
20
22
  def_node_matcher "eq_array", <<~PATTERN
21
23
  (send nil? :eq (array ...))
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RuboCop
2
4
  module Cop
3
5
  module Ezcater
@@ -18,7 +20,7 @@ module RuboCop
18
20
  # allow(Browser).to receive...
19
21
  # allow(EzBrowser).to receive...
20
22
  class RspecRequireBrowserMock < Cop
21
- MSG = "Use the mocks provided by `BrowserHelpers` instead of mocking `%<node_source>s`".freeze
23
+ MSG = "Use the mocks provided by `BrowserHelpers` instead of mocking `%<node_source>s`"
22
24
 
23
25
  def_node_matcher :browser_const?, <<~PATTERN
24
26
  (const _ {:Browser :EzBrowser})
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RuboCop
2
4
  module Cop
3
5
  module Ezcater
@@ -14,7 +16,7 @@ module RuboCop
14
16
  # allow(FeatureFlag).to receive(:is_active?).with("MyFeatureFlag").and_return(true)
15
17
  # allow(FeatureFlag).to receive(:is_active?).with("MyFeatureFlag", user: current_user).and_return(true)
16
18
  class RspecRequireFeatureFlagMock < Cop
17
- MSG = "Use the `mock_feature_flag` helper instead of mocking `allow(FeatureFlag)`".freeze
19
+ MSG = "Use the `mock_feature_flag` helper instead of mocking `allow(FeatureFlag)`"
18
20
 
19
21
  def_node_matcher :feature_flag_const?, <<~PATTERN
20
22
  (const _ :FeatureFlag)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RuboCop
2
4
  module Cop
3
5
  module Ezcater
@@ -19,7 +21,7 @@ module RuboCop
19
21
 
20
22
  minimum_target_ruby_version 2.3
21
23
 
22
- MSG = "Use `dig` for nested access.".freeze
24
+ MSG = "Use `dig` for nested access."
23
25
 
24
26
  def_node_matcher :nested_access_match, <<-PATTERN
25
27
  (send (send (send _receiver !:[]) :[] !{irange erange}) :[] !{irange erange})
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Monkey-patch SelectorSet to allow enumeration of selectors.
2
4
 
3
5
  module RuboCop
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ezcater_rubocop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.52.6
4
+ version: 0.52.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - ezCater, Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-02 00:00:00.000000000 Z
11
+ date: 2018-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler