foodcritic 16.1.0 → 16.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/foodcritic/rules/fc123.rb +9 -6
- data/lib/foodcritic/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2f492e1a1f1d788d5c23228b3fc4c9048549457aae601e2ba422e7651ee7884
|
4
|
+
data.tar.gz: '08b38a9a0e6d3bf19eeae3e19824140d03f3cac2d8a4740edd05ac3865124a2d'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a70e5bc63c43158c9d32b587ee9bca3b2b68b06185a52ef35c733f8c4f85f61358f251cbed9f12b24871fd6e05823c70b616da9ae84b9e040a03598b3494a37e
|
7
|
+
data.tar.gz: f7116976e0a495cf6a14ad48d20a694ea60354d81ede77ac82bee86a2589df0b2fab041237474aeaa628b039c4b3cc5d61d22a1c94db6ae6d02e8daf8eff63fe
|
@@ -1,12 +1,15 @@
|
|
1
|
-
rule "FC123", "Content of
|
1
|
+
rule "FC123", "Content of a cookbook file is larger than 1MB" do
|
2
2
|
tags %w{files}
|
3
3
|
cookbook do |path|
|
4
4
|
values = []
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
files_path = File.join(path, "files")
|
6
|
+
if File.exist?(files_path)
|
7
|
+
Dir.foreach(files_path) do |file|
|
8
|
+
next if ['.', '..'].member?(file)
|
9
|
+
size = File.size(File.join(files_path,file))
|
10
|
+
if size > 1024*1024 # 1 megabyte
|
11
|
+
values += [file_match(File.join(files_path,file))]
|
12
|
+
end
|
10
13
|
end
|
11
14
|
end
|
12
15
|
values
|
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: 16.1.
|
4
|
+
version: 16.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Crump
|
@@ -325,5 +325,5 @@ requirements: []
|
|
325
325
|
rubygems_version: 3.0.3
|
326
326
|
signing_key:
|
327
327
|
specification_version: 4
|
328
|
-
summary: foodcritic-16.1.
|
328
|
+
summary: foodcritic-16.1.1
|
329
329
|
test_files: []
|