ezcater_rubocop 0.51.6 → 0.51.7
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e2a1bdcab04a0353b764ad4cfecb77c35ebc65ac49df668fa24bd6c7ed32e5c8
|
4
|
+
data.tar.gz: d4ff05f4c1a723c40c1d3c30e1f6456e7615c9955958f6ebb023b3389e111a51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5211b6b57816be4793f1f0f97198c13efca840bcca527591fa7dddbd3f69005f967f6dc603ea3a92300fe1ecfd6530a835ef973d94f3e18fea0e6cc5377b24f9
|
7
|
+
data.tar.gz: d40b7eb845eba51a1bbc84889a3df0bf5f6138c85979a329138a27f87de6fb05128c5860f8ae65d932b8faf0a37cd105cc938b5d5fb153703e71228b1fa79e3c
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -84,10 +84,10 @@ is updated.
|
|
84
84
|
## Custom Cops
|
85
85
|
1. [PrivateAttr](https://github.com/ezcater/ezcater_rubocop/blob/master/lib/rubocop/cop/ezcater/private_attr.rb) - Require methods from the `private_attr` gem.
|
86
86
|
1. [RailsConfiguration](https://github.com/ezcater/ezcater_rubocop/blob/master/lib/rubocop/cop/ezcater/rails_configuration.rb) - Enforce use of `Rails.configuration` instead of `Rails.application.config`.
|
87
|
+
1. [RequireGqlErrorHelpers](https://github.com/ezcater/ezcater_rubocop/blob/master/lib/rubocop/cop/ezcater/require_gql_error_helpers.rb) - Use the helpers provided by `GQLErrors` instead of raising `GraphQL::ExecutionError` directly.
|
87
88
|
1. [RspecDotNotSelfDot](https://github.com/ezcater/ezcater_rubocop/blob/master/lib/rubocop/cop/ezcater/rspec_dot_not_self_dot.rb) - Enforce ".<class method>" instead of "self.<class method>" for example group description.
|
88
89
|
1. [RspecRequireBrowserMock](https://github.com/ezcater/ezcater_rubocop/blob/master/lib/rubocop/cop/ezcater/rspec_require_browser_mock.rb) - Enforce use of `mock_ezcater_app`, `mock_chrome_browser` & `mock_custom_browser` helpers instead of mocking `Browser` or `EzBrowser` directly.
|
89
90
|
1. [RspecRequireFeatureFlagMock](https://github.com/ezcater/ezcater_rubocop/blob/master/lib/rubocop/cop/ezcater/rspec_require_feature_flag_mock.rb) - Enforce use of `mock_feature_flag` helper instead of mocking `FeatureFlag.is_active?` directly.
|
90
|
-
1. [RspecRequireGqlErrorHelpers](https://github.com/ezcater/ezcater_rubocop/blob/master/lib/rubocop/cop/ezcater/rspec_require_gql_error_helpers.rb) - Use the helpers provided by `GQLErrors` instead of raising `GraphQL::ExecutionError` directly.
|
91
91
|
1. [StyleDig](https://github.com/ezcater/ezcater_rubocop/blob/master/lib/rubocop/cop/ezcater/style_dig.rb) - Recommend `dig` for deeply nested access.
|
92
92
|
|
93
93
|
## Development
|
data/config/default.yml
CHANGED
@@ -24,7 +24,7 @@ Ezcater/RspecRequireFeatureFlagMock:
|
|
24
24
|
Include:
|
25
25
|
- '**/*_spec.rb'
|
26
26
|
|
27
|
-
Ezcater/
|
27
|
+
Ezcater/RequireGqlErrorHelpers:
|
28
28
|
Description: 'Use the helpers provided by `GQLErrors` instead of raising `GraphQL::ExecutionError` directly.'
|
29
29
|
Enabled: true
|
30
30
|
|
data/lib/ezcater_rubocop.rb
CHANGED
@@ -14,8 +14,8 @@ RuboCop::ConfigLoader.instance_variable_set(:@default_configuration, config)
|
|
14
14
|
|
15
15
|
require "rubocop/cop/ezcater/private_attr"
|
16
16
|
require "rubocop/cop/ezcater/rails_configuration"
|
17
|
+
require "rubocop/cop/ezcater/require_gql_error_helpers"
|
17
18
|
require "rubocop/cop/ezcater/rspec_require_browser_mock"
|
18
19
|
require "rubocop/cop/ezcater/rspec_require_feature_flag_mock"
|
19
|
-
require "rubocop/cop/ezcater/rspec_require_gql_error_helpers"
|
20
20
|
require "rubocop/cop/ezcater/rspec_dot_not_self_dot"
|
21
21
|
require "rubocop/cop/ezcater/style_dig"
|
data/lib/rubocop/cop/ezcater/{rspec_require_gql_error_helpers.rb → require_gql_error_helpers.rb}
RENAMED
@@ -17,7 +17,7 @@ module RuboCop
|
|
17
17
|
# # bad
|
18
18
|
# GraphQL::ExecutionError.new("An error occurred")
|
19
19
|
# GraphQL::ExecutionError.new("You can't access this", options: { status_code: 401 })
|
20
|
-
class
|
20
|
+
class RequireGqlErrorHelpers < Cop
|
21
21
|
MSG = "Use the helpers provided by `GQLErrors` instead of raising `GraphQL::ExecutionError` directly.".freeze
|
22
22
|
|
23
23
|
def_node_matcher :graphql_const?, <<~PATTERN
|
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.51.
|
4
|
+
version: 0.51.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-01-
|
11
|
+
date: 2018-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -129,10 +129,10 @@ files:
|
|
129
129
|
- lib/ezcater_rubocop/version.rb
|
130
130
|
- lib/rubocop/cop/ezcater/private_attr.rb
|
131
131
|
- lib/rubocop/cop/ezcater/rails_configuration.rb
|
132
|
+
- lib/rubocop/cop/ezcater/require_gql_error_helpers.rb
|
132
133
|
- lib/rubocop/cop/ezcater/rspec_dot_not_self_dot.rb
|
133
134
|
- lib/rubocop/cop/ezcater/rspec_require_browser_mock.rb
|
134
135
|
- lib/rubocop/cop/ezcater/rspec_require_feature_flag_mock.rb
|
135
|
-
- lib/rubocop/cop/ezcater/rspec_require_gql_error_helpers.rb
|
136
136
|
- lib/rubocop/cop/ezcater/style_dig.rb
|
137
137
|
- lib/rubocop/rspec/language/each_selector.rb
|
138
138
|
homepage: https://github.com/ezcater/ezcater_rubocop
|
@@ -156,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
156
|
version: '0'
|
157
157
|
requirements: []
|
158
158
|
rubyforge_project:
|
159
|
-
rubygems_version: 2.
|
159
|
+
rubygems_version: 2.7.4
|
160
160
|
signing_key:
|
161
161
|
specification_version: 4
|
162
162
|
summary: ezCater custom cops and shared configuration
|