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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 88268f792552b22579c4aeb8bc24a33a8a6270864dfd3684694d7d008016cc23
4
- data.tar.gz: 6368014ea6d53878de4033f2826a76db1b40aa18cdfe95d1f3e7b4d8e8019250
3
+ metadata.gz: b2f492e1a1f1d788d5c23228b3fc4c9048549457aae601e2ba422e7651ee7884
4
+ data.tar.gz: '08b38a9a0e6d3bf19eeae3e19824140d03f3cac2d8a4740edd05ac3865124a2d'
5
5
  SHA512:
6
- metadata.gz: 373856d556ba3d1e8b7d75f13f4f7aa37965920cc1913e9225840a8ad24a3c7cb4b2087c6fa93b2dfe3b38a8df69c5d5a3c940639a14168e475f3292b4627e44
7
- data.tar.gz: 06eb84f6f4f546d04f8ab10160b5a4204cbeb121c038ea95267c6c9510d7515acfe6b3da3e86fa149883db40f0ca50de8c8d63aacad93fcd8df4b27735279e5b
6
+ metadata.gz: a70e5bc63c43158c9d32b587ee9bca3b2b68b06185a52ef35c733f8c4f85f61358f251cbed9f12b24871fd6e05823c70b616da9ae84b9e040a03598b3494a37e
7
+ data.tar.gz: f7116976e0a495cf6a14ad48d20a694ea60354d81ede77ac82bee86a2589df0b2fab041237474aeaa628b039c4b3cc5d61d22a1c94db6ae6d02e8daf8eff63fe
@@ -1,12 +1,15 @@
1
- rule "FC123", "Content of files/ is larger than 1MB" do
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
- Dir.foreach(File.join(path, "files")) do |file|
6
- next if ['.', '..'].member?(file)
7
- size = File.size(File.join(path,'files',file))
8
- if size > 1024*1024 # 1 megabyte
9
- values += [file_match(File.join(path,'files',file))]
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
@@ -1,4 +1,4 @@
1
1
  module FoodCritic
2
2
  # The current version of foodcritic
3
- VERSION = "16.1.0".freeze
3
+ VERSION = "16.1.1".freeze
4
4
  end
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.0
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.0
328
+ summary: foodcritic-16.1.1
329
329
  test_files: []