Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add metadata.rb, files and templates to foodcritic test sandbox.

  • Loading branch information...
commit 7c77959c5a00f2a55947bcf510f028d7e314cab5 1 parent e02372c
@fnichol authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 Rakefile
View
9 Rakefile
@@ -10,8 +10,7 @@ end
desc "Runs foodcritc linter"
task :foodcritic do
if Gem::Version.new("1.9.2") <= Gem::Version.new(RUBY_VERSION.dup)
- sandbox = File.expand_path(
- File.join(File.dirname(__FILE__), %w{tmp foodcritic cookbook}))
+ sandbox = File.join(File.dirname(__FILE__), %w{tmp foodcritic cookbook})
prepare_foodcritic_sandbox(sandbox)
sh "foodcritic --epic-fail any #{File.dirname(sandbox)}"
@@ -25,8 +24,10 @@ task :default => 'test'
private
def prepare_foodcritic_sandbox(sandbox)
+ files = %w{*.md *.rb attributes definitions files providers
+ recipes resources templates}
+
rm_rf sandbox
mkdir_p sandbox
- cp_r Dir.glob("{*.md,attributes,definitions,providers,recipes,resources}"),
- sandbox
+ cp_r Dir.glob("{#{files.join(',')}}"), sandbox
end
Please sign in to comment.
Something went wrong with that request. Please try again.