subclassed the logger in util.rb, fixed gemfile path in bin/*
This commit is contained in:
parent
3a3fbb44c7
commit
0be599164e
4
bin/hobo
4
bin/hobo
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
begin
|
begin
|
||||||
require File.expand_path('../.bundle/environment', __FILE__)
|
require File.expand_path('../../.bundle/environment', __FILE__)
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
# Fallback on doing the resolve at runtime.
|
# Fallback on doing the resolve at runtime.
|
||||||
require "rubygems"
|
require "rubygems"
|
||||||
|
@ -14,4 +14,4 @@ GitStyleBinary.primary do
|
||||||
version "Somewhere between 0 and 0.1"
|
version "Somewhere between 0 and 0.1"
|
||||||
|
|
||||||
run { educate }
|
run { educate }
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
begin
|
begin
|
||||||
require File.expand_path('../.bundle/environment', __FILE__)
|
require File.expand_path('../../.bundle/environment', __FILE__)
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
# Fallback on doing the resolve at runtime.
|
# Fallback on doing the resolve at runtime.
|
||||||
require "rubygems"
|
require "rubygems"
|
||||||
|
@ -27,4 +27,4 @@ EOS
|
||||||
run do |command|
|
run do |command|
|
||||||
Hobo::VM.down
|
Hobo::VM.down
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
begin
|
begin
|
||||||
require File.expand_path('../.bundle/environment', __FILE__)
|
require File.expand_path('../../.bundle/environment', __FILE__)
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
# Fallback on doing the resolve at runtime.
|
# Fallback on doing the resolve at runtime.
|
||||||
require "rubygems"
|
require "rubygems"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
begin
|
begin
|
||||||
require File.expand_path('../.bundle/environment', __FILE__)
|
require File.expand_path('../../.bundle/environment', __FILE__)
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
# Fallback on doing the resolve at runtime.
|
# Fallback on doing the resolve at runtime.
|
||||||
require "rubygems"
|
require "rubygems"
|
||||||
|
@ -27,4 +27,4 @@ EOS
|
||||||
run do |command|
|
run do |command|
|
||||||
Hobo::VM.ssh
|
Hobo::VM.ssh
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
begin
|
begin
|
||||||
require File.expand_path('../.bundle/environment', __FILE__)
|
require File.expand_path('../../.bundle/environment', __FILE__)
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
# Fallback on doing the resolve at runtime.
|
# Fallback on doing the resolve at runtime.
|
||||||
require "rubygems"
|
require "rubygems"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
begin
|
begin
|
||||||
require File.expand_path('../.bundle/environment', __FILE__)
|
require File.expand_path('../../.bundle/environment', __FILE__)
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
# Fallback on doing the resolve at runtime.
|
# Fallback on doing the resolve at runtime.
|
||||||
require "rubygems"
|
require "rubygems"
|
||||||
|
@ -27,4 +27,4 @@ EOS
|
||||||
run do |command|
|
run do |command|
|
||||||
Hobo::VM.up
|
Hobo::VM.up
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,5 +16,5 @@ require 'hobo/vm'
|
||||||
|
|
||||||
# TODO: Make this configurable
|
# TODO: Make this configurable
|
||||||
log_output = ENV['HOBO_ENV'] == 'test' ? nil : STDOUT
|
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'
|
Hobo::Env.load! unless ENV['HOBO_ENV'] == 'test'
|
||||||
|
|
|
@ -15,5 +15,11 @@ error
|
||||||
HOBO_LOGGER
|
HOBO_LOGGER
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue