subclassed the logger in util.rb, fixed gemfile path in bin/*

This commit is contained in:
John Bender 2010-02-07 23:14:11 -08:00
parent 3a3fbb44c7
commit 0be599164e
8 changed files with 17 additions and 11 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/env ruby
begin
require File.expand_path('../.bundle/environment', __FILE__)
require File.expand_path('../../.bundle/environment', __FILE__)
rescue LoadError
# Fallback on doing the resolve at runtime.
require "rubygems"
@ -14,4 +14,4 @@ GitStyleBinary.primary do
version "Somewhere between 0 and 0.1"
run { educate }
end
end

View File

@ -1,6 +1,6 @@
#!/usr/bin/env ruby
begin
require File.expand_path('../.bundle/environment', __FILE__)
require File.expand_path('../../.bundle/environment', __FILE__)
rescue LoadError
# Fallback on doing the resolve at runtime.
require "rubygems"
@ -27,4 +27,4 @@ EOS
run do |command|
Hobo::VM.down
end
end
end

View File

@ -1,6 +1,6 @@
#!/usr/bin/env ruby
begin
require File.expand_path('../.bundle/environment', __FILE__)
require File.expand_path('../../.bundle/environment', __FILE__)
rescue LoadError
# Fallback on doing the resolve at runtime.
require "rubygems"

View File

@ -1,6 +1,6 @@
#!/usr/bin/env ruby
begin
require File.expand_path('../.bundle/environment', __FILE__)
require File.expand_path('../../.bundle/environment', __FILE__)
rescue LoadError
# Fallback on doing the resolve at runtime.
require "rubygems"
@ -27,4 +27,4 @@ EOS
run do |command|
Hobo::VM.ssh
end
end
end

View File

@ -1,6 +1,6 @@
#!/usr/bin/env ruby
begin
require File.expand_path('../.bundle/environment', __FILE__)
require File.expand_path('../../.bundle/environment', __FILE__)
rescue LoadError
# Fallback on doing the resolve at runtime.
require "rubygems"

View File

@ -1,6 +1,6 @@
#!/usr/bin/env ruby
begin
require File.expand_path('../.bundle/environment', __FILE__)
require File.expand_path('../../.bundle/environment', __FILE__)
rescue LoadError
# Fallback on doing the resolve at runtime.
require "rubygems"
@ -27,4 +27,4 @@ EOS
run do |command|
Hobo::VM.up
end
end
end

View File

@ -16,5 +16,5 @@ require 'hobo/vm'
# TODO: Make this configurable
log_output = ENV['HOBO_ENV'] == 'test' ? nil : STDOUT
HOBO_LOGGER = Logger.new(log_output)
HOBO_LOGGER = Hobo::Logger.new(log_output)
Hobo::Env.load! unless ENV['HOBO_ENV'] == 'test'

View File

@ -15,5 +15,11 @@ error
HOBO_LOGGER
end
end
class Logger < ::Logger
def format_message(level, time, progname, msg)
"[#{level} #{time.strftime('%m-%d-%Y %X')}] Hobo: #{msg}\n"
end
end
end