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: ca12821e0df9ca7d7c620f48e171f23e2c898b6b968350a0ad7619435066b5f8
4
- data.tar.gz: 8b4579a061325b6f18cdde82c0c71b5eafadd6fe3e00a270e6f9a2e35bdf98db
3
+ metadata.gz: 5df24c11d8bf5c164338a1c8a09923d26e22f271e941c92aac427db0d3d2e783
4
+ data.tar.gz: f2d3dec0a5690ebb8badf4b4e3838c3d37b52dbe0481dd99da159b95ee47ab63
5
5
  SHA512:
6
- metadata.gz: 340fd574b3ee8340b81417aa28377551f54b09dd8ff907c1dbe6129c960ebb11d7875ecc982a0565acc906fb236a99f39075bcd1ed8865bdcbdae284712b17dc
7
- data.tar.gz: 75577a667d5aaee2ebda08500877f926281bb7451a0a5bd796a7f18d2f98667ed7f40c0b9fe2466dc3589cac03d5a6f6852ab81ab4fd6005b275877eda9f0755
6
+ metadata.gz: dde6690ed31dd37eeb8562f245564059c4621abf43fcbba4a57c0fc681c481a028f50b32557624186918afe8fb63dbcd4fa02a588aecff6ceb3e157c2f754e6f
7
+ data.tar.gz: 9ef1ea0f5d05ab1bf651dc3fdce3c5f39eecc374bf4454091c9fd4710ad0da54e09730228c7f1c40085947703471518c94e9d7efc0923549aca81a747097a370
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # ezcater_rubocop
2
2
 
3
+ ## v0.57.2
4
+ - Fix `Ezcater/RspecRequireHttpStatusMatcher` cop.
5
+
3
6
  ## v0.57.1
4
7
  - Add `Ezcater/RspecRequireHttpStatusMatcher` cop.
5
8
  - Enable `Rails/HttpStatus` cop and enforce symbols.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EzcaterRubocop
4
- VERSION = "0.57.1"
4
+ VERSION = "0.57.2.rc1"
5
5
  end
@@ -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 (int _)))
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 unless response_code_assertion(node)
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.1
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: '0'
174
+ version: 1.3.1
175
175
  requirements: []
176
176
  rubyforge_project:
177
177
  rubygems_version: 2.7.6