chef-server 0.8.16 → 0.9.0.a90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +9 -116
- data/Rakefile +50 -0
- data/lib/chef-server.rb +20 -0
- data/lib/chef-server/version.rb +21 -0
- metadata +42 -136
- data/app/controllers/application.rb +0 -2
- data/app/helpers/global_helpers.rb +0 -5
- data/app/views/exceptions/not_acceptable.html.erb +0 -63
- data/app/views/exceptions/not_found.html.erb +0 -47
- data/app/views/layout/application.html.erb +0 -12
- data/bin/chef-server +0 -77
- data/bin/chef-server-webui +0 -72
- data/config-webui.ru +0 -25
- data/config.ru +0 -21
- data/config/dependencies-webui.rb +0 -27
- data/config/dependencies.rb +0 -24
- data/config/environments/development.rb +0 -13
- data/config/environments/production.rb +0 -10
- data/config/environments/rake.rb +0 -10
- data/config/environments/staging.rb +0 -10
- data/config/environments/test.rb +0 -13
- data/config/init-webui.rb +0 -34
- data/config/init.rb +0 -30
- data/config/rack.rb +0 -21
- data/config/router.rb +0 -39
- data/lib/tasks/install.rake +0 -7
- data/lib/tasks/package.rake +0 -34
- data/lib/tasks/uninstall.rake +0 -7
- data/lib/views/exceptions/bad_request.html.haml +0 -2
- data/public/favicon.ico +0 -0
- data/public/images/merb.jpg +0 -0
- data/public/javascripts/application.js +0 -1
- data/public/javascripts/jquery.js +0 -19
- data/public/merb.fcgi +0 -22
- data/public/robots.txt +0 -5
- data/public/stylesheets/master.css +0 -119
@@ -1,63 +0,0 @@
|
|
1
|
-
<div id="container">
|
2
|
-
<div id="header-container">
|
3
|
-
<img src="/images/merb.jpg" />
|
4
|
-
<!-- <h1>Mongrel + Erb</h1> -->
|
5
|
-
<h2>pocket rocket web framework</h2>
|
6
|
-
<hr />
|
7
|
-
</div>
|
8
|
-
|
9
|
-
<div id="left-container">
|
10
|
-
<h3>Exception:</h3>
|
11
|
-
<p><%= request.exceptions.first.message %></p>
|
12
|
-
</div>
|
13
|
-
|
14
|
-
<div id="main-container">
|
15
|
-
<h3>Why am I seeing this page?</h3>
|
16
|
-
<p>Merb couldn't find an appropriate content_type to return,
|
17
|
-
based on what you said was available via provides() and
|
18
|
-
what the client requested.</p>
|
19
|
-
|
20
|
-
<h3>How to add a mime-type</h3>
|
21
|
-
<pre><code>
|
22
|
-
Merb.add_mime_type :pdf, :to_pdf, %w[application/pdf], "Content-Encoding" => "gzip"
|
23
|
-
</code></pre>
|
24
|
-
<h3>What this means is:</h3>
|
25
|
-
<ul>
|
26
|
-
<li>Add a mime-type for :pdf</li>
|
27
|
-
<li>Register the method for converting objects to PDF as <code>#to_pdf</code>.</li>
|
28
|
-
<li>Register the incoming mime-type "Accept" header as <code>application/pdf</code>.</li>
|
29
|
-
<li>Specify a new header for PDF types so it will set <code>Content-Encoding</code> to gzip.</li>
|
30
|
-
</ul>
|
31
|
-
|
32
|
-
<h3>You can then do:</h3>
|
33
|
-
<pre><code>
|
34
|
-
class Foo < Application
|
35
|
-
provides :pdf
|
36
|
-
end
|
37
|
-
</code></pre>
|
38
|
-
|
39
|
-
<h3>Where can I find help?</h3>
|
40
|
-
<p>If you have any questions or if you can't figure something out, please take a
|
41
|
-
look at our <a href="http://merbivore.com/"> project page</a>,
|
42
|
-
feel free to come chat at irc.freenode.net, channel #merb,
|
43
|
-
or post to <a href="http://groups.google.com/group/merb">merb mailing list</a>
|
44
|
-
on Google Groups.</p>
|
45
|
-
|
46
|
-
<h3>What if I've found a bug?</h3>
|
47
|
-
<p>If you want to file a bug or make your own contribution to Merb,
|
48
|
-
feel free to register and create a ticket at our
|
49
|
-
<a href="http://merb.lighthouseapp.com/">project development page</a>
|
50
|
-
on Lighthouse.</p>
|
51
|
-
|
52
|
-
<h3>How do I edit this page?</h3>
|
53
|
-
<p>You can change what people see when this happens by editing <tt>app/views/exceptions/not_acceptable.html.erb</tt>.</p>
|
54
|
-
|
55
|
-
</div>
|
56
|
-
|
57
|
-
<div id="footer-container">
|
58
|
-
<hr />
|
59
|
-
<div class="left"></div>
|
60
|
-
<div class="right">© 2008 the merb dev team</div>
|
61
|
-
<p> </p>
|
62
|
-
</div>
|
63
|
-
</div>
|
@@ -1,47 +0,0 @@
|
|
1
|
-
<div id="container">
|
2
|
-
<div id="header-container">
|
3
|
-
<img src="/images/merb.jpg" />
|
4
|
-
<!-- <h1>Mongrel + Erb</h1> -->
|
5
|
-
<h2>pocket rocket web framework</h2>
|
6
|
-
<hr />
|
7
|
-
</div>
|
8
|
-
|
9
|
-
<div id="left-container">
|
10
|
-
<h3>Exception:</h3>
|
11
|
-
<p><%= request.exceptions.first.message %></p>
|
12
|
-
</div>
|
13
|
-
|
14
|
-
<div id="main-container">
|
15
|
-
<h3>Welcome to Merb!</h3>
|
16
|
-
<p>Merb is a light-weight MVC framework written in Ruby. We hope you enjoy it.</p>
|
17
|
-
|
18
|
-
<h3>Where can I find help?</h3>
|
19
|
-
<p>If you have any questions or if you can't figure something out, please take a
|
20
|
-
look at our <a href="http://merbivore.com/"> project page</a>,
|
21
|
-
feel free to come chat at irc.freenode.net, channel #merb,
|
22
|
-
or post to <a href="http://groups.google.com/group/merb">merb mailing list</a>
|
23
|
-
on Google Groups.</p>
|
24
|
-
|
25
|
-
<h3>What if I've found a bug?</h3>
|
26
|
-
<p>If you want to file a bug or make your own contribution to Merb,
|
27
|
-
feel free to register and create a ticket at our
|
28
|
-
<a href="http://merb.lighthouseapp.com/">project development page</a>
|
29
|
-
on Lighthouse.</p>
|
30
|
-
|
31
|
-
<h3>How do I edit this page?</h3>
|
32
|
-
<p>You're seeing this page because you need to edit the following files:
|
33
|
-
<ul>
|
34
|
-
<li>config/router.rb <strong><em>(recommended)</em></strong></li>
|
35
|
-
<li>app/views/exceptions/not_found.html.erb <strong><em>(recommended)</em></strong></li>
|
36
|
-
<li>app/views/layout/application.html.erb <strong><em>(change this layout)</em></strong></li>
|
37
|
-
</ul>
|
38
|
-
</p>
|
39
|
-
</div>
|
40
|
-
|
41
|
-
<div id="footer-container">
|
42
|
-
<hr />
|
43
|
-
<div class="left"></div>
|
44
|
-
<div class="right">© 2008 the merb dev team</div>
|
45
|
-
<p> </p>
|
46
|
-
</div>
|
47
|
-
</div>
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us">
|
3
|
-
<head>
|
4
|
-
<title>Fresh Merb App</title>
|
5
|
-
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
6
|
-
<link rel="stylesheet" href="/stylesheets/master.css" type="text/css" media="screen" charset="utf-8" />
|
7
|
-
</head>
|
8
|
-
<body>
|
9
|
-
<%#= message[:notice] %>
|
10
|
-
<%= catch_content :for_layout %>
|
11
|
-
</body>
|
12
|
-
</html>
|
data/bin/chef-server
DELETED
@@ -1,77 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# ./chef-server - Serving up piping hot infrastructure!
|
4
|
-
#
|
5
|
-
# Author:: Adam Jacob (<adam@opscode.com>)
|
6
|
-
# Copyright:: Copyright (c) 2008 Opscode, Inc.
|
7
|
-
# License:: Apache License, Version 2.0
|
8
|
-
#
|
9
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
10
|
-
# you may not use this file except in compliance with the License.
|
11
|
-
# You may obtain a copy of the License at
|
12
|
-
#
|
13
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
14
|
-
#
|
15
|
-
# Unless required by applicable law or agreed to in writing, software
|
16
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
17
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
18
|
-
# See the License for the specific language governing permissions and
|
19
|
-
# limitations under the License.
|
20
|
-
|
21
|
-
# Based on the 'merb' command, by Ezra
|
22
|
-
|
23
|
-
# Add chef and chef-server-slice lib dirs to the load path
|
24
|
-
# Load chef and chef-server slice from source rather than gem, if present
|
25
|
-
|
26
|
-
require "rubygems"
|
27
|
-
require "merb-core"
|
28
|
-
|
29
|
-
CHEF_SERVER_VERSION = "0.8.16"
|
30
|
-
|
31
|
-
[ 'chef', 'chef-server-api' ].each do |lib|
|
32
|
-
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "lib")))
|
33
|
-
library = File.expand_path(File.join(File.dirname(__FILE__), "..", "..", lib, "lib", "#{lib}.rb"))
|
34
|
-
require library if File.exists?(library)
|
35
|
-
end
|
36
|
-
|
37
|
-
# Ensure the chef gem we load is the same version as the chef server
|
38
|
-
unless defined?(Chef)
|
39
|
-
gem "chef", "=" + CHEF_SERVER_VERSION
|
40
|
-
require 'chef'
|
41
|
-
end
|
42
|
-
|
43
|
-
Dir.chdir File.join(File.dirname(__FILE__),"..")
|
44
|
-
__DIR__ = Dir.getwd
|
45
|
-
|
46
|
-
if ARGV[0] && ARGV[0] =~ /^[^-]/
|
47
|
-
ARGV.push "-H"
|
48
|
-
end
|
49
|
-
unless %w[-a --adapter -i --irb-console -r --script-runner].any? { |o| ARGV.index(o) }
|
50
|
-
ARGV.push *%w[-a thin]
|
51
|
-
end
|
52
|
-
ARGV.push *[ "-I", File.join(__DIR__, "config", "init.rb") ]
|
53
|
-
ARGV.push *[ "-m", __DIR__]
|
54
|
-
|
55
|
-
# attempt to find the user and group that this process will become. Fixes CHEF-1015
|
56
|
-
if (index = ARGV.index("-u"))
|
57
|
-
Chef::Config[:signing_ca_user] = ARGV[index+1]
|
58
|
-
end
|
59
|
-
if (index = ARGV.index("-G"))
|
60
|
-
Chef::Config[:signing_ca_group] = ARGV[index+1]
|
61
|
-
end
|
62
|
-
|
63
|
-
if index = ARGV.index("-C")
|
64
|
-
config = ARGV[index+1]
|
65
|
-
ARGV.delete("-C")
|
66
|
-
ARGV.delete(config)
|
67
|
-
Chef::Config.from_file(File.expand_path(config))
|
68
|
-
else
|
69
|
-
Chef::Config.from_file(
|
70
|
-
File.join("/etc", "chef", "server.rb")
|
71
|
-
)
|
72
|
-
end
|
73
|
-
|
74
|
-
Chef::Log.init(Chef::Config[:log_location])
|
75
|
-
Chef::Log.level = Chef::Config[:log_level]
|
76
|
-
|
77
|
-
Merb.start
|
data/bin/chef-server-webui
DELETED
@@ -1,72 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# ./chef-server - Serving up piping hot infrastructure!
|
4
|
-
#
|
5
|
-
# Author:: Adam Jacob (<adam@opscode.com>)
|
6
|
-
# Copyright:: Copyright (c) 2008 Opscode, Inc.
|
7
|
-
# License:: Apache License, Version 2.0
|
8
|
-
#
|
9
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
10
|
-
# you may not use this file except in compliance with the License.
|
11
|
-
# You may obtain a copy of the License at
|
12
|
-
#
|
13
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
14
|
-
#
|
15
|
-
# Unless required by applicable law or agreed to in writing, software
|
16
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
17
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
18
|
-
# See the License for the specific language governing permissions and
|
19
|
-
# limitations under the License.
|
20
|
-
|
21
|
-
# Based on the 'merb' command, by Ezra
|
22
|
-
|
23
|
-
# Add chef and chef-server-slice lib dirs to the load path
|
24
|
-
# Load chef and chef-server slice from source rather than gem, if present
|
25
|
-
|
26
|
-
require "rubygems"
|
27
|
-
require "merb-core"
|
28
|
-
|
29
|
-
[ 'chef', 'chef-server-webui' ].each do |lib|
|
30
|
-
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "lib")))
|
31
|
-
library = File.expand_path(File.join(File.dirname(__FILE__), "..", "..", lib, "lib", "#{lib}.rb"))
|
32
|
-
require library if File.exists?(library)
|
33
|
-
end
|
34
|
-
|
35
|
-
CHEF_SERVER_VERSION = "0.8.16"
|
36
|
-
|
37
|
-
# Ensure the chef gem we load is the same version as the chef server
|
38
|
-
unless defined?(Chef)
|
39
|
-
gem "chef", "=" + CHEF_SERVER_VERSION
|
40
|
-
require 'chef'
|
41
|
-
end
|
42
|
-
|
43
|
-
Dir.chdir File.join(File.dirname(__FILE__),"..")
|
44
|
-
__DIR__ = Dir.getwd
|
45
|
-
|
46
|
-
if ARGV[0] && ARGV[0] =~ /^[^-]/
|
47
|
-
ARGV.push "-H"
|
48
|
-
end
|
49
|
-
unless %w[-a --adapter -i --irb-console -r --script-runner].any? { |o| ARGV.index(o) }
|
50
|
-
ARGV.push *%w[-a thin]
|
51
|
-
end
|
52
|
-
unless %w[-p --port].any? { |o| ARGV.index(o) }
|
53
|
-
ARGV.push *%w[-p 4040]
|
54
|
-
end
|
55
|
-
ARGV.push *[ "-I", File.join(__DIR__, "config", "init-webui.rb") ]
|
56
|
-
ARGV.push *[ "-m", __DIR__]
|
57
|
-
|
58
|
-
if index = ARGV.index("-C")
|
59
|
-
config = ARGV[index+1]
|
60
|
-
ARGV.delete("-C")
|
61
|
-
ARGV.delete(config)
|
62
|
-
Chef::Config.from_file(File.expand_path(config))
|
63
|
-
else
|
64
|
-
Chef::Config.from_file(
|
65
|
-
File.join("/etc", "chef", "server.rb")
|
66
|
-
)
|
67
|
-
end
|
68
|
-
|
69
|
-
Chef::Log.init(Chef::Config[:log_location])
|
70
|
-
Chef::Log.level = Chef::Config[:log_level]
|
71
|
-
|
72
|
-
Merb.start
|
data/config-webui.ru
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'merb-core'
|
3
|
-
require 'chef'
|
4
|
-
|
5
|
-
Chef::Config.from_file(File.join("/etc", "chef", "server.rb"))
|
6
|
-
|
7
|
-
Merb::Config.setup(:merb_root => File.expand_path(File.dirname(__FILE__)),
|
8
|
-
:environment => 'production',
|
9
|
-
:fork_for_class_load => false,
|
10
|
-
:init_file => File.dirname(__FILE__) / "config/init-webui.rb")
|
11
|
-
Merb.environment = Merb::Config[:environment]
|
12
|
-
Merb.root = Merb::Config[:merb_root]
|
13
|
-
Merb::BootLoader.run
|
14
|
-
|
15
|
-
Merb::Slices.config.each do |slice_module, config|
|
16
|
-
slice_module = Object.full_const_get(slice_module.to_s.camel_case) if slice_module.class.in?(String, Symbol)
|
17
|
-
slice_module.send("public_components").each do |component|
|
18
|
-
slice_static_dir = slice_module.send("dir_for", :public)
|
19
|
-
use Merb::Rack::Static, slice_static_dir
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
run Merb::Rack::Application.new
|
24
|
-
|
25
|
-
|
data/config.ru
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'merb-core'
|
3
|
-
require 'chef'
|
4
|
-
|
5
|
-
Chef::Config.from_file(File.join("/etc", "chef", "server.rb"))
|
6
|
-
|
7
|
-
Merb::Config.setup(:merb_root => File.expand_path(File.dirname(__FILE__)),
|
8
|
-
:environment => 'production',
|
9
|
-
:fork_for_class_load => false,
|
10
|
-
:init_file => File.dirname(__FILE__) / "config/init.rb")
|
11
|
-
Merb.environment = Merb::Config[:environment]
|
12
|
-
Merb.root = Merb::Config[:merb_root]
|
13
|
-
Merb::BootLoader.run
|
14
|
-
|
15
|
-
# Uncomment if your app is mounted at a suburi
|
16
|
-
#if prefix = ::Merb::Config[:path_prefix]
|
17
|
-
# use Merb::Rack::PathPrefix, prefix
|
18
|
-
#end
|
19
|
-
|
20
|
-
run Merb::Rack::Application.new
|
21
|
-
|
@@ -1,27 +0,0 @@
|
|
1
|
-
# dependencies are generated using a strict version, don't forget to edit the dependency versions when upgrading.
|
2
|
-
merb_gems_version = "> 1.0"
|
3
|
-
|
4
|
-
%w{chef chef-server-webui}.each do |dep|
|
5
|
-
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "..", dep, "lib")))
|
6
|
-
end
|
7
|
-
|
8
|
-
dependency "chef", :immediate=>true unless defined?(Chef)
|
9
|
-
|
10
|
-
begin
|
11
|
-
require 'chef'
|
12
|
-
require 'chef-server-webui'
|
13
|
-
rescue LoadError
|
14
|
-
end
|
15
|
-
|
16
|
-
# For more information about each component, please read http://wiki.merbivore.com/faqs/merb_components
|
17
|
-
dependency "merb-core", merb_gems_version
|
18
|
-
dependency "merb-slices", merb_gems_version
|
19
|
-
dependency "merb-haml", merb_gems_version
|
20
|
-
dependency "merb-assets", merb_gems_version
|
21
|
-
dependency "merb-helpers", merb_gems_version
|
22
|
-
if defined?(CHEF_SERVER_VERSION)
|
23
|
-
dependency "chef-server-webui", CHEF_SERVER_VERSION unless defined?(ChefServerWebui)
|
24
|
-
else
|
25
|
-
dependency "chef-server-webui" unless defined?(ChefServerWebui)
|
26
|
-
end
|
27
|
-
|
data/config/dependencies.rb
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
# dependencies are generated using a strict version, don't forget to edit the dependency versions when upgrading.
|
2
|
-
merb_gems_version = "> 1.0"
|
3
|
-
|
4
|
-
%w{chef chef-server-api chef-solr}.each do |dep|
|
5
|
-
$:.unshift(File.join(File.dirname(__FILE__), "..", "..", dep, "lib"))
|
6
|
-
end
|
7
|
-
|
8
|
-
begin
|
9
|
-
require 'chef'
|
10
|
-
require 'chef-server-api'
|
11
|
-
rescue
|
12
|
-
end
|
13
|
-
|
14
|
-
# For more information about each component, please read http://wiki.merbivore.com/faqs/merb_components
|
15
|
-
dependency "merb-core", merb_gems_version
|
16
|
-
dependency "merb-assets", merb_gems_version
|
17
|
-
dependency "merb-helpers", merb_gems_version
|
18
|
-
dependency "merb-slices", merb_gems_version
|
19
|
-
if defined?(CHEF_SERVER_VERSION)
|
20
|
-
dependency "chef-server-api", CHEF_SERVER_VERSION unless defined?(ChefServerApi)
|
21
|
-
else
|
22
|
-
dependency "chef-server-api" unless defined?(ChefServerApi)
|
23
|
-
end
|
24
|
-
|
@@ -1,13 +0,0 @@
|
|
1
|
-
Merb.logger.info("Loaded DEVELOPMENT Environment...")
|
2
|
-
Merb::Config.use { |c|
|
3
|
-
c[:exception_details] = true
|
4
|
-
c[:reload_templates] = true
|
5
|
-
c[:reload_classes] = true
|
6
|
-
c[:reload_time] = 0.5
|
7
|
-
c[:log_auto_flush ] = true
|
8
|
-
c[:log_level] = :debug
|
9
|
-
c[:log_stream] = Chef::Config[:log_location]
|
10
|
-
c[:log_file] = nil
|
11
|
-
# Or redirect logging into a file:
|
12
|
-
# c[:log_file] = Merb.root / "log" / "development.log"
|
13
|
-
}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
Merb.logger.info("Loaded PRODUCTION Environment...")
|
2
|
-
Merb::Config.use { |c|
|
3
|
-
c[:exception_details] = false
|
4
|
-
c[:reload_classes] = false
|
5
|
-
c[:log_auto_flush] = true
|
6
|
-
c[:log_level] = Chef::Config[:log_level]
|
7
|
-
c[:log_stream] = Chef::Config[:log_location]
|
8
|
-
# or redirect logger using IO handle
|
9
|
-
# c[:log_stream] = STDOUT
|
10
|
-
}
|
data/config/environments/rake.rb
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
Merb.logger.info("Loaded RAKE Environment...")
|
2
|
-
Merb::Config.use { |c|
|
3
|
-
c[:exception_details] = true
|
4
|
-
c[:reload_classes] = false
|
5
|
-
c[:log_auto_flush ] = true
|
6
|
-
c[:log_stream] = Chef::Config[:log_location]
|
7
|
-
c[:log_file] = nil
|
8
|
-
# Or redirect logging into a file:
|
9
|
-
# c[:log_file] = Merb.root / "log" / "development.log"
|
10
|
-
}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
Merb.logger.info("Loaded STAGING Environment...")
|
2
|
-
Merb::Config.use { |c|
|
3
|
-
c[:exception_details] = false
|
4
|
-
c[:reload_classes] = false
|
5
|
-
c[:log_level] = :error
|
6
|
-
c[:log_stream] = Chef::Config[:log_location]
|
7
|
-
c[:log_file] = nil
|
8
|
-
# or redirect logger using IO handle
|
9
|
-
# c[:log_stream] = STDOUT
|
10
|
-
}
|
data/config/environments/test.rb
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
Merb.logger.info("Loaded TEST Environment...")
|
2
|
-
Merb::Config.use { |c|
|
3
|
-
c[:testing] = true
|
4
|
-
c[:exception_details] = true
|
5
|
-
c[:log_auto_flush ] = true
|
6
|
-
|
7
|
-
# log less in testing environment
|
8
|
-
c[:log_level] = :error
|
9
|
-
c[:log_stream] = Chef::Config[:log_location]
|
10
|
-
c[:log_file] = nil
|
11
|
-
#c[:log_file] = Merb.root / "log" / "test.log"
|
12
|
-
# or redirect logger using IO handle
|
13
|
-
}
|