ezcater_rubocop 0.52.6 → 0.52.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile +2 -0
- data/bin/circle_rubocop.rb +1 -0
- data/conf/rubocop.yml +2 -1
- data/ezcater_rubocop.gemspec +2 -0
- data/lib/ezcater_rubocop.rb +2 -0
- data/lib/ezcater_rubocop/version.rb +3 -1
- data/lib/rubocop/cop/ezcater/private_attr.rb +3 -1
- data/lib/rubocop/cop/ezcater/rails_configuration.rb +4 -2
- data/lib/rubocop/cop/ezcater/require_gql_error_helpers.rb +3 -1
- data/lib/rubocop/cop/ezcater/rspec_dot_not_self_dot.rb +3 -1
- data/lib/rubocop/cop/ezcater/rspec_match_ordered_array.rb +4 -2
- data/lib/rubocop/cop/ezcater/rspec_require_browser_mock.rb +3 -1
- data/lib/rubocop/cop/ezcater/rspec_require_feature_flag_mock.rb +3 -1
- data/lib/rubocop/cop/ezcater/style_dig.rb +3 -1
- data/lib/rubocop/rspec/language/each_selector.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 539ee92b86a3440da6e5884eb0aaf1790c519b0ccd236a2e6826bdc47ed3db92
|
4
|
+
data.tar.gz: 0d566eb617de355309c2b84bc754874fb61a2c646a9aa5948aa3b07ecfa26b1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41f9a64c2b6d848ee5f93984fa46537d6950c9d1e904b4aab10fac0eb3f5232f6ed8ade686cf6fdec7ebaeb153309d12be93be88523b5288f31fe6e30af21efb
|
7
|
+
data.tar.gz: cc42c61dc7fa7daa73178de923b08f8d2e3e87346f602723724ecc83cdfa92777b9ef0bcedddd5fe8e15bb2105a9cedcd1df023373f555efc9462c36a8f90224
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/bin/circle_rubocop.rb
CHANGED
data/conf/rubocop.yml
CHANGED
data/ezcater_rubocop.gemspec
CHANGED
data/lib/ezcater_rubocop.rb
CHANGED
@@ -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"
|
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`."
|
6
|
-
RAILS_CONFIGURATION = "Rails.configuration"
|
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."
|
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.'
|
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"
|
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"
|
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`"
|
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)`"
|
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."
|
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})
|
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.
|
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-
|
11
|
+
date: 2018-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|