summaryrefslogtreecommitdiff
path: root/spec/data
diff options
context:
space:
mode:
authorMatt Veitas <mveitas@gmail.com>2014-03-09 16:25:58 -0400
committerBryan McLellan <btm@getchef.com>2014-03-28 16:16:47 -0700
commit6aff6124ccb37e267e1fa6ca68a2ad96f1bb63c0 (patch)
treeb2a724c9c18665660c48437cfb1cfd5d84199ca9 /spec/data
parent349a0ddab572720bb856afb27112670144c1de05 (diff)
downloadchef-6aff6124ccb37e267e1fa6ca68a2ad96f1bb63c0.tar.gz
CHEF-4203: Honor the chefignore file for knife cookbook test
In the case that a standalone cookbook exists that is using bundler, a large amount of gems can be added to the current directory. This commit reads the chefignore file and avoid having to scan through the ruby files that are in the bundler created gems directory.
Diffstat (limited to 'spec/data')
-rw-r--r--spec/data/standalone_cookbook/Gemfile1
-rw-r--r--spec/data/standalone_cookbook/chefignore9
-rw-r--r--spec/data/standalone_cookbook/recipes/default.rb3
-rw-r--r--spec/data/standalone_cookbook/vendor/bundle/ruby/2.0.0/gems/multi_json-1.9.0/lib/multi_json.rb1
4 files changed, 14 insertions, 0 deletions
diff --git a/spec/data/standalone_cookbook/Gemfile b/spec/data/standalone_cookbook/Gemfile
new file mode 100644
index 0000000000..9c961848d8
--- /dev/null
+++ b/spec/data/standalone_cookbook/Gemfile
@@ -0,0 +1 @@
+source "https://rubygems.org/" \ No newline at end of file
diff --git a/spec/data/standalone_cookbook/chefignore b/spec/data/standalone_cookbook/chefignore
new file mode 100644
index 0000000000..cd18e699c1
--- /dev/null
+++ b/spec/data/standalone_cookbook/chefignore
@@ -0,0 +1,9 @@
+#
+# The ignore file allows you to skip files in cookbooks with the same name that appear
+# later in the search path.
+#
+
+recipes/ignoreme.rb
+ # comments can be indented
+ignored
+vendor/bundle/*
diff --git a/spec/data/standalone_cookbook/recipes/default.rb b/spec/data/standalone_cookbook/recipes/default.rb
new file mode 100644
index 0000000000..c2fa53be32
--- /dev/null
+++ b/spec/data/standalone_cookbook/recipes/default.rb
@@ -0,0 +1,3 @@
+#
+# Nothing ot see here
+# \ No newline at end of file
diff --git a/spec/data/standalone_cookbook/vendor/bundle/ruby/2.0.0/gems/multi_json-1.9.0/lib/multi_json.rb b/spec/data/standalone_cookbook/vendor/bundle/ruby/2.0.0/gems/multi_json-1.9.0/lib/multi_json.rb
new file mode 100644
index 0000000000..3b992add1a
--- /dev/null
+++ b/spec/data/standalone_cookbook/vendor/bundle/ruby/2.0.0/gems/multi_json-1.9.0/lib/multi_json.rb
@@ -0,0 +1 @@
+# This is a dummy ruby file \ No newline at end of file