Permalink
Browse files

Allow path to puppet folder to be variable

  • Loading branch information...
jtopper committed Apr 26, 2012
1 parent 32e0ad8 commit 2f483c39370d10768bcde26c9c698b826a4b21fb
Showing with 8 additions and 4 deletions.
  1. +3 −1 Rakefile
  2. +5 −3 features/support/env.rb
View
@@ -2,9 +2,11 @@ require 'rubygems'
require 'cucumber'
require 'cucumber/rake/task'
+ENV['PUPPET_PATH'] ||= 'puppet'
+
def all_features
features = [ 'features/' ]
- features << Dir.glob('puppet/**/*.feature')
+ features << Dir.glob("#{ENV['PUPPET_PATH']}/**/*.feature")
features
end
View
@@ -26,9 +26,11 @@ def glob_to_vagrant_puppet_path( glob )
# Here be assumptions!
# Expecting to find a "puppet" directory in the path with the Vagrantfile and
-# Rakefile.
+# Rakefile (unless specified otherwise in the environment)
# Expecting to find directories under there which contain 'modules' and 'manifests'
# directories.
-$puppet_modulepath = glob_to_vagrant_puppet_path( 'puppet/*/modules' )
-$puppet_manifestdir = glob_to_vagrant_puppet_path( 'puppet/*/manifests' )
+ENV['PUPPET_PATH'] ||= 'puppet'
+
+$puppet_modulepath = glob_to_vagrant_puppet_path( "#{ENV['PUPPET_PATH']}/*/modules" )
+$puppet_manifestdir = glob_to_vagrant_puppet_path( "#{ENV['PUPPET_PATH']}/*/manifests" )

0 comments on commit 2f483c3

Please sign in to comment.