ezcater_rubocop 0.57.1 → 0.57.2.rc1
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5df24c11d8bf5c164338a1c8a09923d26e22f271e941c92aac427db0d3d2e783
|
4
|
+
data.tar.gz: f2d3dec0a5690ebb8badf4b4e3838c3d37b52dbe0481dd99da159b95ee47ab63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dde6690ed31dd37eeb8562f245564059c4621abf43fcbba4a57c0fc681c481a028f50b32557624186918afe8fb63dbcd4fa02a588aecff6ceb3e157c2f754e6f
|
7
|
+
data.tar.gz: 9ef1ea0f5d05ab1bf651dc3fdce3c5f39eecc374bf4454091c9fd4710ad0da54e09730228c7f1c40085947703471518c94e9d7efc0923549aca81a747097a370
|
data/CHANGELOG.md
CHANGED
@@ -18,12 +18,16 @@ module RuboCop
|
|
18
18
|
MSG = "Use the `have_http_status` matcher, like `expect(response).to have_http_status :bad_request`, "\
|
19
19
|
"rather than `%<node_source>s`"
|
20
20
|
|
21
|
+
def_node_matcher :response_status_assertion, <<~PATTERN
|
22
|
+
(send (send _ :expect (send (send _ :response) :status)) :to (send _ :eq (int _)))
|
23
|
+
PATTERN
|
24
|
+
|
21
25
|
def_node_matcher :response_code_assertion, <<~PATTERN
|
22
|
-
(send (send _ :expect (send (send _ :response) :code)) :to (send _ :eq (
|
26
|
+
(send (send _ :expect (send (send _ :response) :code)) :to (send _ :eq (str _)))
|
23
27
|
PATTERN
|
24
28
|
|
25
29
|
def on_send(node)
|
26
|
-
return
|
30
|
+
return if !response_status_assertion(node) && !response_code_assertion(node)
|
27
31
|
|
28
32
|
add_offense(node,
|
29
33
|
location: :expression,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ezcater_rubocop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.57.
|
4
|
+
version: 0.57.2.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ezCater, Inc
|
@@ -169,9 +169,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
169
169
|
version: '0'
|
170
170
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
171
171
|
requirements:
|
172
|
-
- - "
|
172
|
+
- - ">"
|
173
173
|
- !ruby/object:Gem::Version
|
174
|
-
version:
|
174
|
+
version: 1.3.1
|
175
175
|
requirements: []
|
176
176
|
rubyforge_project:
|
177
177
|
rubygems_version: 2.7.6
|