foodcritic 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/foodcritic/rules.rb +10 -5
- data/lib/foodcritic/version.rb +1 -1
- metadata +4 -4
data/lib/foodcritic/rules.rb
CHANGED
|
@@ -402,13 +402,14 @@ end
|
|
|
402
402
|
|
|
403
403
|
rule "FC030", "Cookbook contains debugger breakpoints" do
|
|
404
404
|
tags %w{annoyances}
|
|
405
|
-
|
|
405
|
+
def pry_bindings(ast)
|
|
406
406
|
ast.xpath('//call[(vcall|var_ref)/ident/@value="binding"]
|
|
407
407
|
[ident/@value="pry"]')
|
|
408
408
|
end
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
409
|
+
recipe{|ast| pry_bindings(ast)}
|
|
410
|
+
library{|ast| pry_bindings(ast)}
|
|
411
|
+
metadata{|ast| pry_bindings(ast)}
|
|
412
|
+
template{|ast| pry_bindings(ast)}
|
|
412
413
|
end
|
|
413
414
|
|
|
414
415
|
rule "FC031", "Cookbook without metadata file" do
|
|
@@ -478,7 +479,11 @@ rule "FC037", "Invalid notification action" do
|
|
|
478
479
|
recipe do |ast|
|
|
479
480
|
find_resources(ast).select do |resource|
|
|
480
481
|
notifications(resource).any? do |n|
|
|
481
|
-
|
|
482
|
+
type = case n[:type]
|
|
483
|
+
when :notifies then n[:resource_type]
|
|
484
|
+
when :subscribes then resource_type(resource).to_sym
|
|
485
|
+
end
|
|
486
|
+
! resource_action?(type, n[:action])
|
|
482
487
|
end
|
|
483
488
|
end
|
|
484
489
|
end
|
data/lib/foodcritic/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: foodcritic
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.6.
|
|
4
|
+
version: 1.6.1
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-08-
|
|
12
|
+
date: 2012-08-30 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: gherkin
|
|
@@ -187,12 +187,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
187
187
|
version: '0'
|
|
188
188
|
segments:
|
|
189
189
|
- 0
|
|
190
|
-
hash: -
|
|
190
|
+
hash: -2527542643292755100
|
|
191
191
|
requirements: []
|
|
192
192
|
rubyforge_project:
|
|
193
193
|
rubygems_version: 1.8.19
|
|
194
194
|
signing_key:
|
|
195
195
|
specification_version: 3
|
|
196
|
-
summary: foodcritic-1.6.
|
|
196
|
+
summary: foodcritic-1.6.1
|
|
197
197
|
test_files: []
|
|
198
198
|
has_rdoc:
|