Skip to content

Commit d6d5769

Browse files
committed
no rubygems in lib/ && cleanup from previous commit
1 parent 55f3a1b commit d6d5769

8 files changed

Lines changed: 12 additions & 52 deletions

File tree

‎chef/bin/chef-client‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
# See the License for the specific language governing permissions and
1919
# limitations under the License.
2020

21-
$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
22-
2321
require 'rubygems'
22+
$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
23+
require 'chef'
2424
require 'chef/application/client'
2525

2626
Chef::Application::Client.new.run

‎chef/bin/chef-solo‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818
# See the License for the specific language governing permissions and
1919
# limitations under the License.
2020

21-
$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
22-
2321
require 'rubygems'
22+
$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
2423
require 'chef/application/solo'
2524

2625
Chef::Application::Solo.new.run

‎chef/bin/knife‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818
# See the License for the specific language governing permissions and
1919
# limitations under the License.
2020

21-
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")))
22-
2321
require 'rubygems'
22+
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")))
2423
require 'chef/application/knife'
2524

2625
Chef::Application::Knife.new.run

‎chef/bin/shef‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,8 @@ require "irb"
2626
require "irb/completion"
2727

2828
# TODO::EVIL
29-
begin
30-
require "#{File.dirname(__FILE__)}/../lib/chef"
31-
rescue LoadError
32-
# the bin got moved, e.g., by rubygems
33-
end
29+
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")))
30+
3431
require "chef/shef"
3532

3633
# dirty hack to make IRB initialize shef

‎chef/lib/chef.rb‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
# limitations under the License.
1717
#
1818

19-
#$:.unshift(File.dirname(__FILE__)) unless
20-
# $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
21-
22-
require 'rubygems'
2319
require 'extlib'
2420
require 'chef/exceptions'
2521
require 'chef/log'
@@ -30,15 +26,11 @@
3026
# CHEF489TODO keep this require?
3127
# require 'chef/mixins'
3228
require 'chef/compile'
33-
require 'chef/application'
34-
require 'chef/applications'
3529
require 'chef/daemon'
3630
require 'chef/runner'
3731
require 'chef/webui_user'
3832
require 'chef/openid_registration'
3933

40-
#Dir[File.join(File.dirname(__FILE__), 'chef/mixin/**/*.rb')].sort.each { |lib| require lib }
41-
4234
class Chef
4335
VERSION = "0.8.11"
4436
end

‎chef/lib/chef/application/server.rb‎

Lines changed: 0 additions & 19 deletions
This file was deleted.

‎chef/lib/chef/applications.rb‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
require 'chef/application/agent'
22
require 'chef/application/client'
33
require 'chef/application/knife'
4-
require 'chef/application/server'
54
require 'chef/application/solo'

‎chef/spec/spec_helper.rb‎

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,23 @@ module Shef
2222
IRB = nil unless defined? IRB
2323
end
2424

25+
require 'rubygems'
26+
2527
$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
26-
#$:.unshift(File.join(File.dirname(__FILE__), "..", "..", "chef-server", "lib"))
2728

2829
require 'chef'
2930
require 'chef/knife'
3031
Chef::Knife.load_commands
3132
require 'chef/mixins'
33+
require 'chef/application'
34+
require 'chef/applications'
35+
3236
require 'chef/shef'
3337
require 'chef/util/file_edit'
3438

35-
# chef_lib_path = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
36-
# Dir[
37-
# File.expand_path(
38-
# File.join(
39-
# chef_lib_path, 'chef', '**', '*.rb'
40-
# )
41-
# )
42-
# ].sort.each do |lib|
43-
# lib_short_path = lib.match("^#{chef_lib_path}#{File::SEPARATOR}(.+)$")[1]
44-
# require lib_short_path
45-
# end
4639

4740
Dir[File.join(File.dirname(__FILE__), 'lib', '**', '*.rb')].sort.each { |lib| require lib }
48-
#
41+
4942
Chef::Config[:log_level] = :fatal
5043
Chef::Config[:cache_type] = "Memory"
5144
Chef::Config[:cache_options] = { }

0 commit comments

Comments
 (0)