Skip to content

Commit

Permalink
expose config variable to enviroment files. Make logging less verbose.
Browse files Browse the repository at this point in the history
  • Loading branch information
maccman committed Apr 23, 2010
1 parent 9e44835 commit f238124
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/bowline/desktop/bridge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def invoke
object = klass.constantize
end

trace "JS invoking: #{klass}.#{method_name}(#{args.join(',')})"
debug "JS invoking: #{klass}.#{method_name}(#{args.join(',')})"

if object.respond_to?(:js_exposed?) &&
object.js_exposed?(method_name)
Expand Down
6 changes: 3 additions & 3 deletions lib/bowline/desktop/js.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def ready?

def call
if Desktop.enabled?
trace "JS eval on #{window}: #{script}"
debug "JS eval on #{window}: #{script}"
if multiple_windows?
windows.each {|w| w.run_script(script) }
raise "Can't return from multiple windows" if prok
Expand All @@ -30,7 +30,7 @@ def call
end
result
else
trace "Pseudo JS eval on #{window}: #{script}"
debug "Pseudo JS eval on #{window}: #{script}"
prok.call(nil) if prok
end
end
Expand All @@ -51,7 +51,7 @@ def parse(str)
JSON.parse(str)
end
rescue => e
trace "Parsing: #{str}"
debug "Parsing: #{str}"
raise e
end
end
Expand Down
9 changes: 6 additions & 3 deletions lib/bowline/initializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,9 @@ def load_plugins
end

def load_application_environment
require(Bowline.root.join(*%w{config environments}, Bowline.env))
config = configuration
path = Bowline.root.join(*%w{config environments}, Bowline.env + ".rb").to_s
eval(IO.read(path), binding, path)
end

def load_application_initializers
Expand Down Expand Up @@ -327,6 +329,8 @@ def process
set_load_path
load_gems

load_application_environment

require_frameworks
set_autoload_paths
add_plugin_load_paths
Expand Down Expand Up @@ -356,8 +360,7 @@ def process
initialize_windows
initialize_trap
initialize_path

load_application_environment

load_application_initializers
load_application_first_run

Expand Down

0 comments on commit f238124

Please sign in to comment.