inspecstyle 0.1.4 → 0.1.5

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: 0bb0e545b5334db0eea3a814b9a3c1c190faf6ed830283ae30e20d2ffca09d18
4
- data.tar.gz: '0926fd1659d8c3902c687f5b8316dc6871320e8ea4c123ba74fd170798d45728'
3
+ metadata.gz: bb076b244e5088e7e791398f5eb97c1e4605cfb1884f16926c77b950ff0227de
4
+ data.tar.gz: a5fa8c99dc4df14eb42e1af6af351e96cece0b8e3a38b06cad1b42cca7f9e124
5
5
  SHA512:
6
- metadata.gz: '0585d52d51d05c5962359ffc981547dc5b87e9561eec671c248833ee537ea29f207a9347d08bd8bf5802a585b1c6b275a365b43b0c8267afec1d7a6a960ce163'
7
- data.tar.gz: 93a55953bd3e49b2072eb9a85fd82230c2dbb8ce78b7b6cb84cd6a7c12cadaadc4cb87c85ba90874f9d8d0e1e6b8bb24939c494784e734b6a3edfa7e60b98995
6
+ metadata.gz: 0a2ff04f4194cae59aec606787a481529430883636c19d10324de5d45e579e842fe29ef5a8ecf2f67e6b61e2eb722d28bde84cc2c6ac073eebb8954fc16895ab
7
+ data.tar.gz: 3ced9b66232704943c40220b303ecefd7fd58d39b35c00d753d71f95e566ca9574dfff0bd8e7d60f3c2663503dafe1e88dc0d50bedec04555cb184960e30af90
@@ -40,11 +40,18 @@ module RuboCop
40
40
  (str ${"user" "password" "last_change" "expiry_date" "line"} ...) ...) ...) ...)
41
41
  PATTERN
42
42
 
43
- def on_send(node)
44
- return unless shadow_resource_user_property?(node)
45
- require 'pry'
46
- binding.pry
47
- add_offense(node)
43
+ def on_block(node)
44
+ return unless shadow_resource_user_property?(node) do |result|
45
+ require 'pry'
46
+ # binding.pry
47
+ add_offense(node, message: message(result))
48
+ end
49
+ end
50
+
51
+ private
52
+
53
+ def message(result)
54
+ MSG #
48
55
  end
49
56
  end
50
57
  end
@@ -1,5 +1,5 @@
1
1
  module RuboCop
2
2
  module InSpecStyle
3
- VERSION = "0.1.4"
3
+ VERSION = "0.1.5"
4
4
  end
5
5
  end
@@ -42,4 +42,7 @@ node = source.ast
42
42
  node.type
43
43
  node.children
44
44
  node.source
45
+ NodePattern.new('(send ...)').match(node) # => true
45
46
  ```
47
+
48
+ Correction docs at rubocop's: lib/rubocop/cop/corrector.rb
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inspecstyle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Schwaderer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-06-11 00:00:00.000000000 Z
11
+ date: 2020-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop