rubocop-grape 0.1.1 → 0.1.2

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: 3f369f405421b61d6ad373deee22453343db7c7d661953a3f9a8b3860b561f93
4
- data.tar.gz: db25749738766747e43c629bb9fe392759e5605adbb489a99120c217c4b5eb72
3
+ metadata.gz: bd6f622b828feeb370985d1d3c2bb9fd5d5e366dca5ced9f4232dc00bd69541f
4
+ data.tar.gz: 175d75a07c48e200de2417e4e951332a44c6bbd3f4cdeaef38cf025f6ab14c90
5
5
  SHA512:
6
- metadata.gz: 17a713bd89ecad8ed274fbdb64e8564c5661815cd15cb3d3199a0c846912f67a7beb4f041e5830fc70bb481e73a7303c0902abe8f7743a77211184586dcea7ef
7
- data.tar.gz: 8ee60612e5c0b86046496110477e5bcdf598a20954bdb912de5c28ec3c8a1f9bb88fed2fb5d86e35391f83b6420bfe0834b4a9adbaa0b3d1b646e1514088a831
6
+ metadata.gz: 6961acacaa6a7304899b852294f651e6aba4e9528f674756cdd0536d7384739a9bda2d928e7ef4c9b23dda30776ce020fa8f78bf98e5d5c5e9d599502d99a3d1
7
+ data.tar.gz: eb230658d3993d3c096a1e826096a4b7f6f00243a6b810a57c35d7b7a80d3ea6a3a5bc4f515e9d784e63d930710980d9e0ec2d6a5b7880bfd028d13599297a03
@@ -27,20 +27,20 @@ module RuboCop
27
27
  PATTERN
28
28
 
29
29
  def_node_matcher :http_method_node?, <<~PATTERN
30
- (block (send _ :get) ...)
30
+ (block (send _ {:get :post :put :patch :delete}) ...)
31
31
  PATTERN
32
32
 
33
33
  def on_block(node)
34
34
  return unless http_method_node?(node)
35
35
 
36
- collect_violationg_nodes(node).each(&method(:add_offense))
36
+ collect_violating_nodes(node).each(&method(:add_offense))
37
37
  end
38
38
 
39
- def collect_violationg_nodes(node, collector = [])
39
+ def collect_violating_nodes(node, collector = [])
40
40
  collector.push(node) if node.type == :block && params_block?(node)
41
41
 
42
42
  node.children.each do |descendant|
43
- collect_violationg_nodes(descendant, collector) if descendant.is_a?(Parser::AST::Node)
43
+ collect_violating_nodes(descendant, collector) if descendant.is_a?(Parser::AST::Node)
44
44
  end
45
45
 
46
46
  collector
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module Grape
5
- VERSION = '0.1.1'
5
+ VERSION = '0.1.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-grape
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akito Hikasa