|
| 1 | +# Author:: Adam Jacob (<adam@opscode.com>) |
| 2 | +# Copyright:: Copyright (c) 2008 OpsCode, Inc. |
| 3 | +# License:: GNU General Public License version 2 or later |
| 4 | +# |
| 5 | +# This program and entire repository is free software; you can |
| 6 | +# redistribute it and/or modify it under the terms of the GNU |
| 7 | +# General Public License as published by the Free Software |
| 8 | +# Foundation; either version 2 of the License, or any later version. |
| 9 | +# |
| 10 | +# This program is distributed in the hope that it will be useful, |
| 11 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | +# GNU General Public License for more details. |
| 14 | +# |
| 15 | +# You should have received a copy of the GNU General Public License |
| 16 | +# along with this program; if not, write to the Free Software |
| 17 | +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 | +# |
| 19 | + |
| 20 | +$:.unshift(File.join(File.dirname(__FILE__), "..", "lib")) |
| 21 | + |
| 22 | +require 'chef' |
| 23 | + |
| 24 | +chef_lib_path = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib')) |
| 25 | +Dir[ |
| 26 | + File.expand_path( |
| 27 | + File.join( |
| 28 | + chef_lib_path, 'chef', '**', '*.rb' |
| 29 | + ) |
| 30 | + ) |
| 31 | +].sort.each do |lib| |
| 32 | + lib_short_path = lib.match("^#{chef_lib_path}#{File::SEPARATOR}(.+)$")[1] |
| 33 | + require lib_short_path |
| 34 | +end |
| 35 | +Dir[File.join(File.dirname(__FILE__), 'lib', '**', '*.rb')].sort.each { |lib| require lib } |
| 36 | + |
| 37 | +Chef::Config.log_level(:error) |
0 commit comments