Skip to content

Commit

Permalink
resolves #348 fix startup failures
Browse files Browse the repository at this point in the history
- fix dir assignment in Init#initialize
- move core requires into initialize method
  • Loading branch information
mojavelinux committed Sep 8, 2013
1 parent 266b4f8 commit 4b68494
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/awestruct/cli/init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def self.framework_path(path, framework = nil)
mkdir('stylesheets')
}

def initialize(opts = Awestruct::CLI::Options.new, framework = 'compass', scaffold = true)
def initialize(dir = Dir.pwd, framework = 'compass', scaffold = true)
@dir = dir
@framework = framework
@scaffold = scaffold
Expand Down
16 changes: 8 additions & 8 deletions lib/awestruct/cli/invoker.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
require 'awestruct/cli/options'

require 'awestruct/cli/init'
require 'awestruct/cli/generate'
require 'awestruct/cli/auto'
require 'awestruct/cli/server'
require 'awestruct/logger'

require 'pathname'
require 'logger'
require 'awestruct/logger'
require 'awestruct/cli/options'

module Awestruct
module CLI
Expand All @@ -34,6 +28,12 @@ def initialize(*options)
$LOG = Logger.new(Awestruct::AwestructLoggerMultiIO.new(@options.verbose, STDOUT, File.open('.awestruct/debug.log', 'w')))
$LOG.level = @options.verbose ? Logger::DEBUG : Logger::INFO
$LOG.formatter = Awestruct::AwestructLogFormatter.new

# these requires are deferred until after $LOG is set
require 'awestruct/cli/init'
require 'awestruct/cli/generate'
require 'awestruct/cli/auto'
require 'awestruct/cli/server'
end

def invoke!
Expand Down

0 comments on commit 4b68494

Please sign in to comment.